_orderId.vue 56 KB

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