_orderId.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469
  1. <template>
  2. <div class="mobile-content mobile-content-long mobile-pay">
  3. <!--<div class="pay-head" @click="openAddrModal">
  4. <template v-if="selectedAddress && selectedAddress.name">
  5. <p class="info">
  6. {{selectedAddress.name}}&nbsp;&nbsp;&nbsp;{{selectedAddress.tel}}
  7. </p>
  8. <div class="addr">
  9. <img src="/images/mobile/center/user/addr-flag.png" alt="">
  10. <span>{{selectedAddress.area + selectedAddress.detailAddress}}</span>
  11. </div>
  12. <i class="iconfont icon-xiangyou fr"></i>
  13. </template>
  14. <template v-else>
  15. <div class="no-addr">暂无收货地址信息</div>
  16. </template>
  17. </div>-->
  18. <ul class="pay-store-list">
  19. <li class="ps-item" v-for="item in orderData">
  20. <p class="ps-store-name">
  21. <nuxt-link tag="span" :to="`/mobile/shop/${item.storeid}`" class="inline-block text-ellipse seller-name"><span>卖&nbsp;&nbsp;家:</span>{{item.storeName}}&nbsp;<i class="iconfont icon-arrow-right"></i></nuxt-link>
  22. <a class="com-mobile-link" @click.stop="linkSaler(item)"><i class="iconfont icon-kefu1"></i>联系卖家</a>
  23. </p>
  24. <div class="ps-goods-info" @click="showDetailList(item.goods)">
  25. <ul class="ps-goods-list">
  26. <li class="inline-block" v-for="goods in (item.$expand && item.goods.length > 3 ? item.goods : item.goods.slice(0, 3))">
  27. <div class="clearfix" style="padding: .31rem .25rem;">
  28. <div class="fl">
  29. <div class="ps-goods-item text-ellipse"><span>品牌:</span>{{goods.brName || '-'}}</div>
  30. <div class="ps-goods-item text-ellipse"><span>物料名称(类目):</span>{{goods.kiName || '-'}}</div>
  31. <div class="ps-goods-item text-ellipse"><span>型号:</span>{{goods.cmpCode || '-'}}</div>
  32. <div class="ps-goods-item text-ellipse"><span>规格:</span>{{goods.spec || '-'}}</div>
  33. </div>
  34. <div class="fr">
  35. <div class="ps-goods-item text-ellipse"><span>交期(天):</span>{{goods.goodsHistory.b2cMinDelivery + '-' + goods.goodsHistory.b2cMaxDelivery}}</div>
  36. <div class="ps-goods-item text-ellipse"><span>单价:</span>{{baseUtils.getPriceByLevel(goods.goods.prices, goods.goods.purchaseNumber, goods.currencyName)}}</div>
  37. <div class="ps-goods-item text-ellipse"><span>起拍:</span>{{goods.minBuyQty}}</div>
  38. <div class="ps-goods-item"><span>数量(PCS):</span>
  39. <span class="input-line inline-block">
  40. <span class="inline-block" @click="setGoods('sub', goods)" :class="{disab: !goods.goods.canSub}">-</span>
  41. <input type="number" v-model="goods.goods.purchaseNumber" @blur="setGoods('set', goods)">
  42. <span class="inline-block" @click="setGoods('add', goods)" :class="{disab: !goods.goods.canAdd}">+</span>
  43. </span>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="single-count text-ellipse"><span class="pay-price-title inline-block">小计:</span><span class="ol-price"><span>{{goods.currencyName | currencyFilter}}</span>{{goods.goods.currentPrice}}</span></div>
  48. </li>
  49. </ul>
  50. <div class="show-more-psgoods" v-if="item.goods.length > 3 && !item.$expand" @click="item.$expand = true">
  51. 查看更多 <i class="iconfont icon-arrow-down"></i>
  52. </div>
  53. </div>
  54. <!-- <div class="ps-operate-line" @click="showRuleSet(item.storeid)">
  55. <span class="title">配送方式</span>
  56. <div class="fr">
  57. <div class="inline-block">
  58. <span v-if="fareRule[item.storeid] && fareRule[item.storeid][0]">{{fareRule[item.storeid][0].method | deliveryRuleFilter}}</span>
  59. <span v-if="fareRule[item.storeid] && fareRule[item.storeid][0]">{{fareRule[item.storeid][0].ruleName}}</span>
  60. <span v-if="!(fareRule[item.storeid] && fareRule[item.storeid][0])" class="red">当前地址不支持配送,请与卖家协商处理</span>
  61. </div>
  62. <i class="iconfont icon-xiangyou" v-if="fareRule[item.storeid] && fareRule[item.storeid][0]"></i>
  63. </div>
  64. </div>-->
  65. <!-- <div class="ps-operate-line">
  66. <span class="title">物流选择</span>
  67. <div class="fr">
  68. <div class="delivery-select active inline-block">最省钱</div>
  69. <div class="delivery-select inline-block">最快</div>
  70. </div>
  71. </div>-->
  72. <!--<div class="ps-operate-line ps-operate-takeself" v-if="checkShowTakeSelf(item)" @click="showTakeSelfSet(item.storeid)">
  73. <span class="title">自提点</span>
  74. <div class="fr">
  75. <div class="inline-block">
  76. <template v-if="takeSelfData[item.storeid] && takeSelfData[item.storeid]">
  77. <span>{{takeSelfData[item.storeid][0].takename}}</span>
  78. <span>地址:{{takeSelfData[item.storeid][0].area + takeSelfData[item.storeid][0].detailAddress}}</span>
  79. <span>营业时间:{{takeSelfData[item.storeid][0].businesstime}}</span>
  80. </template>
  81. <template v-else>暂无自提点信息</template>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="ps-operate-line">
  86. <span class="title">订单备注</span>
  87. <input type="text" v-model="item.remark" placeholder="选填:填写内容需和卖家协商确认">
  88. </div>-->
  89. <div class="ps-operate-line ps-fare">
  90. <div class="text-ellipse">
  91. <span class="pay-price-title inline-block">运费:</span><span class="ol-price" v-if="item.fare"><span v-if="item.fare.fare > 0">{{item.fare.currencyName | currencyFilter}}</span>{{item.fare.fare}}</span>
  92. <span class="ol-price" v-else>0</span>
  93. </div>
  94. <div class="text-ellipse">
  95. <span class="pay-price-title inline-block">手续费:</span><span class="ol-price"><span>{{payData.currency | currencyFilter}}</span>0.00</span>
  96. <!--(<span class="ol-price fare"><span>{{payData.currency | currencyFilter}}</span>{{getPoundage(item)}}</span>)-->
  97. <span class="inline-block tag">减免</span>
  98. <i class="fa fa-exclamation-circle"></i>
  99. </div>
  100. </div>
  101. <div class="ps-operate-line ps-price">
  102. <span class="pay-price-title inline-block">合计:</span>
  103. <span class="ol-price"><span>{{payData.currency | currencyFilter}}</span>
  104. {{item.goodsFarePrice || 0}}</span>
  105. </div>
  106. </li>
  107. </ul>
  108. <div class="ps-operate-line ps-address" @click="openAddrModal">
  109. <div class="inline-block">
  110. <template v-if="selectedAddress && selectedAddress.name">
  111. <p class="addr">
  112. <span class="addr-title inline-block">收货地址:</span>
  113. <span class="inline-block area">{{selectedAddress.area + selectedAddress.detailAddress}}</span>
  114. </p>
  115. <p class="text-ellipse info">
  116. <span class="info-name">收货人:</span>{{selectedAddress.name}}
  117. <span class="info-phone">电话:</span>{{selectedAddress.tel}}
  118. </p>
  119. </template>
  120. <template v-else>
  121. <p class="no-addr">请维护收货地址信息</p>
  122. </template>
  123. </div>
  124. <i class="iconfont icon-xiangyou inline-block"></i>
  125. </div>
  126. <div class="ps-operate-line pay-invoice" @click="openInvoiceModal">
  127. <span class="title">发票信息:</span>
  128. <div class="fr">
  129. <p class="inline-block text-ellipse">
  130. <template v-if="selectedInvoice">
  131. <span class="inv-head inline-block text-ellipse">{{selectedInvoice.head}}</span>
  132. <span class="inv-type inline-block">({{selectedInvoice.kind === 1205 ? '专用发票' : '普通发票'}})</span>
  133. </template>
  134. <template v-else>
  135. <span>暂不开具发票</span>
  136. </template>
  137. </p>
  138. <i class="iconfont icon-xiangyou"></i>
  139. </div>
  140. </div>
  141. <div class="ps-operate-line pay-operate">
  142. <span class="title">支付方式</span>
  143. <div class="fr">
  144. <span>线下支付</span>
  145. <!--<i class="iconfont icon-xiangyou"></i>-->
  146. </div>
  147. </div>
  148. <div class="buy-wrap">
  149. <div class="fr">
  150. <span class="title">总计:</span><span class="ol-price price inline-block text-ellipse"><span>{{payData.currency | currencyFilter}}</span>
  151. {{allPriceNew}}</span>
  152. <button class="buy-btn" @click="confirmOrder">提交订单</button>
  153. </div>
  154. </div>
  155. <!-- 联系卖家弹框start -->
  156. <link-user :infoObj="currentStoreInfo"
  157. :showLink="showLink"
  158. @closeAction="showLink = false">
  159. </link-user>
  160. <!-- 联系卖家弹框end -->
  161. <!-- 产品清单弹框start -->
  162. <!--<modal-wrapper :showModal="showModal"
  163. :title="'产品清单'"
  164. @closeAction="showModal = false">
  165. <ul class="cGoods-list">
  166. <li v-for="cGoods in currentGoods" class="clearfix">
  167. <div class="fl">
  168. <div class="cg-param-line text-ellipse">
  169. <span>品牌:</span>{{cGoods.brName}}
  170. </div>
  171. <div class="cg-param-line text-ellipse">
  172. <span>物料名称(类目):</span>{{cGoods.kiName}}
  173. </div>
  174. <div class="cg-param-line text-ellipse">
  175. <span>型号:</span>{{cGoods.cmpCode}}
  176. </div>
  177. <div class="cg-param-line text-ellipse">
  178. <span>规格:</span>{{cGoods.spec}}
  179. </div>
  180. </div>
  181. <div class="fr">
  182. <p class="ol-price text-ellipse"><span>{{cGoods.currencyName | currencyFilter}}</span>{{cGoods.taxUnitprice}}</p>
  183. <p class="count text-ellipse">x&nbsp;{{cGoods.number}}</p>
  184. </div>
  185. </li>
  186. </ul>
  187. </modal-wrapper>-->
  188. <!-- 产品清单弹框end -->
  189. <!-- 选择配送方式弹框start -->
  190. <bottom-modal-wrapper :showModal="showDeliveryModal"
  191. :title="'选择配送方式'"
  192. @closeAction="onDeliveryModalClose">
  193. <ul class="delivery-rule-list">
  194. <li v-for="cdr in fareRule[currentDeliveryStoreId]" @click="checkDelivery(cdr)">
  195. <label class="bottom-modal-check mobile-cart-check" :class="{'active': cdr.$checked}">
  196. <input type="checkbox">
  197. <span>{{cdr.method | deliveryRuleFilter}}</span>
  198. </label>
  199. <div class="fr" v-if="cdr.fare && cdr.fare > 0">运费:<span class="ol-price"><span>{{cdr.currencyName | currencyFilter}}</span>{{cdr.fare || 0}}</span></div>
  200. </li>
  201. </ul>
  202. </bottom-modal-wrapper>
  203. <!-- 选择配送方式弹框end -->
  204. <!-- 选择发票弹框start -->
  205. <modal-wrapper :showModal="showInvoiceModal"
  206. :title="'选择发票'"
  207. @closeAction="showInvoiceModal = false">
  208. <ul class="invoice-list">
  209. <li @click="setInvoiceCheck(-1)">
  210. <label class="bottom-modal-check mobile-cart-check" :class="{active: selectedInvoiceIndex === -1}">
  211. <input type="checkbox">
  212. </label>
  213. <span class="inv-head">暂不开票</span>
  214. </li>
  215. <li v-for="(inv, index) in invoiceData" @click="setInvoiceCheck(index)">
  216. <label class="bottom-modal-check mobile-cart-check" :class="{'active': selectedInvoiceIndex === index}">
  217. <input type="checkbox">
  218. </label>
  219. <span class="inv-head inline-block text-ellipse">{{inv.head}}</span>
  220. <img class="inv-type" :src="`/images/mobile/center/user/${inv.kind === 1205 ? 'invoice-spec' : 'invoice-nor'}.png`" alt="">
  221. <div class="content-line" v-if="inv.kind === 1205">
  222. <div class="title inline-block">单位地址:</div>
  223. <div class="content inline-block">{{inv.companyAddress || '-'}}</div>
  224. </div>
  225. <div class="content-line" v-if="inv.kind === 1205">
  226. <div class="title inline-block">单位电话:</div>
  227. <div class="content inline-block">{{inv.companyPhone || '-'}}</div>
  228. </div>
  229. <div class="content-line" v-if="inv.kind === 1205">
  230. <div class="title inline-block">税务登记号:</div>
  231. <div class="content inline-block">{{inv.companyTaxNumber || '-'}}</div>
  232. </div>
  233. <div class="content-line" v-if="inv.kind === 1205">
  234. <div class="title inline-block">开户银行:</div>
  235. <div class="content inline-block">{{inv.bankName || '-'}}</div>
  236. </div>
  237. <div class="content-line" v-if="inv.kind === 1205">
  238. <div class="title inline-block">开户银行账户:</div>
  239. <div class="content inline-block">{{inv.bankAccount || '-'}}</div>
  240. </div>
  241. <div class="content-line">
  242. <div class="title inline-block">收票人:</div>
  243. <div class="content inline-block">{{inv.name || '-'}}</div>
  244. </div>
  245. <div class="content-line">
  246. <div class="title inline-block">联系电话:</div>
  247. <div class="content inline-block">{{inv.telephone || '-'}}</div>
  248. </div>
  249. <div class="content-line">
  250. <div class="title inline-block">详细地址:</div>
  251. <div class="content inline-block">{{inv.area + inv.detailAddress}}</div>
  252. </div>
  253. </li>
  254. </ul>
  255. </modal-wrapper>
  256. <!-- 选择发票弹框end -->
  257. <!-- 选择地址弹框start -->
  258. <modal-wrapper :showModal="showAddrModal"
  259. :title="'收货地址'"
  260. @closeAction="showAddrModal = false">
  261. <template v-if="!editAddr">
  262. <div class="addr-list-wrap">
  263. <ul class="addr-list">
  264. <li v-for="(addr, index) in addressData" :class="{active: selectedAddressIndex === index}" @click="setAddressCheck(index)">
  265. <div class="info-wrap">
  266. <div class="info-line">
  267. <label class="mobile-cart-check" :class="{active: selectedAddressIndex === index}">
  268. <input type="checkbox">
  269. </label>
  270. <span class="name inline-block text-ellipse">{{addr.name}}</span>
  271. <span class="tel inline-block text-ellipse">{{addr.tel}}</span>
  272. <i class="inline-block" v-if="addr.num === 1">默认地址</i>
  273. </div>
  274. <p>{{addr.area + addr.detailAddress}}</p>
  275. </div>
  276. <div class="edit-addr-area">
  277. <a class="inline-block addr-btn" @click.stop="addAddress(addr)"><i class="iconfont icon-xinzeng"></i>编辑</a>
  278. <a class="inline-block addr-btn" @click.stop="deleteAddress(addr)"><i class="iconfont icon-lajitong"></i>删除</a>
  279. </div>
  280. </li>
  281. </ul>
  282. <button class="add-addr-btn" @click="addAddress()"><i class="iconfont icon-add"></i>添加新地址</button>
  283. </div>
  284. </template>
  285. <address-edit v-else="editAddr" :inFix="true" :data="currentAddress" :isPersonal="true" :isSend="false" @isEditEvent="editClick"></address-edit>
  286. </modal-wrapper>
  287. <!-- <div v-if="showAddrModal" class="mobile-hover-pager">
  288. <template v-if="!editAddr">
  289. <div class="addr-list-wrap">
  290. <ul class="addr-list">
  291. <li v-for="(addr, index) in addressData" :class="{active: selectedAddressIndex === index}" @click="setAddressCheck(index)">
  292. <div class="info-wrap">
  293. <div class="info-line">
  294. <label class="mobile-cart-check" :class="{active: selectedAddressIndex === index}">
  295. <input type="checkbox">
  296. </label>
  297. <span class="name inline-block text-ellipse">{{addr.name}}</span>
  298. <span class="tel inline-block text-ellipse">{{addr.tel}}</span>
  299. <i class="inline-block" v-if="addr.num === 1">默认地址</i>
  300. </div>
  301. <p>{{addr.area + addr.detailAddress}}</p>
  302. </div>
  303. <div class="edit-addr-area">
  304. <a class="inline-block addr-btn" @click.stop="addAddress(addr)"><i class="iconfont icon-xinzeng"></i>编辑</a>
  305. <a class="inline-block addr-btn" @click.stop="deleteAddress(addr)"><i class="iconfont icon-lajitong"></i>删除</a>
  306. </div>
  307. </li>
  308. </ul>
  309. <button class="add-addr-btn" @click="addAddress()"><i class="iconfont icon-add"></i>添加新地址</button>
  310. </div>
  311. </template>
  312. <address-edit v-else="editAddr" :inFix="false" :data="currentAddress" :isPersonal="true" :isSend="false" @isEditEvent="editClick"></address-edit>
  313. </div>-->
  314. <!-- 选择地址弹框end -->
  315. <!-- 选择自提点弹框start -->
  316. <modal-wrapper :showModal="showTakeSelfModal"
  317. :title="'选择自提点'"
  318. @closeAction="showTakeSelfModal = false">
  319. <ul class="addr-list takeself-list">
  320. <li v-for="(takeself, index) in takeSelfData[currentTakeSelfStoreId]" @click="checkTakeSelf(index)" :class="{active: index === 0}">
  321. <div class="info-wrap">
  322. <div class="info-line">
  323. <label class="mobile-cart-check" :class="{active: index === 0}">
  324. <input type="checkbox">
  325. </label>
  326. <span class="name inline-block text-ellipse">{{takeself.takename}}</span>
  327. </div>
  328. <p><span>地址:</span>{{takeself.area + takeself.detailAddress}}</p>
  329. <p><span>营业时间:</span>{{takeself.businesstime}}</p>
  330. </div>
  331. </li>
  332. </ul>
  333. </modal-wrapper>
  334. <!-- 选择自提点弹框end -->
  335. <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
  336. </div>
  337. </template>
  338. <script>
  339. import { LinkUser, ModalWrapper, BottomModalWrapper, AddressEdit } from '~components/mobile/base'
  340. import { RemindBox } from '~components/mobile/common'
  341. import { goodsPurchaseOperate } from '~utils/mixin'
  342. export default {
  343. layout: 'mobile',
  344. middleware: 'authenticated',
  345. data () {
  346. return {
  347. orderData: [],
  348. // 联系卖家店铺信息
  349. currentStoreInfo: {},
  350. showLink: false,
  351. showModal: false,
  352. showDeliveryModal: false,
  353. showInvoiceModal: false,
  354. showAddrModal: false,
  355. showTakeSelfModal: false,
  356. currentGoods: [],
  357. remindText: '',
  358. timeoutCount: '',
  359. // 配送规则
  360. fareRule: {},
  361. // 自提点
  362. takeSelfData: {},
  363. // 正在修改配送方式的店铺id
  364. currentDeliveryStoreId: '',
  365. // 订单总价
  366. allOrderPrice: 0,
  367. // 选中的发票
  368. selectedInvoiceIndex: -1,
  369. // 选中的地址
  370. selectedAddressIndex: 0,
  371. // 正在修改自提点的店铺id
  372. currentTakeSelfStoreId: '',
  373. editAddr: false,
  374. currentAddress: {}
  375. }
  376. },
  377. mixins: [goodsPurchaseOperate],
  378. components: {
  379. LinkUser,
  380. ModalWrapper,
  381. RemindBox,
  382. BottomModalWrapper,
  383. AddressEdit
  384. },
  385. fetch ({ store, params }) {
  386. return Promise.all([
  387. store.dispatch('userCenter/loadPayInfo', {enOrderid: params.orderId}),
  388. store.dispatch('userCenter/loadAcceptAddress', {send: false}),
  389. store.dispatch('userCenter/loadPayInvoice')
  390. ])
  391. },
  392. // watch: {
  393. // '$store.state.userCenter.list.invoice.data': {
  394. // handler: function (val) {
  395. // this.invoiceData = this.baseUtils.deepCopy(val)
  396. // if (this.invoiceData && this.invoiceData.length) {
  397. // this.invoiceData.forEach(item => {
  398. // this.$set(item, '$checked', false)
  399. // })
  400. // }
  401. // },
  402. // immediate: true
  403. // }
  404. // },
  405. computed: {
  406. payData () {
  407. // // 人民币为专用增值税发票,美元不开发票 --1205专用增值税发票 --1206普通发票 --1207不开发票
  408. // let invoices = this.baseUtils.deepCopy(this.$store.state.userCenter.list.pay.data)
  409. // if (invoices.currency === 'USD') {
  410. // invoices.invoicetype = 1207
  411. // invoices.paytype = '1103'
  412. // } else {
  413. // invoices.invoicetype = 1205
  414. // invoices.paytype = '1102'
  415. // }
  416. // // 默认选择第三方配送 --1301第三方配送 --卖家配送 --1303上门自提
  417. // invoices.deliverytype = 1301
  418. // return invoices
  419. return this.baseUtils.deepCopy(this.$store.state.userCenter.list.pay.data)
  420. },
  421. addressData () {
  422. return this.$store.state.userCenter.list.address.data
  423. },
  424. invoiceData () {
  425. return this.$store.state.userCenter.list.invoice.data
  426. },
  427. // 已选择完的发票
  428. selectedInvoice () {
  429. return this.selectedInvoiceIndex > -1 ? this.invoiceData[this.selectedInvoiceIndex] : null
  430. },
  431. // // 选择中选中的发票
  432. // checkedInvoiceObj () {
  433. // return this.invoiceData.find(item => {
  434. // return item.$checked
  435. // })
  436. // },
  437. selectedAddress () {
  438. // console.log(this.addressData[this.selectedAddressIndex])
  439. return this.addressData[this.selectedAddressIndex] || {}
  440. },
  441. ruleParamsArr () {
  442. let arr = []
  443. this.orderData.forEach(item => {
  444. item.goodsPrice = this.getTotalPrice(item)
  445. arr.push({
  446. uuid: item.storeid,
  447. fare: this.getTotalPrice(item)
  448. })
  449. })
  450. return arr
  451. },
  452. allPriceNew () {
  453. let allOrderPrice = 0
  454. this.orderData.forEach((item, index) => {
  455. item.goodsPrice = this.getTotalPrice(item) // 总价
  456. // 包含运费的价格
  457. // item.goodsFarePrice = this.baseUtils.priceFixed(item.goodsPrice + (item.fare && item.fare.fare ? item.fare.fare : 0))
  458. item.goodsFarePrice = item.goodsPrice
  459. // this.$set(item, 'goodsFarePrice', item.goodsPrice)
  460. allOrderPrice += item.goodsPrice
  461. })
  462. return allOrderPrice
  463. }
  464. // // 选择自提点的列表统计
  465. // showTakeSelfList () {
  466. // let arr = {}
  467. // if (!this.showDeliveryModal || !this.showTakeSelfModal) { // 为了触发更新
  468. // for (let attr in this.fareRule) {
  469. // arr[attr] = this.fareRule[attr][0] && this.fareRule[attr][0].method === 1303
  470. // }
  471. // }
  472. // return arr
  473. // }
  474. // defaultAddress () {
  475. // return this.addressData.find(item => {
  476. // return item.num === 1
  477. // })
  478. // }
  479. },
  480. created () {
  481. this.initOrderData()
  482. },
  483. methods: {
  484. initOrderData () {
  485. this.payData.orderDetails.forEach(item => {
  486. item.goods = item.goodsHistory
  487. this.initGoodsStatus(item.goods, item.number)
  488. let current = this.orderData.find(objItem => {
  489. return objItem.storeid === item.storeid
  490. })
  491. if (!current) {
  492. this.orderData.push({
  493. storeName: item.storeName,
  494. storeid: item.storeid,
  495. supEnUU: item.supEnUU,
  496. goods: [item],
  497. $expand: false,
  498. goodsFarePrice: 0,
  499. goodsPrice: 0
  500. })
  501. } else {
  502. current.goods.push(item)
  503. }
  504. })
  505. this.getDeliveryRule()
  506. this.getTakeSelfInfo()
  507. },
  508. getDeliveryRule () {
  509. return this.$http.post(`/trade/distributionRule/usable/rule?area=${this.selectedAddress.area}`, this.ruleParamsArr)
  510. .then(res => {
  511. // this.fareRule = res.data || {}
  512. this.orderData.forEach(item => {
  513. this.fareRule[item.storeid] = [{
  514. fare: 0,
  515. uuid: item.storeid,
  516. ruleName: '卖家配送,全国包邮',
  517. method: 1302,
  518. currencyName: this.payData.currencyName
  519. }]
  520. })
  521. this.initFare()
  522. }, err => {
  523. this.setRemindText(err.response.data || '系统错误')
  524. })
  525. },
  526. getTakeSelfInfo () {
  527. return this.$http.post(`/trade/takeSelf/store/takeSelf`, this.ruleParamsArr)
  528. .then(res => {
  529. this.takeSelfData = res.data || {}
  530. }, err => {
  531. this.setRemindText(err.response.data || '系统错误')
  532. })
  533. },
  534. initFare () {
  535. this.allOrderPrice = 0
  536. this.orderData.forEach(item => {
  537. item.fare = this.fareRule[item.storeid] && this.fareRule[item.storeid].length ? this.fareRule[item.storeid][0] : {}
  538. item.goodsPrice = this.getTotalPrice(item) // 总价
  539. // 包含运费的价格
  540. // item.goodsFarePrice = this.baseUtils.priceFixed(item.goodsPrice + (item.fare && item.fare.fare ? item.fare.fare : 0))
  541. item.goodsFarePrice = item.goodsPrice
  542. this.allOrderPrice += item.goodsFarePrice
  543. })
  544. },
  545. getTotalPrice (storeItem) {
  546. let price = 0
  547. storeItem.goods.forEach(item => {
  548. price += item.goods.currentPrice
  549. })
  550. return Number(price.toFixed(6))
  551. },
  552. getPoundage (item) {
  553. return this.baseUtils.priceFixed((item.goodsFarePrice || item.goodsPrice) * 0.00453)
  554. },
  555. linkSaler (item) {
  556. this.$http.get(`/basic/enterprise/${item.supEnUU}/info`).then(res => {
  557. this.currentStoreInfo = res.data
  558. this.showLink = true
  559. }, err => {
  560. this.setRemindText(err.response.data || '系统错误')
  561. console.log(err)
  562. })
  563. },
  564. showDetailList (goods) {
  565. this.currentGoods = goods
  566. this.showModal = true
  567. },
  568. goodsScroll (type) {
  569. console.log(type)
  570. },
  571. setRemindText: function (str) {
  572. this.remindText = str
  573. this.timeoutCount++
  574. },
  575. checkShowTakeSelf (item) {
  576. return item.fare && item.fare.method === 1303
  577. },
  578. // 显示配送规则弹框
  579. showRuleSet: function (storeid) {
  580. if (this.fareRule[storeid] && this.fareRule[storeid].length) {
  581. this.currentDeliveryStoreId = storeid
  582. this.clearCurrentDeliveryCheck()
  583. this.fareRule[this.currentDeliveryStoreId][0].$checked = true
  584. this.showDeliveryModal = true
  585. }
  586. // console.log(storeid)
  587. },
  588. clearCurrentDeliveryCheck () {
  589. this.fareRule[this.currentDeliveryStoreId].forEach(item => {
  590. if (!item.hasOwnProperty('$checked')) {
  591. this.$set(item, '$checked', false)
  592. } else {
  593. item.$checked = false
  594. }
  595. })
  596. },
  597. checkDelivery (cdr) {
  598. if (!cdr.$checked) {
  599. this.clearCurrentDeliveryCheck()
  600. cdr.$checked = true
  601. }
  602. },
  603. onDeliveryModalClose (isSubmit) {
  604. if (!isSubmit) {
  605. this.showDeliveryModal = false
  606. // this.currentDeliveryRule = {}
  607. } else {
  608. let currentDi = this.fareRule[this.currentDeliveryStoreId]
  609. for (let i = 0; i < currentDi.length; i++) {
  610. if (currentDi[i].$checked) {
  611. this.baseUtils.exchangeArr(currentDi, i, 0)
  612. break
  613. }
  614. }
  615. this.initFare()
  616. this.showDeliveryModal = false
  617. }
  618. },
  619. // 显示自提点弹框
  620. showTakeSelfSet (storeid) {
  621. if (this.takeSelfData[storeid] && this.takeSelfData[storeid].length) {
  622. this.currentTakeSelfStoreId = storeid
  623. this.showTakeSelfModal = true
  624. }
  625. },
  626. checkTakeSelf (index) {
  627. // for (let i = 0; i < this.takeSelfData[this.currentTakeSelfStoreId].length; i++) {
  628. // if (item.id === this.takeSelfData[this.currentTakeSelfStoreId][i].id) {
  629. //
  630. // break
  631. // }
  632. // }
  633. if (index > 0) {
  634. this.baseUtils.exchangeArr(this.takeSelfData[this.currentTakeSelfStoreId], index, 0)
  635. }
  636. this.showTakeSelfModal = false
  637. },
  638. setInvoiceCheck (index) {
  639. if (this.selectedInvoiceIndex === index) {
  640. return
  641. }
  642. this.selectedInvoiceIndex = index
  643. this.showInvoiceModal = false
  644. },
  645. openInvoiceModal () {
  646. if (this.invoiceData && this.invoiceData.length) {
  647. this.showInvoiceModal = true
  648. } else {
  649. this.setRemindText('暂无发票信息,请前往pc端维护')
  650. }
  651. },
  652. setAddressCheck (index) {
  653. if (this.selectedAddressIndex === index) {
  654. this.showAddrModal = false
  655. return
  656. }
  657. this.selectedAddressIndex = index
  658. this.showAddrModal = false
  659. this.getDeliveryRule()
  660. },
  661. openAddrModal () {
  662. this.showAddrModal = true
  663. if (!this.selectedAddress.id) {
  664. this.editAddr = true
  665. }
  666. },
  667. // 配送规则校验
  668. checkRule () {
  669. let flag = true
  670. for (let attr in this.fareRule) {
  671. if (!this.fareRule[attr].length) {
  672. flag = false
  673. }
  674. }
  675. return flag
  676. },
  677. // 收货地址校验
  678. checkAddress () {
  679. if (!this.selectedAddress || !this.selectedAddress.id) {
  680. this.setRemindText('请选择收货地址')
  681. return false
  682. } else if (this.selectedAddress.area.indexOf('香港') > -1) {
  683. if (this.payData.currency === 'RMB') {
  684. this.setRemindText('当前选择的币别是RMB,地址却是香港')
  685. return false
  686. }
  687. } else {
  688. if (this.payData.currency === 'USD') {
  689. this.setRemindText('当前选择的币别是USD,地址却是内陆')
  690. return false
  691. }
  692. }
  693. return true
  694. },
  695. // 提交订单流程
  696. confirmOrder () {
  697. if (this.accountInvalid) {
  698. this.setRemindText('您的账户安全等级较低,请先在pc端进行信息完善')
  699. } else {
  700. if (this.payData.status === 502 || this.payData.status === 503) {
  701. this.underLinePaySubmitted()
  702. } else {
  703. if (!this.checkRule()) {
  704. this.setRemindText('当前地址部分卖家无法配送,请重新选择地址或与卖家协商处理')
  705. } else {
  706. let infos = []
  707. let info = this.generateOrderInfo()
  708. if (info) {
  709. infos.push(info)
  710. this.doSubmit(infos)
  711. }
  712. }
  713. }
  714. }
  715. },
  716. // 待付款订单-线下付款
  717. underLinePaySubmitted () {
  718. let arr = []
  719. if (this.payData.orderids) {
  720. arr = this.payData.orderids.split(',')
  721. } else {
  722. arr.push(this.payData.orderid)
  723. }
  724. let param = {
  725. orderid: this.baseUtils.enidfilter(arr.join('-'))
  726. }
  727. // 跳转至付款页面
  728. console.log('订单已存在,直接跳转至付款页面')
  729. this.$router.push(`/mobile/center/user/doPay/${encodeURIComponent(param.orderid)}`)
  730. return param
  731. },
  732. // 处理订单数据
  733. generateOrderInfo () {
  734. let orderInfo = {
  735. id: this.payData.id,
  736. orderid: this.payData.orderid
  737. }
  738. if (this.payData.currency === 'USD' && this.selectedInvoiceIndex !== -1) {
  739. this.setRemindText('美元请选择暂不开票')
  740. return false
  741. }
  742. if (this.checkAddress()) {
  743. orderInfo.add_id = this.selectedAddress.id
  744. } else {
  745. return false
  746. }
  747. let submitParam = this.orderSubmitParams()
  748. // 发票信息
  749. if (this.selectedInvoice) {
  750. if (this.selectedInvoice.kind === 1205) {
  751. orderInfo.invoicetype = '1205'
  752. } else if (this.selectedInvoice.kind === 1206) {
  753. if (submitParam.includeConsignment) {
  754. this.setRemindText('订单中包含寄售类型商品,请选择专票')
  755. return false
  756. }
  757. orderInfo.invoicetype = '1206'
  758. }
  759. if (this.selectedInvoice.id) {
  760. orderInfo.invoiceid = this.selectedInvoice.id
  761. } else {
  762. this.setRemindText('请添加发票信息')
  763. return false
  764. }
  765. } else {
  766. orderInfo.invoicetype = '1207'
  767. }
  768. orderInfo.totalprice = submitParam.goodsPrice
  769. orderInfo.currency = this.payData.currency
  770. orderInfo.orderRemark = JSON.stringify(submitParam.remarkObj)
  771. // 1103线下 1102线上
  772. orderInfo.paytype = '1103'
  773. orderInfo.splitInfo = {
  774. ruleList: JSON.stringify(submitParam.ruleList)
  775. // takeList: JSON.stringify(submitParam.takeList)
  776. }
  777. orderInfo.orderDetails = this.convertOrderDetailParams()
  778. // console.log(orderInfo)
  779. return orderInfo
  780. // 人民币为专用增值税发票,美元不开发票 --1205专用增值税发票 --1206普通发票 --1207不开发票
  781. // 默认选择第三方配送 --1301第三方配送 --卖家配送 --1303上门自提
  782. },
  783. // 订单提交的参数整合
  784. orderSubmitParams () {
  785. let params = {
  786. // 不包含运费的价格
  787. goodsPrice: 0,
  788. // 备注
  789. remarkObj: {},
  790. // 配送方式
  791. ruleList: {},
  792. // // 自提点
  793. // takeList: {},
  794. // 是否包含寄售商品
  795. includeConsignment: false
  796. }
  797. this.orderData.forEach(item => {
  798. params.goodsPrice += item.goodsPrice
  799. params.remarkObj[item.storeid] = item.remark
  800. params.ruleList[item.storeid] = item.fare
  801. // params.takeList[item.storeid] = this.checkShowTakeSelf(item) && this.takeSelfData[item.storeid] ? [0] : null
  802. if (item.storeid === '33069557578d44e69bd91ad12d28a8d4') {
  803. params.includeConsignment = true
  804. }
  805. })
  806. return params
  807. },
  808. // 提取要提交到服务器的订单明细goods数据
  809. convertOrderDetailParams () {
  810. let orderDetails = []
  811. this.payData.orderDetails.forEach(item => {
  812. orderDetails.push({
  813. id: item.id,
  814. number: item.goods.purchaseNumber,
  815. taxUnitprice: item.taxUnitprice,
  816. remark: item.remark,
  817. goodsnumber: item.goodsnumber,
  818. storeid: item.storeid
  819. })
  820. })
  821. return orderDetails
  822. },
  823. // 提交订单请求
  824. doSubmit (orders) {
  825. this.$http.put(`/trade/order/${this.baseUtils.enidfilter(this.payData.orderid)}/ensure`, orders)
  826. .then(res => {
  827. console.log(res)
  828. if (res.data.code === 1) {
  829. if (res.data.data && res.data.data[0]) {
  830. let orderids = []
  831. let batchCodes = []
  832. for (let i = 0; i < res.data.data.length; i++) {
  833. orderids.push(res.data.data[i].orderid)
  834. for (let j = 0; j < res.data.data[i].orderDetails.length; j++) {
  835. batchCodes.push(res.data.data[i].orderDetails[j].batchCode)
  836. }
  837. }
  838. // 如果不是立即购买,删除购物车里的对应信息
  839. if (!this.payData.buyNow) {
  840. this.$http.put('/trade/cart/delete', batchCodes)
  841. }
  842. // 跳转至订单提交完成页面
  843. console.log('订单提交完成,跳转至结果页')
  844. this.$router.push(`/mobile/center/user/doPay/${encodeURIComponent(this.baseUtils.enidfilter(orderids.join('-')))}`)
  845. }
  846. } else {
  847. if (res.data.data.code === 6) {
  848. this.setRemindText(res.data.message + ',请刷新界面之后重新操作')
  849. } else if (res.data.data.code === 7) {
  850. this.setRemindText(res.data.message + ',将为您跳转到购物车界面')
  851. setTimeout(() => {
  852. this.$router.push('/mobile/center/user/cart')
  853. }, 1500)
  854. } else {
  855. this.setRemindText(res.data.message)
  856. }
  857. }
  858. }, err => {
  859. console.log(err)
  860. this.setRemindText(err.response.data || '提交订单失败')
  861. })
  862. },
  863. reloadAddress () {
  864. this.$store.dispatch('userCenter/loadAcceptAddress', {send: false})
  865. },
  866. editClick (obj) {
  867. if (obj.id) {
  868. this.reloadAddress()
  869. }
  870. this.editAddr = false
  871. },
  872. addAddress (item) {
  873. if (!item) {
  874. this.currentAddress = {}
  875. } else {
  876. this.currentAddress = item
  877. }
  878. this.editAddr = true
  879. },
  880. deleteAddress (item) {
  881. this.$http.put(`/trade/address/delete/${item.id}`).then(res => {
  882. this.setRemindText('删除成功')
  883. this.reloadAddress()
  884. }, err => {
  885. this.setRemindText(err.response.data || '删除失败,系统错误')
  886. })
  887. }
  888. }
  889. }
  890. </script>
  891. <style lang="scss" scoped>
  892. $red-text: #f43938;
  893. .mobile-pay {
  894. margin-bottom: 2.02rem;
  895. .pay-head {
  896. height: 1.3rem;
  897. padding: .25rem 0 0 .21rem;
  898. position: relative;
  899. border-bottom: .18rem solid #f1f3f7;
  900. background: url('/images/mobile/center/user/addr-border.png') no-repeat;
  901. background-size: contain;
  902. background-position: bottom;
  903. .info {
  904. padding-left: .43rem;
  905. font-size: .3rem;
  906. font-weight: bold;
  907. }
  908. .addr {
  909. width: 6.5rem;
  910. overflow: hidden;
  911. text-overflow: ellipsis;
  912. white-space: nowrap;
  913. img {
  914. height: .29rem;
  915. margin-right: .16rem;
  916. }
  917. span {
  918. font-size: .26rem;
  919. }
  920. }
  921. .icon-xiangyou {
  922. position: absolute;
  923. right: .21rem;
  924. top: .52rem;
  925. color: #bebebe;
  926. }
  927. .no-addr {
  928. margin-top: .15rem;
  929. text-align: center;
  930. padding-right: .21rem;
  931. }
  932. }
  933. .pay-store-list {
  934. .ps-item {
  935. border-bottom: .18rem solid #f1f3f7;
  936. .ps-store-name {
  937. height: .89rem;
  938. line-height: .89rem;
  939. padding: 0 .25rem;
  940. font-size: .28rem;
  941. text-align: left;
  942. .seller-name {
  943. max-width: 5rem;
  944. position: relative;
  945. padding-right: .2rem;
  946. span {
  947. color: #666;
  948. }
  949. i {
  950. position: absolute;
  951. right: 0;
  952. font-size: .32rem;
  953. color: #bebebe;
  954. }
  955. }
  956. }
  957. .ps-goods-info {
  958. border-top: 1px solid #e4e4e4;
  959. border-bottom: 1px solid #e4e4e4;
  960. .ps-goods-list {
  961. background: #f9f9f8;
  962. height: 100%;
  963. li {
  964. border-bottom: 1px solid #e4e4e4;
  965. width: 100%;
  966. .fl {
  967. margin-right: .23rem;
  968. width: 3.49rem;
  969. }
  970. .fr {
  971. width: 3.2rem;
  972. .ol-price {
  973. font-size: .26rem;
  974. }
  975. }
  976. .ps-goods-item {
  977. font-size: .28rem;
  978. > span {
  979. color: #666;
  980. }
  981. }
  982. .single-count {
  983. height: .61rem;
  984. line-height: .61rem;
  985. background: #ebebeb;
  986. font-size: .28rem;
  987. color: #666;
  988. text-align: right;
  989. padding: 0 .21rem 0 .25rem;
  990. .ol-price {
  991. font-size: .26rem;
  992. }
  993. }
  994. }
  995. }
  996. .show-more-psgoods {
  997. height: .67rem;
  998. line-height: .67rem;
  999. font-size: .24rem;
  1000. color: #999;
  1001. text-align: center;
  1002. i {
  1003. font-size: .24rem;
  1004. color: #999;
  1005. }
  1006. }
  1007. }
  1008. }
  1009. }
  1010. .pay-price-title {
  1011. float: left;
  1012. }
  1013. .ps-operate-line {
  1014. height: .89rem;
  1015. line-height: .89rem;
  1016. padding: 0 .21rem 0 .25rem;
  1017. border-bottom: 1px solid #e4e4e4;
  1018. font-size: .28rem;
  1019. .fr {
  1020. height: 100%;
  1021. .inline-block {
  1022. line-height: normal;
  1023. text-align: right;
  1024. span {
  1025. color: #666;
  1026. /* &:first-child {
  1027. color: #333;
  1028. font-weight: bold;
  1029. display: block;
  1030. }*/
  1031. &.red {
  1032. color: $red-text;
  1033. }
  1034. }
  1035. }
  1036. .delivery-select {
  1037. width: 1.54rem;
  1038. height: .5rem;
  1039. line-height: .5rem;
  1040. text-align: center;
  1041. border: 1px solid #a1a1a1;
  1042. color: #999;
  1043. background: url('/images/mobile/center/user/delivery.png') no-repeat;
  1044. background-size: .2rem .2rem;
  1045. background-position: 1.3rem .25rem;
  1046. border-radius: .03rem;
  1047. margin-left: .56rem;
  1048. &:first-child {
  1049. margin-left: 0;
  1050. }
  1051. &.active {
  1052. background: url('/images/mobile/center/user/delivery-active.png') no-repeat;
  1053. background-size: .2rem .2rem;
  1054. background-position: 1.3rem .25rem;
  1055. color: #3e85f7;
  1056. border-color: #3e85f7;
  1057. }
  1058. }
  1059. i {
  1060. color: #bebebe;
  1061. margin-left: .14rem;
  1062. }
  1063. }
  1064. input {
  1065. width: 4.78rem;
  1066. margin-left: .68rem;
  1067. padding: 0 .1rem;
  1068. height: .45rem;
  1069. }
  1070. &.ps-price {
  1071. text-align: right;
  1072. padding-right: .31rem;
  1073. .inline-block {
  1074. font-size: .26rem;
  1075. }
  1076. }
  1077. &.ps-fare {
  1078. line-height: .43rem;
  1079. font-size: .24rem;
  1080. .text-ellipse {
  1081. text-align: right;
  1082. color: #333;
  1083. .ol-price {
  1084. font-size: .22rem;
  1085. span {
  1086. font-size: .22rem;
  1087. }
  1088. }
  1089. .fare {
  1090. text-decoration: line-through;
  1091. color: #666!important;
  1092. }
  1093. i {
  1094. font-size: .28rem;
  1095. color: #adacac;
  1096. }
  1097. .tag {
  1098. height: .25rem;
  1099. line-height: .25rem;
  1100. width: .48rem;
  1101. font-size: .22rem;
  1102. color: #fff;
  1103. background: #15b262;
  1104. border-radius: .02rem;
  1105. text-align: center;
  1106. margin-left: .14rem;
  1107. margin-right: .06rem;
  1108. position: relative;
  1109. top: -.02rem;
  1110. }
  1111. }
  1112. }
  1113. &.ps-address {
  1114. height: auto;
  1115. line-height: unset;
  1116. padding: .25rem 0;
  1117. position: relative;
  1118. padding-left: .21rem;
  1119. border-bottom: .11rem solid #f1f3f7;
  1120. > div {
  1121. width: 6.76rem;
  1122. padding-right: .26rem;
  1123. p {
  1124. font-size: .28rem;
  1125. }
  1126. }
  1127. i {
  1128. color: #bebebe;
  1129. }
  1130. .addr {
  1131. margin-bottom: .33rem;
  1132. .area {
  1133. width: 5rem;
  1134. word-break: break-all;
  1135. padding-left: .2rem;
  1136. }
  1137. }
  1138. .info {
  1139. .info-name {
  1140. margin-right: .46rem;
  1141. }
  1142. .info-phone {
  1143. margin-left: .5rem;
  1144. }
  1145. }
  1146. .no-addr {
  1147. text-align: center;
  1148. }
  1149. }
  1150. &.pay-operate {
  1151. border-bottom: .11rem solid #f1f3f7;
  1152. padding-top: 0;
  1153. .fr {
  1154. line-height: .78rem;
  1155. i {
  1156. position: static;
  1157. }
  1158. span {
  1159. color: #333;
  1160. font-size: .28rem;
  1161. }
  1162. }
  1163. }
  1164. &.pay-invoice {
  1165. border-bottom: .11rem solid #f1f3f7;
  1166. .fr {
  1167. font-size: .28rem;
  1168. i {
  1169. float: right;
  1170. }
  1171. p {
  1172. position: relative;
  1173. bottom: .06rem;
  1174. }
  1175. .inv-head {
  1176. max-width: 4rem;
  1177. }
  1178. .inv-type {
  1179. font-size: .24rem;
  1180. color: #999;
  1181. }
  1182. }
  1183. }
  1184. &.ps-operate-takeself {
  1185. height: 1.35rem;
  1186. line-height: 1.35rem;
  1187. .fr {
  1188. span {
  1189. display: block;
  1190. max-width: 5.5rem;
  1191. overflow: hidden;
  1192. text-overflow: ellipsis;
  1193. white-space: nowrap;
  1194. }
  1195. }
  1196. }
  1197. }
  1198. .ol-price {
  1199. color: #f43938 !important;
  1200. font-size: .32rem;
  1201. span {
  1202. font-size: .24rem;
  1203. }
  1204. }
  1205. .buy-wrap {
  1206. position: fixed;
  1207. bottom: .98rem;
  1208. height: 1.02rem;
  1209. line-height: 1.02rem;
  1210. padding-left: .27rem;
  1211. background: #fff;
  1212. width: 100%;
  1213. border-top: .02rem solid #ccc;
  1214. .fr {
  1215. .title {
  1216. font-size: .28rem;
  1217. margin-right: .13rem;
  1218. }
  1219. .price {
  1220. max-width: 3.6rem;
  1221. vertical-align: top;
  1222. span {
  1223. margin-right: .08rem;
  1224. }
  1225. margin-right: .13rem;
  1226. }
  1227. .buy-btn {
  1228. width: 2.08rem;
  1229. height: 1.02rem;
  1230. line-height: 1.02rem;
  1231. text-align: center;
  1232. font-size: .28rem;
  1233. color: #fff;
  1234. background: #3f84f6;
  1235. }
  1236. }
  1237. }
  1238. .cGoods-list {
  1239. background: #fff;
  1240. li {
  1241. padding: .3rem .32rem;
  1242. border-bottom: 1px solid #e4e4e4;
  1243. .fl {
  1244. .cg-param-line {
  1245. width: 3.65rem;
  1246. margin-bottom: .23rem;
  1247. &:last-child {
  1248. margin-bottom: 0;
  1249. }
  1250. font-size: .28rem;
  1251. span {
  1252. color: #666;
  1253. }
  1254. }
  1255. }
  1256. .fr {
  1257. text-align: right;
  1258. p {
  1259. width: 2.3rem;
  1260. }
  1261. .ol-price {
  1262. margin-top: .59rem;
  1263. }
  1264. .count {
  1265. color: #999;
  1266. font-size: .24rem;
  1267. margin-top: .32rem;
  1268. }
  1269. }
  1270. }
  1271. }
  1272. .delivery-rule-list {
  1273. li {
  1274. background: #fff;
  1275. text-align: left;
  1276. padding: 0 .31rem 0 .25rem;
  1277. height: .94rem;
  1278. line-height: .94rem;
  1279. .fr {
  1280. height: 100%;
  1281. .ol-price {
  1282. margin-left: .23rem;
  1283. }
  1284. }
  1285. }
  1286. }
  1287. .invoice-list {
  1288. background: #f1f3f7;
  1289. padding: .19rem 0;
  1290. li {
  1291. margin-bottom: .19rem;
  1292. position: relative;
  1293. &:last-child {
  1294. margin-bottom: 0;
  1295. }
  1296. background: #fff;
  1297. padding: .26rem .16rem .32rem .25rem;
  1298. .inv-head {
  1299. margin-left: .17rem;
  1300. max-width: 5.3rem;
  1301. }
  1302. .inv-type {
  1303. position: absolute;
  1304. right: 0;
  1305. top: 0;
  1306. height: .85rem;
  1307. }
  1308. .content-line {
  1309. margin-top: .23rem;
  1310. padding-left: .53rem;
  1311. .title {
  1312. width: 34%;
  1313. text-align: right;
  1314. vertical-align: top;
  1315. }
  1316. .content {
  1317. width: 66%;
  1318. word-break: break-all;
  1319. }
  1320. }
  1321. }
  1322. }
  1323. .addr-list-wrap {
  1324. background: #f1f3f7;
  1325. padding: .19rem 0;
  1326. }
  1327. .addr-list {
  1328. background: #f1f3f7;
  1329. li {
  1330. margin-bottom: .19rem;
  1331. position: relative;
  1332. &:last-child {
  1333. margin-bottom: 0;
  1334. }
  1335. background: #fff;
  1336. .info-wrap {
  1337. padding: .35rem .25rem .28rem;
  1338. }
  1339. .info-line {
  1340. font-size: .3rem;
  1341. color: #666;
  1342. .name {
  1343. margin: 0 .27rem 0 .17rem;
  1344. max-width: 1.5rem;
  1345. }
  1346. .tel {
  1347. max-width: 2.3rem;
  1348. }
  1349. i {
  1350. width: 1.08rem;
  1351. height: .25rem;
  1352. line-height: .25rem;
  1353. font-size: .24rem;
  1354. text-align: center;
  1355. border: 1px solid #fc2706;
  1356. border-radius: .04rem;
  1357. color: #f43938;
  1358. font-style: normal;
  1359. margin-left: .48rem;
  1360. }
  1361. }
  1362. p {
  1363. margin-top: .19rem;
  1364. word-break: break-all;
  1365. padding-left: .54rem;
  1366. font-size: .28rem;
  1367. color: #999;
  1368. }
  1369. &.active {
  1370. .info-line {
  1371. color: #f43938;
  1372. }
  1373. p {
  1374. color: #666;
  1375. }
  1376. }
  1377. .edit-addr-area {
  1378. border-top: 1px solid #d9d9d9;
  1379. .addr-btn {
  1380. width: 50%;
  1381. height: .8rem;
  1382. line-height: .8rem;
  1383. color: #333;
  1384. text-align: center;
  1385. i {
  1386. font-size: .34rem;
  1387. margin-right: .1rem;
  1388. }
  1389. &:first-child {
  1390. border-right: 1px solid #d9d9d9;
  1391. }
  1392. }
  1393. }
  1394. }
  1395. }
  1396. .add-addr-btn {
  1397. /*position: absolute;*/
  1398. /*bottom: .26rem;*/
  1399. /*left: .52rem;*/
  1400. width: 5.67rem;
  1401. text-align: center;
  1402. display: block;
  1403. margin: .26rem auto .07rem;
  1404. height: .77rem;
  1405. line-height: .77rem;
  1406. background: #3f84f6;
  1407. border-radius: .08rem;
  1408. color: #fff;
  1409. font-size: .32rem;
  1410. i {
  1411. margin-right: .08rem;
  1412. }
  1413. }
  1414. .takeself-list {
  1415. li {
  1416. .info-line {
  1417. .name {
  1418. max-width: 5.3rem;
  1419. }
  1420. }
  1421. }
  1422. }
  1423. .input-line {
  1424. $group-height: .4rem;
  1425. input {
  1426. width: .91rem;
  1427. height: $group-height;
  1428. border-top: 1px solid #ddd;
  1429. border-bottom: 1px solid #ddd;
  1430. vertical-align: middle;
  1431. border-radius: 0;
  1432. padding: 0 .05rem;
  1433. text-align: center;
  1434. line-height: $group-height;
  1435. /* position: relative;
  1436. top: .01rem;*/
  1437. }
  1438. span {
  1439. width: .35rem;
  1440. height: $group-height;
  1441. line-height: .38rem;
  1442. text-align: center;
  1443. border: 1px solid #ddd;
  1444. font-size: .24rem;
  1445. &:first-child {
  1446. border-top-left-radius: .05rem;
  1447. border-bottom-left-radius: .05rem;
  1448. }
  1449. &:last-child {
  1450. border-top-right-radius: .05rem;
  1451. border-bottom-right-radius: .05rem;
  1452. }
  1453. &.disab {
  1454. background: #e8e8e8;
  1455. }
  1456. }
  1457. }
  1458. }
  1459. </style>