|
@@ -35,7 +35,7 @@ Page({
|
|
|
goodsTotalPrice00: 0,
|
|
|
goodsTotalPrice02: 0,
|
|
|
goodsTotalPrice10: 0,
|
|
|
- goodsTotalPrice11:0,
|
|
|
+ goodsTotalPrice11: 0,
|
|
|
postscript: "",
|
|
|
postscript00: '', //备货业务备注
|
|
|
postscript02: '', //补货业务备注
|
|
@@ -63,6 +63,21 @@ Page({
|
|
|
actualPrice02: 0.00,
|
|
|
actualPrice10: 0.00,
|
|
|
actualPrice11: 0.00,
|
|
|
+ campId00: 0,
|
|
|
+ campId02: 0,
|
|
|
+ campId10: 0,
|
|
|
+ campId11: 0,
|
|
|
+ campList00: '',
|
|
|
+ campList02: '',
|
|
|
+ campList10: '',
|
|
|
+ campList11: '',
|
|
|
+ campMinusDto00: '',
|
|
|
+ campMinusDto02: '',
|
|
|
+ campMinusDto10: '',
|
|
|
+ campMinusDto11: '',
|
|
|
+ checkCampId: 0,
|
|
|
+ storeCampMinusList: [],
|
|
|
+ openCampMinusAttr: false
|
|
|
},
|
|
|
bindMultiPickerColumnChange: function(e) {
|
|
|
let that = this;
|
|
@@ -87,13 +102,13 @@ Page({
|
|
|
},
|
|
|
bindMultiPickerChange: function(e) {
|
|
|
let that = this;
|
|
|
- console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
+ // console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
this.setData({
|
|
|
multiIndex: e.detail.value,
|
|
|
delivery_date: dateArray[e.detail.value[0]],
|
|
|
delivery_remark: e.detail.value[0] == 0 ? that.data.timeArray[e.detail.value[1]] : that.data.timeArray[e.detail.value[1]]
|
|
|
})
|
|
|
- console.log('delivery_date', this.data.delivery_date, ',delivery_remark', this.data.delivery_remark)
|
|
|
+ // console.log('delivery_date', this.data.delivery_date, ',delivery_remark', this.data.delivery_remark)
|
|
|
},
|
|
|
initPicker() {
|
|
|
let that = this;
|
|
@@ -123,9 +138,14 @@ Page({
|
|
|
tickDiscId02: that.data.tickDiscId02,
|
|
|
tickDiscId10: that.data.tickDiscId10,
|
|
|
tickDiscId11: that.data.tickDiscId11,
|
|
|
+ campId00: that.data.campId00,
|
|
|
+ campId02: that.data.campId02,
|
|
|
+ campId10: that.data.campId10,
|
|
|
+ campId11: that.data.campId11,
|
|
|
merchSn: wx.getStorageSync('merchSn'),
|
|
|
- checkCart: that.data.checkCart
|
|
|
- }).then(function(res) {
|
|
|
+ checkCart: that.data.checkCart,
|
|
|
+ isLoadStatus: 0//是首次加载
|
|
|
+ }, 'POST').then(function (res) {
|
|
|
if (res.errno === 0) {
|
|
|
console.log(res.data);
|
|
|
that.setData({
|
|
@@ -144,7 +164,8 @@ Page({
|
|
|
couponList02: res.data.couponList02,
|
|
|
couponList10: res.data.couponList10,
|
|
|
couponList11: res.data.couponList11,
|
|
|
- fullCutCouponId: res.data.fullCutCouponId,
|
|
|
+ // fullCutCouponId: res.data.fullCutCouponId,
|
|
|
+ // fullCutCouponDec: res.data.fullCutCouponDec,
|
|
|
couponPrice: res.data.couponPrice,
|
|
|
freightPrice00: res.data.freightPrice00,
|
|
|
freightPrice02: res.data.freightPrice02,
|
|
@@ -152,9 +173,25 @@ Page({
|
|
|
freightPrice11: res.data.freightPrice11,
|
|
|
goodsTotalPrice: res.data.goodsTotalPrice,
|
|
|
orderTotalPrice: res.data.orderTotalPrice,
|
|
|
- fullCutCouponDec: res.data.fullCutCouponDec,
|
|
|
userName: res.data.userName,
|
|
|
- idNo: res.data.idNo
|
|
|
+ idNo: res.data.idNo,
|
|
|
+ campList00: res.data.campList00,
|
|
|
+ campList02: res.data.campList02,
|
|
|
+ campList10: res.data.campList10,
|
|
|
+ campList11: res.data.campList11,
|
|
|
+ campMinusDto00: res.data.campMinusDto00,
|
|
|
+ campMinusDto02: res.data.campMinusDto02,
|
|
|
+ campMinusDto10: res.data.campMinusDto10,
|
|
|
+ campMinusDto11: res.data.campMinusDto11,
|
|
|
+ campId00: res.data.campId00,
|
|
|
+ campId02: res.data.campId02,
|
|
|
+ campId10: res.data.campId10,
|
|
|
+ campId11: res.data.campId11,
|
|
|
+ tickDiscId00: res.data.tickDiscId00,
|
|
|
+ tickDiscId02: res.data.tickDiscId02,
|
|
|
+ tickDiscId10: res.data.tickDiscId10,
|
|
|
+ tickDiscId11: res.data.tickDiscId11,
|
|
|
+ isLoadStatus: 0
|
|
|
});
|
|
|
if (that.data.idNo) {
|
|
|
that.setData({
|
|
@@ -211,48 +248,10 @@ Page({
|
|
|
// console.log(that.data.goodsTotalByType02);
|
|
|
// console.log(that.data.goodsTotalByType10);
|
|
|
// console.log(that.data.goodsTotalByType11);
|
|
|
-
|
|
|
- // 选择优惠券
|
|
|
- if (that.data.tickDiscId00 && that.data.couponList00.length > 0) {
|
|
|
- for (var i = 0; i < that.data.couponList00.length; i++) {
|
|
|
- if (that.data.tickDiscId00 == that.data.couponList00[i].id) {
|
|
|
- that.setData({
|
|
|
- checkedCoupon00: that.data.couponList00[i]
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (that.data.tickDiscId02 && that.data.couponList02.length > 0) {
|
|
|
- for (var i = 0; i < that.data.couponList02.length; i++) {
|
|
|
- if (that.data.tickDiscId02 == that.data.couponList02[i].id) {
|
|
|
- that.setData({
|
|
|
- checkedCoupon02: that.data.couponList02[i]
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (that.data.tickDiscId10 && that.data.couponList10.length > 0) {
|
|
|
- for (var i = 0; i < that.data.couponList10.length; i++) {
|
|
|
- if (that.data.tickDiscId10 == that.data.couponList10[i].id) {
|
|
|
- that.setData({
|
|
|
- checkedCoupon10: that.data.couponList10[i]
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (that.data.tickDiscId11 && that.data.couponList11.length > 0) {
|
|
|
- for (var i = 0; i < that.data.couponList11.length; i++) {
|
|
|
- if (that.data.tickDiscId11 == that.data.couponList11[i].id) {
|
|
|
- that.setData({
|
|
|
- checkedCoupon11: that.data.couponList11[i]
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //选择促销
|
|
|
+ that.setCampMinus();
|
|
|
+ //选择优惠券
|
|
|
+ that.setTickDisc();
|
|
|
}
|
|
|
wx.hideLoading();
|
|
|
that.checkStore();
|
|
@@ -352,7 +351,7 @@ Page({
|
|
|
tickDiscId02: that.data.tickDiscId02,
|
|
|
tickDiscId10: that.data.tickDiscId10,
|
|
|
tickDiscId11: that.data.tickDiscId11,
|
|
|
- fullCutCouponId: that.data.fullCutCouponId,
|
|
|
+ // fullCutCouponId: that.data.fullCutCouponId,
|
|
|
postscript00: that.data.postscript00,
|
|
|
postscript02: that.data.postscript02,
|
|
|
postscript10: that.data.postscript10,
|
|
@@ -362,7 +361,12 @@ Page({
|
|
|
idNo: that.data.idNo,
|
|
|
userName: that.data.userName,
|
|
|
merchSn: wx.getStorageSync("merchSn"),
|
|
|
- checkCart: that.data.checkCart
|
|
|
+ checkCart: that.data.checkCart,
|
|
|
+ campId00: that.data.campId00,
|
|
|
+ campId02: that.data.campId02,
|
|
|
+ campId10: that.data.campId10,
|
|
|
+ campId11: that.data.campId11,
|
|
|
+ isLoadStatus: that.data.isLoadStatus
|
|
|
}, 'POST').then(function(res) {
|
|
|
if (res.errno === 0) {
|
|
|
let actualPrice = that.data.actualPrice;
|
|
@@ -585,7 +589,8 @@ Page({
|
|
|
// url: '/pages/shopping/coupon/coupon',
|
|
|
// })
|
|
|
that.setData({
|
|
|
- openTicketAttr: !that.data.openTicketAttr
|
|
|
+ openTicketAttr: !that.data.openTicketAttr,
|
|
|
+ openCampMinusAttr: false
|
|
|
})
|
|
|
if (that.data.openTicketAttr) {
|
|
|
that.getTicketDiscountList(goodsBizType);
|
|
@@ -622,7 +627,7 @@ Page({
|
|
|
let id = e.currentTarget.dataset.ticketId;
|
|
|
let goodsBizType = e.currentTarget.dataset.goodsType;
|
|
|
// console.log(id);
|
|
|
- if (id) {
|
|
|
+ if (id != null) {
|
|
|
if (goodsBizType == '00') {
|
|
|
that.setData({
|
|
|
tickDiscId00: id,
|
|
@@ -662,9 +667,15 @@ Page({
|
|
|
tickDiscId02: that.data.tickDiscId02,
|
|
|
tickDiscId10: that.data.tickDiscId10,
|
|
|
tickDiscId11: that.data.tickDiscId11,
|
|
|
+ campId00: that.data.campId00,
|
|
|
+ campId02: that.data.campId02,
|
|
|
+ campId10: that.data.campId10,
|
|
|
+ campId11: that.data.campId11,
|
|
|
merchSn: wx.getStorageSync('merchSn'),
|
|
|
- checkCart: that.data.checkCart
|
|
|
- }).then(function(res) {
|
|
|
+ checkCart: that.data.checkCart,
|
|
|
+ isLoadStatus: 2//2代表选择优惠券加载
|
|
|
+ }, 'POST').then(function (res) {
|
|
|
+ console.log(res.data);
|
|
|
if (res.errno === 0) {
|
|
|
that.setData({
|
|
|
actualPrice: res.data.actualPrice,
|
|
@@ -682,54 +693,273 @@ Page({
|
|
|
couponList11: res.data.couponList11,
|
|
|
goodsTotalPrice: res.data.goodsTotalPrice,
|
|
|
orderTotalPrice: res.data.orderTotalPrice,
|
|
|
- fullCutCouponDec: res.data.fullCutCouponDec,
|
|
|
- fullCutCouponId: res.data.fullCutCouponId,
|
|
|
+ // fullCutCouponDec: res.data.fullCutCouponDec,
|
|
|
+ // fullCutCouponId: res.data.fullCutCouponId,
|
|
|
+ campList00: res.data.campList00,
|
|
|
+ campList02: res.data.campList02,
|
|
|
+ campList10: res.data.campList10,
|
|
|
+ campList11: res.data.campList11,
|
|
|
+ campMinusDto00: res.data.campMinusDto00,
|
|
|
+ campMinusDto02: res.data.campMinusDto02,
|
|
|
+ campMinusDto10: res.data.campMinusDto10,
|
|
|
+ campMinusDto11: res.data.campMinusDto11,
|
|
|
+ campId00: res.data.campId00,
|
|
|
+ campId02: res.data.campId02,
|
|
|
+ campId10: res.data.campId10,
|
|
|
+ campId11: res.data.campId11,
|
|
|
+ tickDiscId00: res.data.tickDiscId00,
|
|
|
+ tickDiscId02: res.data.tickDiscId02,
|
|
|
+ tickDiscId10: res.data.tickDiscId10,
|
|
|
+ tickDiscId11: res.data.tickDiscId11,
|
|
|
+ isLoadStatus: 2
|
|
|
});
|
|
|
+ //选择促销
|
|
|
+ that.setCampMinus();
|
|
|
+ //选择优惠券
|
|
|
+ that.setTickDisc();
|
|
|
+ }
|
|
|
+ wx.hideLoading();
|
|
|
|
|
|
- // 选择优惠券
|
|
|
- if (that.data.tickDiscId00 && that.data.couponList00.length > 0) {
|
|
|
- for (var i = 0; i < that.data.couponList00.length; i++) {
|
|
|
- if (that.data.tickDiscId00 == that.data.couponList00[i].id) {
|
|
|
- that.setData({
|
|
|
- checkedCoupon00: that.data.couponList00[i]
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ selectCamp(e) {
|
|
|
+ let goodsBizType = e.currentTarget.dataset.goodsType;
|
|
|
+ let that = this;
|
|
|
+ // wx.navigateTo({
|
|
|
+ // url: '/pages/shopping/coupon/coupon',
|
|
|
+ // })
|
|
|
+ that.setData({
|
|
|
+ openCampMinusAttr: !that.data.openCampMinusAttr,
|
|
|
+ openTicketAttr: false
|
|
|
+ })
|
|
|
+ if (that.data.openCampMinusAttr) {
|
|
|
+ that.getStoreCampMinusList(goodsBizType);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ hideSwitchTicketPop: function() {
|
|
|
+ this.setData({
|
|
|
+ openTicketAttr: false,
|
|
|
+ openCampMinusAttr: false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 查看满减满折列表
|
|
|
+ */
|
|
|
+ getStoreCampMinusList(goodsBizType) {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中...',
|
|
|
+ });
|
|
|
+ let that = this;
|
|
|
+ util.request(api.CampminusByCheckCartList, {
|
|
|
+ storeId: wx.getStorageSync('storeId'),
|
|
|
+ checkCart: that.data.checkCart,
|
|
|
+ bizType: goodsBizType
|
|
|
+ }).then(function(res) {
|
|
|
+ if (res.errno === 0) {
|
|
|
+ that.setData({
|
|
|
+ storeCampMinusList: res.data
|
|
|
+ });
|
|
|
+ wx.hideLoading();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ selectUserCamp(e) {
|
|
|
+ let that = this;
|
|
|
+ let campId = e.currentTarget.dataset.campId;
|
|
|
+ let goodsBizType = e.currentTarget.dataset.goodsType;
|
|
|
+ if (campId != null) {
|
|
|
+ if (goodsBizType == '00') {
|
|
|
+ that.setData({
|
|
|
+ campId00: campId,
|
|
|
+ checkCampId: campId
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (goodsBizType == '02') {
|
|
|
+ that.setData({
|
|
|
+ campId02: campId,
|
|
|
+ checkCampId: campId
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (goodsBizType == '10') {
|
|
|
+ that.setData({
|
|
|
+ campId10: campId,
|
|
|
+ checkCampId: campId
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (goodsBizType == '11') {
|
|
|
+ that.setData({
|
|
|
+ campId11: campId,
|
|
|
+ checkCampId: campId
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submitCampMinus() {
|
|
|
+ let that = this;
|
|
|
+ that.hideSwitchTicketPop();
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中...',
|
|
|
+ });
|
|
|
+ util.request(api.CartCheckout, {
|
|
|
+ tickDiscId00: that.data.tickDiscId00,
|
|
|
+ tickDiscId02: that.data.tickDiscId02,
|
|
|
+ tickDiscId10: that.data.tickDiscId10,
|
|
|
+ tickDiscId11: that.data.tickDiscId11,
|
|
|
+ campId00: that.data.campId00,
|
|
|
+ campId02: that.data.campId02,
|
|
|
+ campId10: that.data.campId10,
|
|
|
+ campId11: that.data.campId11,
|
|
|
+ merchSn: wx.getStorageSync('merchSn'),
|
|
|
+ checkCart: that.data.checkCart,
|
|
|
+ isLoadStatus: 1//1代表选择促销活动加载
|
|
|
+ }, 'POST').then(function (res) {
|
|
|
+ console.log(res.data);
|
|
|
+ if (res.errno === 0) {
|
|
|
+ that.setData({
|
|
|
+ actualPrice: res.data.actualPrice,
|
|
|
+ actualPrice00: res.data.actualPrice00,
|
|
|
+ actualPrice02: res.data.actualPrice02,
|
|
|
+ actualPrice10: res.data.actualPrice10,
|
|
|
+ actualPrice11: res.data.actualPrice11,
|
|
|
+ checkedCoupon00: res.data.checkedCoupon00,
|
|
|
+ checkedCoupon02: res.data.checkedCoupon02,
|
|
|
+ checkedCoupon10: res.data.checkedCoupon10,
|
|
|
+ checkedCoupon11: res.data.checkedCoupon11,
|
|
|
+ couponList00: res.data.couponList00,
|
|
|
+ couponList02: res.data.couponList02,
|
|
|
+ couponList10: res.data.couponList10,
|
|
|
+ couponList11: res.data.couponList11,
|
|
|
+ goodsTotalPrice: res.data.goodsTotalPrice,
|
|
|
+ orderTotalPrice: res.data.orderTotalPrice,
|
|
|
+ // fullCutCouponDec: res.data.fullCutCouponDec,
|
|
|
+ // fullCutCouponId: res.data.fullCutCouponId,
|
|
|
+ campList00: res.data.campList00,
|
|
|
+ campList02: res.data.campList02,
|
|
|
+ campList10: res.data.campList10,
|
|
|
+ campList11: res.data.campList11,
|
|
|
+ campMinusDto00: res.data.campMinusDto00,
|
|
|
+ campMinusDto02: res.data.campMinusDto02,
|
|
|
+ campMinusDto10: res.data.campMinusDto10,
|
|
|
+ campMinusDto11: res.data.campMinusDto11,
|
|
|
+ campId00: res.data.campId00,
|
|
|
+ campId02: res.data.campId02,
|
|
|
+ campId10: res.data.campId10,
|
|
|
+ campId11: res.data.campId11,
|
|
|
+ tickDiscId00: res.data.tickDiscId00,
|
|
|
+ tickDiscId02: res.data.tickDiscId02,
|
|
|
+ tickDiscId10: res.data.tickDiscId10,
|
|
|
+ tickDiscId11: res.data.tickDiscId11,
|
|
|
+ isLoadStatus: 1
|
|
|
+ });
|
|
|
+ //选择促销
|
|
|
+ that.setCampMinus();
|
|
|
+ //选择优惠券
|
|
|
+ that.setTickDisc();
|
|
|
+ }
|
|
|
+ wx.hideLoading();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 选择促销
|
|
|
+ */
|
|
|
+ setCampMinus() {
|
|
|
+ let that = this;
|
|
|
+ // console.log(that.data.campMinusDto00);
|
|
|
+ // console.log(that.data.campList00);
|
|
|
+ // console.log(that.data.campId00);
|
|
|
+ if (that.data.campMinusDto00 != null && that.data.campList00 != null && that.data.campList00.length > 0) {
|
|
|
+ for (var i = 0; i < that.data.campList00.length; i++) {
|
|
|
+ if (that.data.campId00 == that.data.campList00[i].campMinusId) {
|
|
|
+ that.setData({
|
|
|
+ campMinusDto00: that.data.campList00[i],
|
|
|
+ checkCampId: that.data.campId00
|
|
|
+ });
|
|
|
+ break;
|
|
|
}
|
|
|
- if (that.data.tickDiscId02 && that.data.couponList02.length > 0) {
|
|
|
- for (var i = 0; i < that.data.couponList02.length; i++) {
|
|
|
- if (that.data.tickDiscId02 == that.data.couponList02[i].id) {
|
|
|
- that.setData({
|
|
|
- checkedCoupon02: that.data.couponList02[i]
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (that.data.campMinusDto02 != null && that.data.campList02 != null && that.data.campList02.length > 0) {
|
|
|
+ for (var i = 0; i < that.data.campList02.length; i++) {
|
|
|
+ if (that.data.campId02 == that.data.campList02[i].campMinusId) {
|
|
|
+ that.setData({
|
|
|
+ campMinusDto02: that.data.campList02[i],
|
|
|
+ checkCampId: that.data.campId02
|
|
|
+ });
|
|
|
+ break;
|
|
|
}
|
|
|
- if (that.data.tickDiscId10 && that.data.couponList10.length > 0) {
|
|
|
- for (var i = 0; i < that.data.couponList10.length; i++) {
|
|
|
- if (that.data.tickDiscId10 == that.data.couponList10[i].id) {
|
|
|
- that.setData({
|
|
|
- checkedCoupon10: that.data.couponList10[i]
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (that.data.campMinusDto10 != null && that.data.campList10 != null && that.data.campList10.length > 0) {
|
|
|
+ for (var i = 0; i < that.data.campList10.length; i++) {
|
|
|
+ if (that.data.campId10 == that.data.campList10[i].campMinusId) {
|
|
|
+ that.setData({
|
|
|
+ campMinusDto10: that.data.campList10[i],
|
|
|
+ checkCampId: that.data.campId10
|
|
|
+ });
|
|
|
+ break;
|
|
|
}
|
|
|
- if (that.data.tickDiscId11 && that.data.couponList11.length > 0) {
|
|
|
- for (var i = 0; i < that.data.couponList11.length; i++) {
|
|
|
- if (that.data.tickDiscId11 == that.data.couponList11[i].id) {
|
|
|
- that.setData({
|
|
|
- checkedCoupon11: that.data.couponList11[i]
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (that.data.campMinusDto11 != null && that.data.campList11 != null && that.data.campList11.length > 0) {
|
|
|
+ for (var i = 0; i < that.data.campList11.length; i++) {
|
|
|
+ if (that.data.campId11 == that.data.campList11[i].campMinusId) {
|
|
|
+ that.setData({
|
|
|
+ campMinusDto11: that.data.campList11[i],
|
|
|
+ checkCampId: that.data.campId11
|
|
|
+ });
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- wx.hideLoading();
|
|
|
-
|
|
|
- });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 选择优惠券
|
|
|
+ */
|
|
|
+ setTickDisc() {
|
|
|
+ let that = this;
|
|
|
+ if (that.data.tickDiscId00 != null && that.data.couponList00 != null && that.data.couponList00.length > 0) {
|
|
|
+ for (var i = 0; i < that.data.couponList00.length; i++) {
|
|
|
+ if (that.data.tickDiscId00 == that.data.couponList00[i].id) {
|
|
|
+ that.setData({
|
|
|
+ checkedCoupon00: that.data.couponList00[i],
|
|
|
+ checkTickDiscId: that.data.tickDiscId00
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (that.data.tickDiscId02 != null && that.data.couponList02 != null && that.data.couponList02.length > 0) {
|
|
|
+ for (var i = 0; i < that.data.couponList02.length; i++) {
|
|
|
+ if (that.data.tickDiscId02 == that.data.couponList02[i].id) {
|
|
|
+ that.setData({
|
|
|
+ checkedCoupon02: that.data.couponList02[i],
|
|
|
+ checkTickDiscId: that.data.tickDiscId02
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (that.data.tickDiscId10 != null && that.data.couponList10 != null && that.data.couponList10.length > 0) {
|
|
|
+ for (var i = 0; i < that.data.couponList10.length; i++) {
|
|
|
+ if (that.data.tickDiscId10 == that.data.couponList10[i].id) {
|
|
|
+ that.setData({
|
|
|
+ checkedCoupon10: that.data.couponList10[i],
|
|
|
+ checkTickDiscId: that.data.tickDiscId10
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (that.data.tickDiscId11 != null && that.data.couponList11 != null && that.data.couponList11.length > 0) {
|
|
|
+ for (var i = 0; i < that.data.couponList11.length; i++) {
|
|
|
+ if (that.data.tickDiscId11 == that.data.couponList11[i].id) {
|
|
|
+ that.setData({
|
|
|
+ checkedCoupon11: that.data.couponList11[i],
|
|
|
+ checkTickDiscId: that.data.tickDiscId11
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
})
|