_orderId.vue 45 KB

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