Authored by 郭成尧

Merge branch 'feature/invoice' into feature/buynow

@@ -175,7 +175,10 @@ exports.orderSub = (uid, addressId, cartType, deliveryTime, @@ -175,7 +175,10 @@ exports.orderSub = (uid, addressId, cartType, deliveryTime,
175 params.is_continue_buy = 'N'; 175 params.is_continue_buy = 'N';
176 } 176 }
177 177
178 - params.invoice_content = 12; // 发票内容写死明细 178 + // 发票内容写死明细
  179 + if (invoices.invoices_type_id) {
  180 + params.invoice_content = 12;
  181 + }
179 182
180 // 发票类型 纸质 1 ,电子 2 183 // 发票类型 纸质 1 ,电子 2
181 if (invoices.invoices_type) { 184 if (invoices.invoices_type) {
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </li> 21 </li>
22 <li class="company-area"> 22 <li class="company-area">
23 <span class="title">发票抬头</span> 23 <span class="title">发票抬头</span>
24 - <input type="text" name="company" class="company" value="{{companyName}}" placeholder="填写发票抬头" maxlength="30"></li> 24 + <input type="text" name="company" class="company" value="个人(不可修改)" placeholder="请输入单位名称" maxlength="30" disabled></li>
25 <li class="tax-number" {{#isCompany}}style="display: none;"{{/isCompany}}> 25 <li class="tax-number" {{#isCompany}}style="display: none;"{{/isCompany}}>
26 <span class="title">税号</span> 26 <span class="title">税号</span>
27 <input type="text" id="buyerTaxNumber" name="buyerTaxNumber" class="number" value="{{taxNumber}}" placeholder="请输入正确的纳税人识别号" maxlength="30"> 27 <input type="text" id="buyerTaxNumber" name="buyerTaxNumber" class="number" value="{{taxNumber}}" placeholder="请输入正确的纳税人识别号" maxlength="30">
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 </li> 38 </li>
39 </section> 39 </section>
40 40
41 - <div class="btn-area"><span class="confirm-btn">确认</span></div> 41 + <div class="btn-area"><span class="confirm-btn active">确认</span></div>
42 42
43 <div class="invoice-notice"> 43 <div class="invoice-notice">
44 <div class="mask-bg"></div> 44 <div class="mask-bg"></div>
@@ -51,7 +51,7 @@ function switchBtnStatus() { @@ -51,7 +51,7 @@ function switchBtnStatus() {
51 $confirmBtn.removeClass('active'); 51 $confirmBtn.removeClass('active');
52 } 52 }
53 } else { 53 } else {
54 - if ($company.val() && $tel.attr('data-tel')) { 54 + if ($tel.attr('data-tel')) {
55 $confirmBtn.addClass('active'); 55 $confirmBtn.addClass('active');
56 } else { 56 } else {
57 $confirmBtn.removeClass('active'); 57 $confirmBtn.removeClass('active');
@@ -153,10 +153,14 @@ $('.invoice-top span, .invoice-cont li').not('.invoice-cont .cont-title').on('to @@ -153,10 +153,14 @@ $('.invoice-top span, .invoice-cont li').not('.invoice-cont .cont-title').on('to
153 chooseAction($(this).parent(), $(this).find('.choose')); 153 chooseAction($(this).parent(), $(this).find('.choose'));
154 154
155 if ($(this).text() === '单位') { 155 if ($(this).text() === '单位') {
  156 + $company.val('');
  157 + $company.removeAttr('disabled');
156 $taxNumber.slideDown(); 158 $taxNumber.slideDown();
157 } 159 }
158 160
159 if ($(this).text() === '个人') { 161 if ($(this).text() === '个人') {
  162 + $company.val('个人(不可修改)');
  163 + $company.attr('disabled', 'true');
160 $taxNumber.slideUp(); 164 $taxNumber.slideUp();
161 } 165 }
162 switchBtnStatus(); 166 switchBtnStatus();