CommodityInfo.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. <template>
  2. <div>
  3. <div class="menu-com row">
  4. <div class="menu-title col-md-12">
  5. <nuxt-link to="/">商城首页</nuxt-link> >
  6. <nuxt-link to="/provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</nuxt-link>
  7. <nuxt-link to="/provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</nuxt-link>
  8. <nuxt-link :to="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</nuxt-link>
  9. >
  10. <span v-if="storeInfo.type != 'CONSIGNMENT'"><nuxt-link :to="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">storeInfo.storeName</nuxt-link>> </span>
  11. <span>产品详情</span>
  12. </div>
  13. </div>
  14. <div id="commodity-info-fragment">
  15. <div class="commodity-detail">
  16. <div class="img">
  17. <img src="/images/floor/specificPrice-store.png" alt="" class="specific-price" v-if="isConsignment && isSpecificPriceTag(commodity.tag)">
  18. <img :src="commodity.img || '/images/store/common/default.png'" style="width: 256px;height: 256px;"/>
  19. <div class="box">
  20. <img v-if="commodity.status === 602" src="/images/store/isSellOut.png" alt="">
  21. </div>
  22. </div>
  23. <div class="content">
  24. <div class="code">
  25. <span v-text="commodity.code"></span>
  26. </div>
  27. <div class="commodity-info-detail">
  28. <div class="com-info">
  29. <span class="name">价&nbsp;格</span>:
  30. <span class="money">
  31. <span v-if="fragment.currency == 'RMB'">¥</span>
  32. <span v-if="fragment.currency == 'USD'">$</span>
  33. <span>{{fragment.price | currency}}</span>
  34. </span>
  35. </div>
  36. <div class="com-info">
  37. <span class="name">品&nbsp;牌</span>:<span v-text="commodity.brandNameEn"></span>
  38. </div>
  39. <div class="com-info">
  40. <span class="name no-letter">物料名称(类目)</span>:<span v-text="commodity.kindNameCn || '无物料名称(类目)信息'"></span>
  41. </div>
  42. <div class="com-info">
  43. <span class="name">规&nbsp;格</span>:<span v-text="commodity.spec || '无规格信息'"></span>
  44. </div>
  45. <div class="com-info">
  46. <span class="name">下&nbsp;载</span>:<a @click="toAttach(component.attach)" v-if="component.attach">规格书</a><span v-if="!component.attach">暂无信息</span>
  47. </div>
  48. <div class="com-info">
  49. <span class="name">包&nbsp;装</span>:<span v-text="commodity.packaging || '无包装信息'"></span>
  50. </div>
  51. <div class="com-info">
  52. <span class="name" style="letter-spacing: 1.5px;">最小包装数</span>:<span v-text="commodity.minPackQty || '无最小包装数信息'"></span>
  53. </div>
  54. <div class="com-info">
  55. <span class="name">库&nbsp;存</span>:<span v-text="commodity.reserve || 0"></span><em style="margin-left: 3px;">PCS</em>
  56. (<span v-text="commodity.minBuyQty || 1"></span>个起订)
  57. <span :class="commodity.breakUp?'div-sell can-div-sell':'div-sell not-div-sell'" v-if="commodity.breakUp">可拆卖</span>
  58. </div>
  59. <div class="com-info">
  60. <span class="name">交&nbsp;期</span>:
  61. <div class="delivery">
  62. <span v-text="commodity.b2cMinDelivery || 0"></span>
  63. <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">-</span>
  64. <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery" v-text="commodity.b2cMaxDelivery || 0"></span>
  65. <span>(天)</span>
  66. </div>
  67. </div>
  68. <div class="com-info form-inline" v-if="commodity.status !== 602 && commodity.status !== 612">
  69. <span class="name">数&nbsp;量</span>:
  70. <div class="input-group" style="width: 120px">
  71. <div :class="fragment.canSub ? ' input-group-addon operate':'input-group-addon'" @click="fragment.canSub ?subNum():''" :style="!fragment.canSub ?'cursor: not-allowed;':''">-</div>
  72. <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()" @input="onInput()" style="padding: 0;min-width: 100px;text-align: center;"/>
  73. <div :class="fragment.canAdd ?'input-group-addon operate':'input-group-addon'" @click="fragment.canAdd ?addNum():''" :style="!fragment.canAdd ?'cursor: not-allowed;':''">+</div>
  74. <!-- <div class="input-group-addon operate" @click="subNum()">-</div>
  75. <input type="text" class="form-control" placeholder="数量" v-model="fragment.num" @change="inputNum()"style="padding: 0;min-width: 100px;text-align: center;"/>
  76. <div class="input-group-addon operate" @click="addNum()">+</div>-->
  77. </div>
  78. ×
  79. <!--<div class="select">
  80. <select class="form-control" :disabled="commodity.currencyName != 'RMB-USD'" v-model="fragment.currency" @change="changeCurrency()">
  81. <option value="RMB">RMB</option>
  82. <option value="USD">USD</option>
  83. </select>
  84. </div>-->
  85. <div class="select">
  86. <span v-if="fragment.currency == 'RMB'">¥</span>
  87. <span v-if="fragment.currency == 'USD'">$</span>
  88. <span>{{(fragment.price || 0) | currency}}</span>
  89. <span v-if="fragment.currency == 'RMB'" class="tax"> ( 含税 ) </span>
  90. </div>
  91. <span class="money">
  92. <span v-if="fragment.currency == 'RMB'">¥</span>
  93. <span v-if="fragment.currency == 'USD'">$</span>
  94. <span>{{calculate | currencyShort}}</span>
  95. </span>
  96. </div>
  97. <div class="button" v-if="commodity.status !== 602 && commodity.status !== 612">
  98. <button class="btn btn-default btn-primary" @click="buyNow(false, commodity)">加入购物车</button>
  99. <button class="btn btn-default btn-now" @click="buyNow(true, commodity)">立即购买</button>
  100. </div>
  101. <div class="warn-area" v-if="commodity.status === 602 || commodity.status === 612" v-text="commodity.status === 602 ? '此产品已售罄':'此产品已下架'"></div>
  102. </div>
  103. <div class="price-block">
  104. <div class="commodity-price">
  105. <div class="title">价格梯度</div>
  106. <div class="table">
  107. <div class="head">
  108. <div class="fragment">梯度/pcs</div>
  109. <div class="price" v-if="commodity.currencyName == 'RMB'">单价¥(含税)</div>
  110. <div class="price" v-if="commodity.currencyName == 'USD'">单价$</div>
  111. </div>
  112. <ul class="list-unstyled list-inline">
  113. <li v-for="price in commodity.prices">
  114. <div class="fragment">
  115. <span v-text="price.start"></span>+
  116. </div>
  117. <div class="price" v-if="commodity.currencyName == 'RMB'">
  118. <span v-if="price.rMBPrice">{{price.rMBPrice || 0 | currency}}</span>
  119. </div>
  120. <div class="price" v-if="commodity.currencyName == 'USD'">
  121. <span v-if="price.uSDPrice">{{price.uSDPrice || 0 | currency}}</span>
  122. </div>
  123. </li>
  124. </ul>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </template>
  133. <script>
  134. function initFragment (commodity) {
  135. if (!commodity) {
  136. return {}
  137. }
  138. let fragment = {}
  139. let prices = commodity.prices[0]
  140. fragment.num = commodity.minBuyQty
  141. fragment.prices = prices
  142. if (commodity.currencyName !== 'USD') {
  143. fragment.currency = 'RMB'
  144. } else {
  145. fragment.currency = 'USD'
  146. }
  147. if (fragment.currency !== 'USD') {
  148. fragment.price = prices.rMBPrice
  149. } else {
  150. fragment.price = prices.uSDPrice
  151. }
  152. fragment.canAdd = true
  153. fragment.canSub = false
  154. return fragment
  155. }
  156. function getFragment (commodity, fragment) {
  157. // 判断是否小于第一分段的起订量
  158. if (commodity.prices[0].start > fragment.num) {
  159. fragment.num = commodity.prices[0].start
  160. }
  161. // 获取分段的信息
  162. let prices = commodity.prices
  163. for (let i = 0; i < prices.length; i++) {
  164. if (fragment.num <= prices[i].end) {
  165. fragment.prices = prices[i]
  166. break
  167. }
  168. }
  169. }
  170. export default {
  171. name: 'commodity-info',
  172. data () {
  173. return {
  174. fragment: {
  175. currency: 'RMB',
  176. num: 0,
  177. price: 0,
  178. canAdd: true,
  179. canSub: true}
  180. }
  181. },
  182. watch: {
  183. fragment: function (val, oldVal) {
  184. }
  185. },
  186. filters: {
  187. currencyShort: function (num) {
  188. if (typeof num === 'number' && num > 0) {
  189. if (num <= 0.01) {
  190. num = 0.01
  191. } else {
  192. if (num.toString().indexOf('.') === -1) {
  193. num += '.00'
  194. } else {
  195. let inputStr = num.toString()
  196. let arr = inputStr.split('.')
  197. let floatNum = arr[1]
  198. if (floatNum && arr[0]) {
  199. if (floatNum.length > 2) {
  200. num = inputStr.substring(0, arr[0].length + 3)
  201. if (Number(floatNum.charAt(2)) >= 1) {
  202. num = (Math.ceil(Number(num) * 100) + 1) / 100
  203. let inputStr1 = num.toString()
  204. let arr1 = inputStr1.split('.')
  205. let floatNum1 = arr1[1]
  206. if (num.toString().indexOf('.') === -1) {
  207. num += '.00'
  208. }
  209. if (floatNum1 && floatNum1.length === 1) {
  210. num = num + '0'
  211. }
  212. }
  213. } else if (floatNum.length === 1) {
  214. num = num + '0'
  215. }
  216. }
  217. }
  218. }
  219. }
  220. return num
  221. },
  222. currency: function (num) {
  223. if (typeof num === 'number' && num > 0) {
  224. if (num <= 0.000001) {
  225. num = 0.000001
  226. } else {
  227. if (num.toString().indexOf('.') === -1) {
  228. num += '.00'
  229. } else {
  230. let inputStr = num.toString()
  231. let arr = inputStr.split('.')
  232. let floatNum = arr[1]
  233. if (floatNum && arr[0]) {
  234. if (floatNum.length > 6) {
  235. num = inputStr.substring(0, arr[0].length + 7)
  236. if (Number(floatNum.charAt(6)) > 4) {
  237. num = (Number(num) * 1000000 + 1) / 1000000
  238. }
  239. } else if (floatNum.length === 1) {
  240. num = num + '0'
  241. }
  242. }
  243. }
  244. }
  245. }
  246. return num
  247. }
  248. },
  249. computed: {
  250. storeInfo () {
  251. return this.$store.state.shop.storeInfo.store.data
  252. },
  253. commodity () {
  254. let commodity = this.$store.state.shop.storeInfo.commodity.data
  255. this.fragment = initFragment(commodity)
  256. return commodity
  257. },
  258. component () {
  259. return this.$store.state.shop.storeInfo.component.data
  260. },
  261. calculate () {
  262. this.fragment.total = this.fragment.price * Math.pow(10, 6) * this.fragment.num
  263. return Math.ceil(this.fragment.total) / Math.pow(10, 6)
  264. },
  265. user () {
  266. return this.$store.state.option.user
  267. },
  268. isConsignment () {
  269. return this.storeInfo.type === 'CONSIGNMENT'
  270. }
  271. },
  272. mounted () {
  273. this.$nextTick(() => {
  274. this.loadSaveHistory()
  275. })
  276. },
  277. methods: {
  278. isSpecificPriceTag: function (tag) {
  279. return tag && tag.indexOf('特价') !== -1
  280. },
  281. onInput () {
  282. let prices = this.commodity.prices
  283. if (prices && prices.length) {
  284. let _this = this
  285. for (let i = 0; i < prices.length; i++) {
  286. if (_this.fragment.num >= prices[i].start && _this.fragment.num <= prices[i].end) {
  287. _this.fragment.price = _this.fragment.currency === 'RMB' ? prices[i].rMBPrice : prices[i].uSDPrice
  288. break
  289. }
  290. }
  291. }
  292. },
  293. loadSaveHistory () {
  294. if (this.user.logged) {
  295. this.$store.dispatch('shop/saveHistory', {id: this.commodity.batchCode})
  296. }
  297. },
  298. changeCurrency () {
  299. if (this.fragment.currency === 'RMB') {
  300. this.fragment.price = this.fragment.prices.rMBPrice
  301. } else if (this.fragment.currency === 'USD') {
  302. this.fragment.price = this.fragment.prices.uSDPrice
  303. }
  304. },
  305. changeNum: function (newNum) {
  306. let pack = this.commodity.perQty || this.commodity.minPackQty
  307. let buy = this.commodity.minBuyQty
  308. let reserve = this.commodity.reserve
  309. let breakUp = this.commodity.breakUp
  310. if (!newNum) {
  311. this.fragment.num = buy
  312. } else {
  313. newNum = parseInt(newNum)
  314. if (breakUp) {
  315. if (newNum < buy) {
  316. this.$message.error('最小起订量为' + buy)
  317. this.fragment.num = buy
  318. this.fragment.canSub = false
  319. this.fragment.canAdd = true
  320. } else if (newNum > reserve) {
  321. this.$message.error('库存不足')
  322. this.fragment.num = reserve
  323. this.fragment.canAdd = false
  324. this.fragment.canSub = true
  325. } else {
  326. this.fragment.canSub = true
  327. this.fragment.canAdd = true
  328. this.fragment.num = newNum
  329. newNum === buy && (this.fragment.canSub = false)
  330. newNum === reserve && (this.fragment.canAdd = false)
  331. }
  332. } else {
  333. if (newNum < buy) {
  334. this.$message.error('最小起订量为' + buy)
  335. this.fragment.num = buy
  336. this.fragment.canSub = false
  337. if (newNum > reserve) {
  338. this.$message.error('库存不足')
  339. this.fragment.num = reserve - (reserve % pack)
  340. this.fragment.canAdd = false
  341. }
  342. } else if (newNum > reserve) {
  343. this.fragment.canSub = true
  344. this.fragment.canAdd = false
  345. this.$message.error('库存不足')
  346. this.fragment.num = reserve - (reserve % pack)
  347. } else {
  348. this.fragment.canSub = true
  349. this.fragment.canAdd = true
  350. let remainder = newNum % pack
  351. if (remainder !== 0) {
  352. // console.log(this.fragment.num)
  353. this.$message.error('不支持拆包且包装量为' + pack)
  354. // 这个直接赋值的,应该给这个值进行判断(Math.floor(newNum / pack) + 1) * pack
  355. let res = (Math.floor(newNum / pack) + 1) * pack
  356. this.fragment.num = res > reserve ? Math.floor(newNum / pack) * pack : res
  357. } else {
  358. this.fragment.num = newNum
  359. }
  360. newNum === buy && (this.fragment.canSub = false)
  361. newNum === reserve && (this.fragment.canAdd = false)
  362. }
  363. }
  364. }
  365. },
  366. subNum () {
  367. let pack = this.commodity.perQty || this.commodity.minPackQty
  368. let newNum = 0
  369. if (this.commodity.breakUp) {
  370. newNum = this.fragment.num - 1
  371. } else {
  372. newNum = this.fragment.num - pack
  373. }
  374. this.changeNum(newNum)
  375. getFragment(this.commodity, this.fragment)
  376. this.onInput()
  377. },
  378. addNum () {
  379. let pack = this.commodity.perQty || this.commodity.minPackQty
  380. let newNum = 0
  381. if (this.commodity.breakUp) {
  382. newNum = this.fragment.num + 1
  383. } else {
  384. newNum = this.fragment.num + pack
  385. }
  386. this.changeNum(newNum)
  387. getFragment(this.commodity, this.fragment)
  388. this.onInput()
  389. },
  390. inputNum () {
  391. if ((/^[\d]*$/).test(this.fragment.num)) {
  392. this.changeNum(this.fragment.num)
  393. getFragment(this.commodity, this.fragment)
  394. } else {
  395. this.$message.error('请输入整数')
  396. this.fragment.num = this.commodity.minBuyQty
  397. }
  398. },
  399. buyNow: function (isBuy, item) {
  400. if (!this.$store.state.option.user.logged) {
  401. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  402. if (response.data) {
  403. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  404. }
  405. })
  406. } else {
  407. if (item) {
  408. if (isBuy) {
  409. this.$http.post('/trade/order/buyNow', [{
  410. uuid: item.uuid,
  411. batchCode: item.batchCode,
  412. number: this.fragment.num,
  413. storeid: item.storeid,
  414. storeUuid: item.storeid,
  415. currencyName: item.currencyName,
  416. minPackQty: item.minPackQty
  417. }])
  418. .then(response => {
  419. if (response.data.success) {
  420. if (response.data.message) {
  421. this.$message({
  422. message: response.data.message,
  423. type: 'success'
  424. })
  425. window.setTimeout(function () {
  426. window.location.href = '/user#/order/pay/' + this.baseUtils.enidfilter(response.data.data.orderid)
  427. }, 1000)
  428. } else {
  429. window.location.href = '/user#/order/pay/' + this.baseUtils.enidfilter(response.data.data.orderid)
  430. }
  431. } else {
  432. if (response.data.data && response.data.data.unvailable === 1) {
  433. this.$message.error('产品信息已失效,请刷新界面')
  434. } else {
  435. this.$message.error(response.data.message)
  436. }
  437. }
  438. }, err => {
  439. console.log(err)
  440. if (item.minBuyQty > item.reserve) {
  441. this.$message.error('商品' + item.code + '的库存已经不满足最小起订量')
  442. }
  443. })
  444. } else {
  445. // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
  446. this.$http.post('/trade/cart/add', {
  447. uuid: item.uuid,
  448. batchCode: item.batchCode,
  449. number: this.fragment.num,
  450. storeid: item.storeid,
  451. storeUuid: item.storeid,
  452. currencyName: item.currencyName,
  453. minPackQty: item.minPackQty
  454. })
  455. .then(response => {
  456. if (response.data.success) {
  457. if (response.data.message) {
  458. this.$message({
  459. message: '添加购物车成功,但商品信息有更新',
  460. type: 'success'
  461. })
  462. } else {
  463. this.$message({
  464. message: '添加购物车成功',
  465. type: 'success'
  466. })
  467. }
  468. } else {
  469. if (response.data.code === 2) {
  470. this.$message.error(response.data.message + ',请刷新页面')
  471. } else {
  472. this.$message.error(response.data.message)
  473. }
  474. }
  475. })
  476. }
  477. }
  478. }
  479. },
  480. toAttach: function (url) {
  481. if (this.user.logged) {
  482. if (url && url !== '1') {
  483. window.open(url)
  484. } else {
  485. this.$message.error('规格书地址错误')
  486. }
  487. } else {
  488. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  489. if (response.data) {
  490. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  491. }
  492. })
  493. }
  494. }
  495. }
  496. }
  497. </script>
  498. <style scoped>
  499. .container.commodity {
  500. width: 1190px;
  501. padding-left: 0;
  502. padding-right: 0;
  503. }
  504. .commodity .commodity-detail {
  505. width: 100%;
  506. display: inline-block;
  507. font-size: 0;
  508. }
  509. .commodity-detail .img{
  510. float: left;
  511. width: 258px;
  512. height: 320px;
  513. position: relative;
  514. }
  515. .commodity-detail .img >img {
  516. border: 1px solid #D6D3CE;
  517. }
  518. .commodity-detail .img .specific-price {
  519. position: absolute;
  520. left: 0;
  521. top: 0;
  522. border: none;
  523. }
  524. .commodity-detail .img .box {
  525. height: 62px;
  526. position: relative;
  527. }
  528. .commodity-detail .img .box img {
  529. position: absolute;
  530. right: 3px;
  531. bottom: 64px;
  532. }
  533. .commodity-detail .content {
  534. width: 932px;
  535. float: left;
  536. font-size: 14px;
  537. }
  538. .commodity-detail .content {
  539. padding-left: 20px;
  540. }
  541. .commodity-detail .content .code {
  542. font-size: 24px;
  543. color: rgb(50, 50, 50);
  544. font-weight: 600;
  545. border-bottom: 1px solid #D6D3CE;
  546. line-height: 40px;
  547. }
  548. .commodity-detail .content .com-info {
  549. font-size: 14px;
  550. line-height: 26px;
  551. }
  552. .commodity-detail .content .com-info em {
  553. font-size: 14px;
  554. line-height: 26px;
  555. font-style: normal;
  556. }
  557. .input-group .input-group-operate {
  558. padding: 6px 12px;
  559. font-size: 14px;
  560. font-weight: 400;
  561. line-height: 1;
  562. color: #555;
  563. text-align: center;
  564. background-color: #eee;
  565. border: 1px solid #ccc;
  566. border-radius: 4px;
  567. }
  568. .input-group .input-group-operate:last-child {
  569. border-bottom-left-radius: 0;
  570. border-top-left-radius: 0;
  571. }
  572. .input-group .input-group-operate:first-child {
  573. border-bottom-right-radius: 0;
  574. border-top-right-radius: 0;
  575. }
  576. .content .com-info .name {
  577. letter-spacing: 15px;
  578. }
  579. .content .com-info .no-letter {
  580. letter-spacing: 1.5px;
  581. }
  582. .content .com-info a{
  583. color: #1162a4;
  584. }
  585. .content .com-info:hover a{
  586. color: #23527c;
  587. }
  588. .content .warn-area {
  589. font-size: 16px;
  590. font-weight: bold;
  591. color: #333;
  592. margin-top: 15px;
  593. }
  594. .commodity-info-detail {
  595. float: left;
  596. padding-top: 10px;
  597. width: 582px;
  598. }
  599. .price-block {
  600. float: right;
  601. width: 330px;
  602. margin-top: 10px;
  603. height: 220px;
  604. }
  605. .commodity-price {
  606. line-height: 30px;
  607. text-align: center;
  608. border: 1px solid #D6D3CE;
  609. }
  610. .commodity-price .title {
  611. background-color: #f7f7f7;
  612. border-bottom: 1px solid #D6D3CE;
  613. }
  614. .commodity-price .head {
  615. border-bottom: 1px solid #D6D3CE;
  616. }
  617. .commodity-price .fragment {
  618. display: inline-block;
  619. width: 150px;
  620. }
  621. .commodity-price .price {
  622. width: 150px;
  623. display: inline-block;
  624. }
  625. .com-info div.select {
  626. display: inline-block;
  627. font-weight: 600;
  628. color: red;
  629. font-size: 14px;
  630. }
  631. .com-info div.select .tax {
  632. font-weight: normal;
  633. color: black;
  634. font-size: 12px;
  635. }
  636. .com-info .operate {
  637. cursor: pointer;
  638. }
  639. .com-info .operate:hover, .com-info .operate:link {
  640. background-color: #00B83F;
  641. color: white;
  642. }
  643. .com-info .money {
  644. font-weight: 600;
  645. color: red;
  646. font-size: 14px;
  647. }
  648. .com-info select {
  649. border-radius: 4px;
  650. width: 120px!important;
  651. }
  652. ul.list-inline {
  653. margin: 0;
  654. }
  655. .commodity-price ul.list-inline li {
  656. padding-left: 0;
  657. padding-right: 0;
  658. border-bottom: 1px dashed #D6D3CE;
  659. }
  660. .commodity-price .table {
  661. margin-bottom: 0;
  662. }
  663. .commodity-price ul>li:last-child {
  664. border-bottom: none;
  665. }
  666. div.button {
  667. padding-top: 20px;
  668. float: left;
  669. }
  670. button.btn-now {
  671. border: 1px solid #3D76C6;
  672. color: #3D76C6;
  673. margin-left: 30px;
  674. }
  675. .com-info .delivery {
  676. display: inline;
  677. }
  678. #commodity-info-fragment{
  679. margin-bottom: 20px;
  680. }
  681. .commodity-detail .content .com-info .div-sell {
  682. font-size: 12px;
  683. height: 16px;
  684. line-height: 16px;
  685. color: #fff;
  686. padding: 0 5px;
  687. display: inline-block;
  688. position: relative;
  689. }
  690. .commodity-detail .content .com-info .can-div-sell {
  691. background: #5078cb;
  692. }
  693. .commodity-detail .content .com-info .not-div-sell {
  694. background: #fc8200;
  695. }
  696. .commodity-detail .content .com-info .can-div-sell:before {
  697. content: '';
  698. position: absolute;
  699. left: -8px;
  700. top: 10px;
  701. border-left: 8px solid transparent;
  702. border-bottom: 6px solid #5078cb;
  703. }
  704. .commodity-detail .content .com-info .not-div-sell:before {
  705. content: '';
  706. position: absolute;
  707. left: -8px;
  708. top: 10px;
  709. border-left: 8px solid transparent;
  710. border-bottom: 6px solid #fc8200;
  711. }
  712. </style>