|
@@ -23,21 +23,6 @@ var $invoice = $('.invoice'), |
|
@@ -23,21 +23,6 @@ var $invoice = $('.invoice'), |
23
|
dispatchInfo,
|
23
|
dispatchInfo,
|
24
|
total;
|
24
|
total;
|
25
|
|
25
|
|
26
|
-var orderCont = window.cookie('order-info') && JSON.parse(window.cookie('order-info'));
|
|
|
27
|
-var invoiceCont = {
|
|
|
28
|
- 7: '服装',
|
|
|
29
|
- 1: '图书',
|
|
|
30
|
- 9: '配件',
|
|
|
31
|
- 11: '日用品',
|
|
|
32
|
- 3: '办公用品',
|
|
|
33
|
- 6: '体育用品',
|
|
|
34
|
- 10: '数码产品'
|
|
|
35
|
- },
|
|
|
36
|
- invoicesType = {
|
|
|
37
|
- 1: '纸质',
|
|
|
38
|
- 2: '电子'
|
|
|
39
|
- };
|
|
|
40
|
-
|
|
|
41
|
require('../common');
|
26
|
require('../common');
|
42
|
|
27
|
|
43
|
lazyLoad();
|
28
|
lazyLoad();
|
|
@@ -122,19 +107,9 @@ $invoice.on('touchend', '.checkbox', function() { |
|
@@ -122,19 +107,9 @@ $invoice.on('touchend', '.checkbox', function() { |
122
|
|
107
|
|
123
|
if ($this.hasClass('icon-cb-radio')) {
|
108
|
if ($this.hasClass('icon-cb-radio')) {
|
124
|
$invoice.addClass('focus');
|
109
|
$invoice.addClass('focus');
|
125
|
- orderInfo('invoiceText', '');
|
|
|
126
|
- orderInfo('invoiceType', '7');
|
|
|
127
|
- orderInfo('receiverMobile', $('.user-mobile').val());
|
|
|
128
|
- orderInfo('invoicesType', '2');
|
|
|
129
|
- orderInfo('invoiceTitle', '个人');
|
|
|
130
|
}
|
110
|
}
|
131
|
if ($this.hasClass('icon-radio')) {
|
111
|
if ($this.hasClass('icon-radio')) {
|
132
|
$invoice.removeClass('focus');
|
112
|
$invoice.removeClass('focus');
|
133
|
- orderInfo('invoiceText', null);
|
|
|
134
|
- orderInfo('invoiceType', null);
|
|
|
135
|
- orderInfo('receiverMobile', null);
|
|
|
136
|
- orderInfo('invoicesType', null);
|
|
|
137
|
- orderInfo('invoiceTitle', null);
|
|
|
138
|
}
|
113
|
}
|
139
|
});
|
114
|
});
|
140
|
|
115
|
|
|
@@ -215,16 +190,16 @@ function submitOrder() { |
|
@@ -215,16 +190,16 @@ function submitOrder() { |
215
|
return false;
|
190
|
return false;
|
216
|
}
|
191
|
}
|
217
|
|
192
|
|
218
|
- // if (orderInfo('invoice')) {
|
|
|
219
|
- // if (!invoiceText) {
|
|
|
220
|
- // tip.show('请输入发票抬头');
|
|
|
221
|
- // return;
|
|
|
222
|
- // }
|
|
|
223
|
- // if (invoiceText.length > 30) {
|
|
|
224
|
- // tip.show('发票抬头不得超过30个汉字');
|
|
|
225
|
- // return;
|
|
|
226
|
- // }
|
|
|
227
|
- // }
|
193
|
+ if (orderInfo('invoice')) {
|
|
|
194
|
+ if (!invoiceText) {
|
|
|
195
|
+ tip.show('请输入发票抬头');
|
|
|
196
|
+ return;
|
|
|
197
|
+ }
|
|
|
198
|
+ if (invoiceText.length > 30) {
|
|
|
199
|
+ tip.show('发票抬头不得超过30个汉字');
|
|
|
200
|
+ return;
|
|
|
201
|
+ }
|
|
|
202
|
+ }
|
228
|
|
203
|
|
229
|
if (msg) {
|
204
|
if (msg) {
|
230
|
if (msg.length > 40) {
|
205
|
if (msg.length > 40) {
|
|
@@ -400,9 +375,3 @@ if (orderInfo('address') && orderInfo('address').is_support === 'N') { |
|
@@ -400,9 +375,3 @@ if (orderInfo('address') && orderInfo('address').is_support === 'N') { |
400
|
orderInfo('deliveryId', $('.delivery-id .icon-cb-radio').data('id'));
|
375
|
orderInfo('deliveryId', $('.delivery-id .icon-cb-radio').data('id'));
|
401
|
orderCompute();
|
376
|
orderCompute();
|
402
|
} |
377
|
} |
403
|
-
|
|
|
404
|
-if (orderCont.invoiceType) {
|
|
|
405
|
- $('.invoice-type').text(invoiceCont[orderCont.invoiceType] + '(' + invoicesType[orderCont.invoicesType] + ')');
|
|
|
406
|
-} else {
|
|
|
407
|
- $('.invoice-type').text('服装(电子)');
|
|
|
408
|
-} |
|
|