...
|
...
|
@@ -213,8 +213,7 @@ function orderCompute() { |
|
|
}
|
|
|
|
|
|
function submitOrder() {
|
|
|
let invoiceText = $invoice.find('[name="invoice-title"]').val() || orderInfo('invoiceText'),
|
|
|
msg = $('#msg').find('input').val() || orderInfo('msg');
|
|
|
let msg = $('#msg').find('input').val() || orderInfo('msg');
|
|
|
|
|
|
if (isSubmiting) {
|
|
|
return false;
|
...
|
...
|
@@ -228,25 +227,35 @@ function submitOrder() { |
|
|
}
|
|
|
loading.showLoadingMask();
|
|
|
isSubmiting = true;
|
|
|
|
|
|
let postData = {
|
|
|
addressId: orderInfo('addressId'),
|
|
|
cartType: orderInfo('cartType') || 'ordinary',
|
|
|
deliveryId: orderInfo('deliveryId'),
|
|
|
deliveryTimeId: orderInfo('deliveryTimeId'),
|
|
|
msg: msg,
|
|
|
isPrintPrice: orderInfo('isPrintPrice'),
|
|
|
paymentTypeId: orderInfo('paymentTypeId'),
|
|
|
paymentType: orderInfo('paymentType'), // 支付方式
|
|
|
couponCode: orderInfo('couponCode'),
|
|
|
yohoCoin: orderInfo('yohoCoin'),
|
|
|
skuList: isLimitGood() ? orderInfo('skuList') : void 0
|
|
|
};
|
|
|
|
|
|
if (orderInfo('invoice')) {
|
|
|
Object.assign(postData, {
|
|
|
invoice: orderInfo('invoice'),
|
|
|
invoices_title: orderInfo('invoices_title'), // 发票抬头
|
|
|
invoices_type: orderInfo('invoices_type'), // 发票类型 1 纸质 2 电子
|
|
|
receiverMobile: orderInfo('receiverMobile'), // 接收人电话
|
|
|
buyerTaxNumber: orderInfo('buyerTaxNumber') // 购买方纳税人识别号,需要开具
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
method: 'POST',
|
|
|
url: '/cart/index/new/orderSub',
|
|
|
data: {
|
|
|
addressId: orderInfo('addressId'),
|
|
|
cartType: orderInfo('cartType') || 'ordinary',
|
|
|
deliveryId: orderInfo('deliveryId'),
|
|
|
deliveryTimeId: orderInfo('deliveryTimeId'),
|
|
|
invoiceText: orderInfo('invoice') ? invoiceText : null,
|
|
|
invoiceType: orderInfo('invoice') ? ($invoice.find('.invoice-type').val() ||
|
|
|
orderInfo('invoiceType')) : null,
|
|
|
msg: msg,
|
|
|
isPrintPrice: orderInfo('isPrintPrice'),
|
|
|
paymentTypeId: orderInfo('paymentTypeId'),
|
|
|
paymentType: orderInfo('paymentType'), // 支付方式
|
|
|
couponCode: orderInfo('couponCode'),
|
|
|
yohoCoin: orderInfo('yohoCoin'),
|
|
|
skuList: isLimitGood() ? orderInfo('skuList') : void 0
|
|
|
}
|
|
|
data: postData
|
|
|
}).then(function(res) {
|
|
|
let url;
|
|
|
|
...
|
...
|
|