_orderId.vue 52 KB

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