_orderId.vue 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630
  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. return this.$store.state.userCenter.list.invoice.data
  489. },
  490. // 已选择完的发票
  491. selectedInvoice () {
  492. return this.selectedInvoiceIndex > -1 ? this.invoiceData[this.selectedInvoiceIndex] : null
  493. },
  494. // // 选择中选中的发票
  495. // checkedInvoiceObj () {
  496. // return this.invoiceData.find(item => {
  497. // return item.$checked
  498. // })
  499. // },
  500. selectedAddress () {
  501. // console.log(this.addressData[this.selectedAddressIndex])
  502. return this.addressData[this.selectedAddressIndex] || {}
  503. },
  504. ruleParamsArr () {
  505. let arr = []
  506. this.orderData.forEach(item => {
  507. item.goodsPrice = this.getTotalPrice(item)
  508. arr.push({
  509. uuid: item.storeid,
  510. fare: this.getTotalPrice(item)
  511. })
  512. })
  513. return arr
  514. },
  515. allPriceNew () {
  516. let allOrderPrice = 0
  517. this.orderData.forEach((item, index) => {
  518. item.goodsPrice = this.baseUtils.priceFixed(this.getTotalPrice(item)) // 总价
  519. // 包含运费的价格
  520. // item.goodsFarePrice = this.baseUtils.priceFixed(item.goodsPrice + (item.fare && item.fare.fare ? item.fare.fare : 0))
  521. item.goodsFarePrice = item.goodsPrice
  522. // this.$set(item, 'goodsFarePrice', item.goodsPrice)
  523. allOrderPrice += item.goodsPrice
  524. })
  525. return allOrderPrice
  526. }
  527. // // 选择自提点的列表统计
  528. // showTakeSelfList () {
  529. // let arr = {}
  530. // if (!this.showDeliveryModal || !this.showTakeSelfModal) { // 为了触发更新
  531. // for (let attr in this.fareRule) {
  532. // arr[attr] = this.fareRule[attr][0] && this.fareRule[attr][0].method === 1303
  533. // }
  534. // }
  535. // return arr
  536. // }
  537. // defaultAddress () {
  538. // return this.addressData.find(item => {
  539. // return item.num === 1
  540. // })
  541. // }
  542. },
  543. created () {
  544. this.initOrderData()
  545. },
  546. methods: {
  547. // 失去焦点事件
  548. blurEvent (type, obj) {
  549. this.$refs.buyWrap.hidden = false
  550. this.$store.commit('option/SET_SHOW_MOBILE_FOOTER', true)
  551. this.$refs.numberInput.forEach((value) => {
  552. value.blur()
  553. })
  554. if (type && obj) {
  555. this.setGoods(type, obj)
  556. }
  557. },
  558. // 获得焦点事件
  559. focusEvent () {
  560. this.$refs.buyWrap.hidden = true
  561. this.$store.commit('option/SET_SHOW_MOBILE_FOOTER', false)
  562. },
  563. initOrderData () {
  564. this.payData.orderDetails.forEach(item => {
  565. item.goods = item.goodsHistory
  566. this.initGoodsStatus(item.goods, item.number)
  567. let current = this.orderData.find(objItem => {
  568. return objItem.storeid === item.storeid
  569. })
  570. if (!current) {
  571. this.orderData.push({
  572. storeName: item.storeName,
  573. storeid: item.storeid,
  574. supEnUU: item.supEnUU,
  575. goods: [item],
  576. $expand: false,
  577. goodsFarePrice: 0,
  578. goodsPrice: 0
  579. })
  580. } else {
  581. current.goods.push(item)
  582. }
  583. })
  584. this.getDeliveryRule()
  585. this.getTakeSelfInfo()
  586. },
  587. getDeliveryRule () {
  588. return this.$http.post(`/trade/distributionRule/usable/rule?area=${this.selectedAddress.area}`, this.ruleParamsArr)
  589. .then(res => {
  590. // this.fareRule = res.data || {}
  591. this.orderData.forEach(item => {
  592. this.fareRule[item.storeid] = [{
  593. fare: 0,
  594. uuid: item.storeid,
  595. ruleName: '卖家配送,全国包邮',
  596. method: 1302,
  597. currencyName: this.payData.currencyName
  598. }]
  599. })
  600. this.initFare()
  601. }, err => {
  602. this.setRemindText(err.response.data || '系统错误')
  603. })
  604. },
  605. getTakeSelfInfo () {
  606. return this.$http.post(`/trade/takeSelf/store/takeSelf`, this.ruleParamsArr)
  607. .then(res => {
  608. this.takeSelfData = res.data || {}
  609. }, err => {
  610. this.setRemindText(err.response.data || '系统错误')
  611. })
  612. },
  613. initFare () {
  614. this.allOrderPrice = 0
  615. this.orderData.forEach(item => {
  616. item.fare = this.fareRule[item.storeid] && this.fareRule[item.storeid].length ? this.fareRule[item.storeid][0] : {}
  617. item.goodsPrice = this.baseUtils.priceFixed(this.getTotalPrice(item)) // 总价
  618. // 包含运费的价格
  619. // item.goodsFarePrice = this.baseUtils.priceFixed(item.goodsPrice + (item.fare && item.fare.fare ? item.fare.fare : 0))
  620. item.goodsFarePrice = item.goodsPrice
  621. this.allOrderPrice += item.goodsFarePrice
  622. })
  623. },
  624. getTotalPrice (storeItem) {
  625. let price = 0
  626. storeItem.goods.forEach(item => {
  627. price += item.goods.currentPrice
  628. })
  629. return Number(price.toFixed(6))
  630. },
  631. getPoundage (item) {
  632. return this.baseUtils.priceFixed((item.goodsFarePrice || item.goodsPrice) * 0.00453)
  633. },
  634. linkSaler (item) {
  635. this.$http.get(`/basic/enterprise/${item.supEnUU}/info`).then(res => {
  636. this.currentStoreInfo = res.data
  637. this.showLink = true
  638. }, err => {
  639. this.setRemindText(err.response.data || '系统错误')
  640. console.log(err)
  641. })
  642. },
  643. showDetailList (goods) {
  644. this.currentGoods = goods
  645. this.showModal = true
  646. },
  647. goodsScroll (type) {
  648. console.log(type)
  649. },
  650. setRemindText: function (str) {
  651. this.remindText = str
  652. this.timeoutCount++
  653. },
  654. checkShowTakeSelf (item) {
  655. return item.fare && item.fare.method === 1303
  656. },
  657. // 显示配送规则弹框
  658. showRuleSet: function (storeid) {
  659. if (this.fareRule[storeid] && this.fareRule[storeid].length) {
  660. this.currentDeliveryStoreId = storeid
  661. this.clearCurrentDeliveryCheck()
  662. this.fareRule[this.currentDeliveryStoreId][0].$checked = true
  663. this.showDeliveryModal = true
  664. }
  665. // console.log(storeid)
  666. },
  667. clearCurrentDeliveryCheck () {
  668. this.fareRule[this.currentDeliveryStoreId].forEach(item => {
  669. if (!item.hasOwnProperty('$checked')) {
  670. this.$set(item, '$checked', false)
  671. } else {
  672. item.$checked = false
  673. }
  674. })
  675. },
  676. checkDelivery (cdr) {
  677. if (!cdr.$checked) {
  678. this.clearCurrentDeliveryCheck()
  679. cdr.$checked = true
  680. }
  681. },
  682. onDeliveryModalClose (isSubmit) {
  683. if (!isSubmit) {
  684. this.showDeliveryModal = false
  685. // this.currentDeliveryRule = {}
  686. } else {
  687. let currentDi = this.fareRule[this.currentDeliveryStoreId]
  688. for (let i = 0; i < currentDi.length; i++) {
  689. if (currentDi[i].$checked) {
  690. this.baseUtils.exchangeArr(currentDi, i, 0)
  691. break
  692. }
  693. }
  694. this.initFare()
  695. this.showDeliveryModal = false
  696. }
  697. },
  698. // 显示自提点弹框
  699. showTakeSelfSet (storeid) {
  700. if (this.takeSelfData[storeid] && this.takeSelfData[storeid].length) {
  701. this.currentTakeSelfStoreId = storeid
  702. this.showTakeSelfModal = true
  703. }
  704. },
  705. checkTakeSelf (index) {
  706. // for (let i = 0; i < this.takeSelfData[this.currentTakeSelfStoreId].length; i++) {
  707. // if (item.id === this.takeSelfData[this.currentTakeSelfStoreId][i].id) {
  708. //
  709. // break
  710. // }
  711. // }
  712. if (index > 0) {
  713. this.baseUtils.exchangeArr(this.takeSelfData[this.currentTakeSelfStoreId], index, 0)
  714. }
  715. this.showTakeSelfModal = false
  716. },
  717. setInvoiceCheck (index) {
  718. if (this.selectedInvoiceIndex === index) {
  719. return
  720. }
  721. this.selectedInvoiceIndex = index
  722. this.showInvoiceModal = false
  723. },
  724. openInvoiceModal () {
  725. if (this.invoiceData && this.invoiceData.length) {
  726. this.showInvoiceModal = true
  727. } else {
  728. this.showInvoiceModal = true
  729. this.showAddinvoice = true
  730. // this.setRemindText('暂无发票信息,请前往pc端维护')
  731. }
  732. },
  733. setAddressCheck (index) {
  734. if (this.selectedAddressIndex === index) {
  735. this.showAddrModal = false
  736. return
  737. }
  738. this.selectedAddressIndex = index
  739. this.showAddrModal = false
  740. this.getDeliveryRule()
  741. },
  742. openAddrModal () {
  743. this.showAddrModal = true
  744. if (!this.selectedAddress.id) {
  745. this.editAddr = true
  746. }
  747. },
  748. // 配送规则校验
  749. checkRule () {
  750. let flag = true
  751. for (let attr in this.fareRule) {
  752. if (!this.fareRule[attr].length) {
  753. flag = false
  754. }
  755. }
  756. return flag
  757. },
  758. // 收货地址校验
  759. checkAddress () {
  760. if (!this.selectedAddress || !this.selectedAddress.id) {
  761. this.setRemindText('请选择收货地址')
  762. return false
  763. } else if (this.selectedAddress.area.indexOf('香港') > -1) {
  764. if (this.payData.currency === 'RMB') {
  765. this.setRemindText('当前选择的币别是RMB,地址却是香港')
  766. return false
  767. }
  768. } else {
  769. if (this.payData.currency === 'USD') {
  770. this.setRemindText('当前选择的币别是USD,地址却是内陆')
  771. return false
  772. }
  773. }
  774. return true
  775. },
  776. // 提交订单流程
  777. confirmOrder () {
  778. if (this.accountInvalid) {
  779. this.setRemindText('您的账户安全等级较低,请先在pc端进行信息完善')
  780. } else {
  781. if (this.payData.status === 502 || this.payData.status === 503) {
  782. this.underLinePaySubmitted()
  783. } else {
  784. if (!this.checkRule()) {
  785. this.setRemindText('当前地址部分卖家无法配送,请重新选择地址或与卖家协商处理')
  786. } else {
  787. let infos = []
  788. let info = this.generateOrderInfo()
  789. if (info) {
  790. infos.push(info)
  791. this.doSubmit(infos)
  792. }
  793. }
  794. }
  795. }
  796. },
  797. // 待付款订单-线下付款
  798. underLinePaySubmitted () {
  799. let arr = []
  800. if (this.payData.orderids) {
  801. arr = this.payData.orderids.split(',')
  802. } else {
  803. arr.push(this.payData.orderid)
  804. }
  805. let param = {
  806. orderid: this.baseUtils.enidfilter(arr.join('-'))
  807. }
  808. // 跳转至付款页面
  809. console.log('订单已存在,直接跳转至付款页面')
  810. this.$router.push(`/mobile/center/user/doPay/${encodeURIComponent(param.orderid)}`)
  811. return param
  812. },
  813. // 处理订单数据
  814. generateOrderInfo () {
  815. let orderInfo = {
  816. id: this.payData.id,
  817. orderid: this.payData.orderid
  818. }
  819. if (this.payData.currency === 'USD' && this.selectedInvoiceIndex !== -1) {
  820. this.setRemindText('美元请选择暂不开票')
  821. return false
  822. }
  823. if (this.checkAddress()) {
  824. orderInfo.add_id = this.selectedAddress.id
  825. } else {
  826. return false
  827. }
  828. let submitParam = this.orderSubmitParams()
  829. // 发票信息
  830. if (this.selectedInvoice) {
  831. if (this.selectedInvoice.kind === 1205) {
  832. orderInfo.invoicetype = '1205'
  833. } else if (this.selectedInvoice.kind === 1206) {
  834. if (submitParam.includeConsignment) {
  835. this.setRemindText('订单中包含寄售类型商品,请选择专票')
  836. return false
  837. }
  838. orderInfo.invoicetype = '1206'
  839. }
  840. if (this.selectedInvoice.id) {
  841. orderInfo.invoiceid = this.selectedInvoice.id
  842. } else {
  843. this.setRemindText('请添加发票信息')
  844. return false
  845. }
  846. } else {
  847. orderInfo.invoicetype = '1207'
  848. }
  849. orderInfo.totalprice = submitParam.goodsPrice
  850. orderInfo.currency = this.payData.currency
  851. orderInfo.orderRemark = JSON.stringify(submitParam.remarkObj)
  852. // 1103线下 1102线上
  853. orderInfo.paytype = '1103'
  854. orderInfo.splitInfo = {
  855. ruleList: JSON.stringify(submitParam.ruleList)
  856. // takeList: JSON.stringify(submitParam.takeList)
  857. }
  858. orderInfo.orderDetails = this.convertOrderDetailParams()
  859. // console.log(orderInfo)
  860. return orderInfo
  861. // 人民币为专用增值税发票,美元不开发票 --1205专用增值税发票 --1206普通发票 --1207不开发票
  862. // 默认选择第三方配送 --1301第三方配送 --卖家配送 --1303上门自提
  863. },
  864. // 订单提交的参数整合
  865. orderSubmitParams () {
  866. let params = {
  867. // 不包含运费的价格
  868. goodsPrice: 0,
  869. // 备注
  870. remarkObj: {},
  871. // 配送方式
  872. ruleList: {},
  873. // // 自提点
  874. // takeList: {},
  875. // 是否包含寄售商品
  876. includeConsignment: false
  877. }
  878. this.orderData.forEach(item => {
  879. params.goodsPrice += item.goodsPrice
  880. params.remarkObj[item.storeid] = item.remark
  881. params.ruleList[item.storeid] = item.fare
  882. // params.takeList[item.storeid] = this.checkShowTakeSelf(item) && this.takeSelfData[item.storeid] ? [0] : null
  883. if (item.storeid === '33069557578d44e69bd91ad12d28a8d4') {
  884. params.includeConsignment = true
  885. }
  886. })
  887. return params
  888. },
  889. // 提取要提交到服务器的订单明细goods数据
  890. convertOrderDetailParams () {
  891. let orderDetails = []
  892. this.payData.orderDetails.forEach(item => {
  893. orderDetails.push({
  894. id: item.id,
  895. number: item.goods.purchaseNumber,
  896. taxUnitprice: item.taxUnitprice,
  897. remark: item.remark,
  898. goodsnumber: item.goodsnumber,
  899. storeid: item.storeid
  900. })
  901. })
  902. return orderDetails
  903. },
  904. // 提交订单请求
  905. doSubmit (orders) {
  906. this.$http.put(`/trade/order/${this.baseUtils.enidfilter(this.payData.orderid)}/ensure`, orders)
  907. .then(res => {
  908. console.log(res)
  909. if (res.data.code === 1) {
  910. if (res.data.data && res.data.data[0]) {
  911. let orderids = []
  912. let batchCodes = []
  913. for (let i = 0; i < res.data.data.length; i++) {
  914. orderids.push(res.data.data[i].orderid)
  915. for (let j = 0; j < res.data.data[i].orderDetails.length; j++) {
  916. batchCodes.push(res.data.data[i].orderDetails[j].batchCode)
  917. }
  918. }
  919. // 如果不是立即购买,删除购物车里的对应信息
  920. if (!this.payData.buyNow) {
  921. this.$http.put('/trade/cart/delete', batchCodes)
  922. }
  923. // 跳转至订单提交完成页面
  924. console.log('订单提交完成,跳转至结果页')
  925. this.$router.push(`/mobile/center/user/doPay/${encodeURIComponent(this.baseUtils.enidfilter(orderids.join('-')))}`)
  926. }
  927. } else {
  928. if (res.data.data.code === 6) {
  929. this.setRemindText(res.data.message + ',请刷新界面之后重新操作')
  930. } else if (res.data.data.code === 7) {
  931. this.setRemindText(res.data.message + ',将为您跳转到购物车界面')
  932. setTimeout(() => {
  933. this.$router.push('/mobile/center/user/cart')
  934. }, 1500)
  935. } else {
  936. this.setRemindText(res.data.message)
  937. }
  938. }
  939. }, err => {
  940. console.log(err)
  941. this.setRemindText(err.response.data || '提交订单失败')
  942. })
  943. },
  944. reloadAddress () {
  945. this.$store.dispatch('userCenter/loadAcceptAddress', {send: false})
  946. },
  947. editClick (obj) {
  948. if (obj.id) {
  949. this.reloadAddress()
  950. }
  951. this.editAddr = false
  952. },
  953. addAddress (item) {
  954. if (!item) {
  955. this.currentAddress = {}
  956. } else {
  957. this.currentAddress = item
  958. }
  959. this.editAddr = true
  960. },
  961. deleteAddress (item) {
  962. this.$http.put(`/trade/address/delete/${item.id}`).then(res => {
  963. this.setRemindText('删除成功')
  964. this.reloadAddress()
  965. }, err => {
  966. this.setRemindText(err.response.data || '删除失败,系统错误')
  967. })
  968. },
  969. reloadInvoice () {
  970. this.$store.dispatch('userCenter/loadPayInvoice')
  971. },
  972. async addinvoiceFn(ty, item) {
  973. this.showAddinvoice = false
  974. if (ty) {
  975. this.reloadInvoice()
  976. }
  977. },
  978. updateInvoice(item, index) {
  979. this.joinType = 'update'
  980. this.chooseItem = this.baseUtils.deepCopy(item)
  981. this.$kind = 0
  982. this.showAddinvoice = true
  983. },
  984. addInvoiceNew() {
  985. this.joinType = 'add'
  986. this.$kind = this.invoiceData.length > 0 ? this.invoiceData[0].kind : 0
  987. this.chooseItem = {}
  988. this.showAddinvoice = true
  989. },
  990. deleteFn(item) {
  991. this.$http.delete(`/trade/bill/delete/${item.id}`).then(res => {
  992. this.setRemindText('删除成功')
  993. this.reloadInvoice()
  994. })
  995. }
  996. }
  997. }
  998. </script>
  999. <style lang="scss" scoped>
  1000. $red-text: #f43938;
  1001. .mobile-pay {
  1002. margin-bottom: 2.02rem;
  1003. .pay-head {
  1004. height: 1.3rem;
  1005. padding: .25rem 0 0 .21rem;
  1006. position: relative;
  1007. border-bottom: .18rem solid #f1f3f7;
  1008. background: url('/images/mobile/center/user/addr-border.png') no-repeat;
  1009. background-size: contain;
  1010. background-position: bottom;
  1011. .info {
  1012. padding-left: .43rem;
  1013. font-size: .3rem;
  1014. font-weight: bold;
  1015. }
  1016. .addr {
  1017. width: 6.5rem;
  1018. overflow: hidden;
  1019. text-overflow: ellipsis;
  1020. white-space: nowrap;
  1021. img {
  1022. height: .29rem;
  1023. margin-right: .16rem;
  1024. }
  1025. span {
  1026. font-size: .26rem;
  1027. }
  1028. }
  1029. .icon-xiangyou {
  1030. position: absolute;
  1031. right: .21rem;
  1032. top: .52rem;
  1033. color: #bebebe;
  1034. }
  1035. .no-addr {
  1036. margin-top: .15rem;
  1037. text-align: center;
  1038. padding-right: .21rem;
  1039. }
  1040. }
  1041. .pay-store-list {
  1042. .ps-item {
  1043. border-bottom: .18rem solid #f1f3f7;
  1044. .ps-store-name {
  1045. height: .89rem;
  1046. line-height: .89rem;
  1047. padding: 0 .25rem;
  1048. font-size: .28rem;
  1049. text-align: left;
  1050. .seller-name {
  1051. max-width: 5rem;
  1052. position: relative;
  1053. padding-right: .2rem;
  1054. span {
  1055. color: #666;
  1056. }
  1057. i {
  1058. position: absolute;
  1059. right: 0;
  1060. font-size: .32rem;
  1061. color: #bebebe;
  1062. }
  1063. }
  1064. }
  1065. .ps-goods-info {
  1066. border-top: 1px solid #e4e4e4;
  1067. border-bottom: 1px solid #e4e4e4;
  1068. .ps-goods-list {
  1069. background: #f9f9f8;
  1070. height: 100%;
  1071. li {
  1072. border-bottom: 1px solid #e4e4e4;
  1073. width: 100%;
  1074. .fl {
  1075. margin-right: .23rem;
  1076. width: 3.49rem;
  1077. }
  1078. .fr {
  1079. width: 3.2rem;
  1080. .ol-price {
  1081. font-size: .26rem;
  1082. }
  1083. }
  1084. .ps-goods-item {
  1085. font-size: .28rem;
  1086. > span {
  1087. color: #666;
  1088. }
  1089. }
  1090. .single-count {
  1091. height: .61rem;
  1092. line-height: .61rem;
  1093. background: #ebebeb;
  1094. font-size: .28rem;
  1095. color: #666;
  1096. text-align: right;
  1097. padding: 0 .21rem 0 .25rem;
  1098. .ol-price {
  1099. width: 2.1rem;
  1100. font-size: .26rem;
  1101. }
  1102. }
  1103. }
  1104. }
  1105. .show-more-psgoods {
  1106. height: .67rem;
  1107. line-height: .67rem;
  1108. font-size: .24rem;
  1109. color: #999;
  1110. text-align: center;
  1111. i {
  1112. font-size: .24rem;
  1113. color: #999;
  1114. }
  1115. }
  1116. }
  1117. }
  1118. }
  1119. .pay-price-title {
  1120. /*float: left;*/
  1121. font-size: .3rem;
  1122. }
  1123. .ps-operate-line {
  1124. height: .89rem;
  1125. line-height: .89rem;
  1126. padding: 0 .21rem 0 .25rem;
  1127. border-bottom: 1px solid #e4e4e4;
  1128. font-size: .28rem;
  1129. .fr {
  1130. height: 100%;
  1131. .inline-block {
  1132. line-height: normal;
  1133. text-align: right;
  1134. span {
  1135. color: #666;
  1136. /* &:first-child {
  1137. color: #333;
  1138. font-weight: bold;
  1139. display: block;
  1140. }*/
  1141. &.red {
  1142. color: $red-text;
  1143. }
  1144. }
  1145. }
  1146. .delivery-select {
  1147. width: 1.54rem;
  1148. height: .5rem;
  1149. line-height: .5rem;
  1150. text-align: center;
  1151. border: 1px solid #a1a1a1;
  1152. color: #999;
  1153. background: url('/images/mobile/center/user/delivery.png') no-repeat;
  1154. background-size: .2rem .2rem;
  1155. background-position: 1.3rem .25rem;
  1156. border-radius: .03rem;
  1157. margin-left: .56rem;
  1158. &:first-child {
  1159. margin-left: 0;
  1160. }
  1161. &.active {
  1162. background: url('/images/mobile/center/user/delivery-active.png') no-repeat;
  1163. background-size: .2rem .2rem;
  1164. background-position: 1.3rem .25rem;
  1165. color: #3e85f7;
  1166. border-color: #3e85f7;
  1167. }
  1168. }
  1169. i {
  1170. color: #bebebe;
  1171. margin-left: .14rem;
  1172. }
  1173. }
  1174. input {
  1175. width: 4.78rem;
  1176. margin-left: .68rem;
  1177. padding: 0 .1rem;
  1178. height: .45rem;
  1179. }
  1180. &.ps-price {
  1181. text-align: right;
  1182. /*padding-right: .31rem;*/
  1183. .inline-block {
  1184. display: inline-block;
  1185. width: 1.1rem;
  1186. font-size: .26rem;
  1187. text-align: right;
  1188. }
  1189. }
  1190. &.ps-fare {
  1191. line-height: .43rem;
  1192. font-size: .24rem;
  1193. .text-ellipse {
  1194. text-align: right;
  1195. color: #333;
  1196. .ol-price {
  1197. display: inline-block;
  1198. width: 2.3rem;
  1199. text-align: left;
  1200. font-size: .26rem;
  1201. span {
  1202. font-size: .26rem;
  1203. }
  1204. }
  1205. .pay-price-title {
  1206. display: inline-block;
  1207. width: 1.1rem;
  1208. font-size: .24rem;
  1209. text-align: right;
  1210. }
  1211. .fare {
  1212. text-decoration: line-through;
  1213. color: #666!important;
  1214. }
  1215. i {
  1216. font-size: .38rem;
  1217. color: #adacac;
  1218. }
  1219. .tag {
  1220. height: .35rem;
  1221. line-height: .35rem;
  1222. width: .58rem;
  1223. font-size: .22rem;
  1224. color: #fff;
  1225. background: #15b262;
  1226. border-radius: .02rem;
  1227. text-align: center;
  1228. margin-left: .14rem;
  1229. margin-right: .06rem;
  1230. position: relative;
  1231. top: -.06rem;
  1232. }
  1233. }
  1234. }
  1235. &.ps-address {
  1236. height: auto;
  1237. line-height: unset;
  1238. padding: .25rem 0;
  1239. position: relative;
  1240. padding-left: .21rem;
  1241. border-bottom: .11rem solid #f1f3f7;
  1242. > div {
  1243. width: 6.76rem;
  1244. padding-right: .26rem;
  1245. p {
  1246. font-size: .28rem;
  1247. }
  1248. }
  1249. i {
  1250. color: #bebebe;
  1251. }
  1252. .addr {
  1253. margin-bottom: .33rem;
  1254. .area {
  1255. width: 5rem;
  1256. word-break: break-all;
  1257. padding-left: .2rem;
  1258. }
  1259. }
  1260. .info {
  1261. .info-name {
  1262. margin-right: .46rem;
  1263. }
  1264. .info-phone {
  1265. margin-left: .5rem;
  1266. }
  1267. }
  1268. .no-addr {
  1269. text-align: center;
  1270. }
  1271. }
  1272. &.pay-operate {
  1273. border-bottom: .11rem solid #f1f3f7;
  1274. padding-top: 0;
  1275. .fr {
  1276. line-height: .78rem;
  1277. i {
  1278. position: static;
  1279. }
  1280. span {
  1281. color: #333;
  1282. font-size: .28rem;
  1283. i {
  1284. width: .23rem;
  1285. height: .23rem;
  1286. background: #bfbfbf;
  1287. display: inline-block;
  1288. border-radius: .04rem;
  1289. margin-right: .16rem;
  1290. }
  1291. &.active {
  1292. i {
  1293. background: #09a823;
  1294. }
  1295. }
  1296. &:first-child {
  1297. margin-right: 2.3rem;
  1298. }
  1299. }
  1300. }
  1301. }
  1302. &.pay-invoice {
  1303. border-bottom: .11rem solid #f1f3f7;
  1304. .fr {
  1305. font-size: .28rem;
  1306. i {
  1307. float: right;
  1308. }
  1309. p {
  1310. position: relative;
  1311. bottom: 0;
  1312. }
  1313. .inv-head {
  1314. max-width: 4rem;
  1315. }
  1316. .inv-type {
  1317. font-size: .24rem;
  1318. color: #999;
  1319. }
  1320. }
  1321. }
  1322. &.ps-operate-takeself {
  1323. height: 1.35rem;
  1324. line-height: 1.35rem;
  1325. .fr {
  1326. span {
  1327. display: block;
  1328. max-width: 5.5rem;
  1329. overflow: hidden;
  1330. text-overflow: ellipsis;
  1331. white-space: nowrap;
  1332. }
  1333. }
  1334. }
  1335. }
  1336. .ol-price {
  1337. display: inline-block;
  1338. width: 2.25rem;
  1339. color: #f43938 !important;
  1340. font-size: .32rem;
  1341. text-align: left;
  1342. span {
  1343. font-size: .26rem;
  1344. }
  1345. }
  1346. .buy-wrap {
  1347. position: fixed;
  1348. bottom: .98rem;
  1349. height: 1.02rem;
  1350. line-height: 1.02rem;
  1351. padding-left: .27rem;
  1352. background: #fff;
  1353. width: 100%;
  1354. border-top: .02rem solid #ccc;
  1355. .fr {
  1356. .title {
  1357. font-size: .28rem;
  1358. margin-right: .13rem;
  1359. }
  1360. .price {
  1361. max-width: 3.6rem;
  1362. width: auto;
  1363. vertical-align: top;
  1364. span {
  1365. margin-right: .08rem;
  1366. }
  1367. margin-right: .13rem;
  1368. }
  1369. .buy-btn {
  1370. width: 2.08rem;
  1371. height: 1.04rem;
  1372. line-height: 1.04rem;
  1373. vertical-align: middle;
  1374. text-align: center;
  1375. font-size: .28rem;
  1376. color: #fff;
  1377. background: #3f84f6;
  1378. }
  1379. }
  1380. }
  1381. .cGoods-list {
  1382. background: #fff;
  1383. li {
  1384. padding: .3rem .32rem;
  1385. border-bottom: 1px solid #e4e4e4;
  1386. .fl {
  1387. .cg-param-line {
  1388. width: 3.65rem;
  1389. margin-bottom: .23rem;
  1390. &:last-child {
  1391. margin-bottom: 0;
  1392. }
  1393. font-size: .28rem;
  1394. span {
  1395. color: #666;
  1396. }
  1397. }
  1398. }
  1399. .fr {
  1400. text-align: right;
  1401. p {
  1402. width: 2.3rem;
  1403. }
  1404. .ol-price {
  1405. margin-top: .59rem;
  1406. }
  1407. .count {
  1408. color: #999;
  1409. font-size: .24rem;
  1410. margin-top: .32rem;
  1411. }
  1412. }
  1413. }
  1414. }
  1415. .delivery-rule-list {
  1416. li {
  1417. background: #fff;
  1418. text-align: left;
  1419. padding: 0 .31rem 0 .25rem;
  1420. height: .94rem;
  1421. line-height: .94rem;
  1422. .fr {
  1423. height: 100%;
  1424. .ol-price {
  1425. margin-left: .23rem;
  1426. }
  1427. }
  1428. }
  1429. }
  1430. .invoice-list {
  1431. background: #f1f3f7;
  1432. padding: .19rem 0;
  1433. li {
  1434. margin-bottom: .19rem;
  1435. position: relative;
  1436. &:last-child {
  1437. margin-bottom: 0;
  1438. }
  1439. background: #fff;
  1440. .inv-head {
  1441. margin-left: .17rem;
  1442. max-width: 5.3rem;
  1443. }
  1444. .inv-content {
  1445. padding: .26rem .16rem .32rem .25rem;
  1446. }
  1447. .inv-type {
  1448. position: absolute;
  1449. right: 0;
  1450. top: 0;
  1451. height: .85rem;
  1452. }
  1453. .content-line {
  1454. margin-top: .23rem;
  1455. padding-left: .53rem;
  1456. .title {
  1457. width: 34%;
  1458. text-align: right;
  1459. vertical-align: top;
  1460. }
  1461. .content {
  1462. width: 66%;
  1463. word-break: break-all;
  1464. }
  1465. }
  1466. }
  1467. }
  1468. .addr-list-wrap {
  1469. background: #f1f3f7;
  1470. padding: .19rem 0;
  1471. }
  1472. .addr-list {
  1473. background: #f1f3f7;
  1474. li {
  1475. margin-bottom: .19rem;
  1476. position: relative;
  1477. &:last-child {
  1478. margin-bottom: 0;
  1479. }
  1480. background: #fff;
  1481. .info-wrap {
  1482. padding: .35rem .25rem .28rem;
  1483. }
  1484. .info-line {
  1485. font-size: .3rem;
  1486. color: #666;
  1487. .name {
  1488. margin: 0 .27rem 0 .17rem;
  1489. max-width: 1.5rem;
  1490. }
  1491. .tel {
  1492. max-width: 2.3rem;
  1493. }
  1494. i {
  1495. width: 1.08rem;
  1496. height: .25rem;
  1497. line-height: .25rem;
  1498. font-size: .24rem;
  1499. text-align: center;
  1500. border: 1px solid #fc2706;
  1501. border-radius: .04rem;
  1502. color: #f43938;
  1503. font-style: normal;
  1504. margin-left: .48rem;
  1505. }
  1506. }
  1507. p {
  1508. margin-top: .19rem;
  1509. word-break: break-all;
  1510. padding-left: .54rem;
  1511. font-size: .28rem;
  1512. color: #999;
  1513. }
  1514. &.active {
  1515. .info-line {
  1516. color: #f43938;
  1517. }
  1518. p {
  1519. color: #666;
  1520. }
  1521. }
  1522. }
  1523. }
  1524. .edit-addr-area {
  1525. border-top: 1px solid #d9d9d9;
  1526. .addr-btn {
  1527. width: 50%;
  1528. height: .8rem;
  1529. line-height: .8rem;
  1530. color: #333;
  1531. text-align: center;
  1532. i {
  1533. font-size: .34rem;
  1534. margin-right: .1rem;
  1535. }
  1536. &:first-child {
  1537. border-right: 1px solid #d9d9d9;
  1538. }
  1539. }
  1540. }
  1541. .add-addr-btn {
  1542. /*position: absolute;*/
  1543. /*bottom: .26rem;*/
  1544. /*left: .52rem;*/
  1545. width: 5.67rem;
  1546. text-align: center;
  1547. display: block;
  1548. margin: .26rem auto .07rem;
  1549. height: .77rem;
  1550. line-height: .77rem;
  1551. background: #3f84f6;
  1552. border-radius: .08rem;
  1553. color: #fff;
  1554. font-size: .32rem;
  1555. i {
  1556. margin-right: .08rem;
  1557. }
  1558. }
  1559. .inv-btn {
  1560. background: #f1f3f7;
  1561. padding-top: .26rem;
  1562. .add-addr-btn {
  1563. margin-top: 0;
  1564. }
  1565. }
  1566. .takeself-list {
  1567. li {
  1568. .info-line {
  1569. .name {
  1570. max-width: 5.3rem;
  1571. }
  1572. }
  1573. }
  1574. }
  1575. .input-line {
  1576. $group-height: .4rem;
  1577. input {
  1578. width: .91rem;
  1579. height: $group-height;
  1580. border-top: 1px solid #ddd;
  1581. border-bottom: 1px solid #ddd;
  1582. vertical-align: middle;
  1583. border-radius: 0;
  1584. padding: 0 .05rem;
  1585. text-align: center;
  1586. line-height: $group-height;
  1587. /* position: relative;
  1588. top: .01rem;*/
  1589. }
  1590. span {
  1591. width: .35rem;
  1592. height: $group-height;
  1593. line-height: .38rem;
  1594. text-align: center;
  1595. border: 1px solid #ddd;
  1596. font-size: .24rem;
  1597. &:first-child {
  1598. border-top-left-radius: .05rem;
  1599. border-bottom-left-radius: .05rem;
  1600. }
  1601. &:last-child {
  1602. border-top-right-radius: .05rem;
  1603. border-bottom-right-radius: .05rem;
  1604. }
  1605. &.disab {
  1606. background: #e8e8e8;
  1607. }
  1608. }
  1609. }
  1610. }
  1611. .addr-modal {
  1612. .addr-modal-wrapper {
  1613. top: 1.5rem;
  1614. bottom: 1.5rem;
  1615. left: .2rem;
  1616. right: .2rem;
  1617. background: #fff;
  1618. }
  1619. }
  1620. </style>