CommodityInfo.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  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. import { enidfilter } from '~utils/baseUtils'
  171. export default {
  172. name: 'commodity-info',
  173. data () {
  174. return {
  175. fragment: {
  176. currency: 'RMB',
  177. num: 0,
  178. price: 0,
  179. canAdd: true,
  180. canSub: true}
  181. }
  182. },
  183. watch: {
  184. fragment: function (val, oldVal) {
  185. }
  186. },
  187. filters: {
  188. currencyShort: function (num) {
  189. if (typeof num === 'number' && num > 0) {
  190. if (num <= 0.01) {
  191. num = 0.01
  192. } else {
  193. if (num.toString().indexOf('.') === -1) {
  194. num += '.00'
  195. } else {
  196. let inputStr = num.toString()
  197. let arr = inputStr.split('.')
  198. let floatNum = arr[1]
  199. if (floatNum && arr[0]) {
  200. if (floatNum.length > 2) {
  201. num = inputStr.substring(0, arr[0].length + 3)
  202. if (Number(floatNum.charAt(2)) >= 1) {
  203. num = (Math.ceil(Number(num) * 100) + 1) / 100
  204. let inputStr1 = num.toString()
  205. let arr1 = inputStr1.split('.')
  206. let floatNum1 = arr1[1]
  207. if (num.toString().indexOf('.') === -1) {
  208. num += '.00'
  209. }
  210. if (floatNum1 && floatNum1.length === 1) {
  211. num = num + '0'
  212. }
  213. }
  214. } else if (floatNum.length === 1) {
  215. num = num + '0'
  216. }
  217. }
  218. }
  219. }
  220. }
  221. return num
  222. },
  223. currency: function (num) {
  224. if (typeof num === 'number' && num > 0) {
  225. if (num <= 0.000001) {
  226. num = 0.000001
  227. } else {
  228. if (num.toString().indexOf('.') === -1) {
  229. num += '.00'
  230. } else {
  231. let inputStr = num.toString()
  232. let arr = inputStr.split('.')
  233. let floatNum = arr[1]
  234. if (floatNum && arr[0]) {
  235. if (floatNum.length > 6) {
  236. num = inputStr.substring(0, arr[0].length + 7)
  237. if (Number(floatNum.charAt(6)) > 4) {
  238. num = (Number(num) * 1000000 + 1) / 1000000
  239. }
  240. } else if (floatNum.length === 1) {
  241. num = num + '0'
  242. }
  243. }
  244. }
  245. }
  246. }
  247. return num
  248. }
  249. },
  250. computed: {
  251. storeInfo () {
  252. return this.$store.state.shop.storeInfo.store.data
  253. },
  254. commodity () {
  255. let commodity = this.$store.state.shop.storeInfo.commodity.data
  256. this.fragment = initFragment(commodity)
  257. return commodity
  258. },
  259. component () {
  260. return this.$store.state.shop.storeInfo.component.data
  261. },
  262. calculate () {
  263. this.fragment.total = this.fragment.price * Math.pow(10, 6) * this.fragment.num
  264. return Math.ceil(this.fragment.total) / Math.pow(10, 6)
  265. },
  266. user () {
  267. return this.$store.state.option.user
  268. },
  269. isConsignment () {
  270. return this.storeInfo.type === 'CONSIGNMENT'
  271. }
  272. },
  273. mounted () {
  274. this.$nextTick(() => {
  275. this.loadSaveHistory()
  276. })
  277. },
  278. methods: {
  279. isSpecificPriceTag: function (tag) {
  280. return tag && tag.indexOf('特价') !== -1
  281. },
  282. onInput () {
  283. let prices = this.commodity.prices
  284. if (prices && prices.length) {
  285. let _this = this
  286. for (let i = 0; i < prices.length; i++) {
  287. if (_this.fragment.num >= prices[i].start && _this.fragment.num <= prices[i].end) {
  288. _this.fragment.price = _this.fragment.currency === 'RMB' ? prices[i].rMBPrice : prices[i].uSDPrice
  289. break
  290. }
  291. }
  292. }
  293. },
  294. loadSaveHistory () {
  295. if (this.user.logged) {
  296. this.$store.dispatch('shop/saveHistory', {id: this.commodity.batchCode})
  297. }
  298. },
  299. changeCurrency () {
  300. if (this.fragment.currency === 'RMB') {
  301. this.fragment.price = this.fragment.prices.rMBPrice
  302. } else if (this.fragment.currency === 'USD') {
  303. this.fragment.price = this.fragment.prices.uSDPrice
  304. }
  305. },
  306. changeNum: function (newNum) {
  307. let pack = this.commodity.perQty || this.commodity.minPackQty
  308. let buy = this.commodity.minBuyQty
  309. let reserve = this.commodity.reserve
  310. let breakUp = this.commodity.breakUp
  311. if (!newNum) {
  312. this.fragment.num = buy
  313. } else {
  314. newNum = parseInt(newNum)
  315. if (breakUp) {
  316. if (newNum < buy) {
  317. this.$message.error('最小起订量为' + buy)
  318. this.fragment.num = buy
  319. this.fragment.canSub = false
  320. this.fragment.canAdd = true
  321. } else if (newNum > reserve) {
  322. this.$message.error('库存不足')
  323. this.fragment.num = reserve
  324. this.fragment.canAdd = false
  325. this.fragment.canSub = true
  326. } else {
  327. this.fragment.canSub = true
  328. this.fragment.canAdd = true
  329. this.fragment.num = newNum
  330. newNum === buy && (this.fragment.canSub = false)
  331. newNum === reserve && (this.fragment.canAdd = false)
  332. }
  333. } else {
  334. if (newNum < buy) {
  335. this.$message.error('最小起订量为' + buy)
  336. this.fragment.num = buy
  337. this.fragment.canSub = false
  338. if (newNum > reserve) {
  339. this.$message.error('库存不足')
  340. this.fragment.num = reserve - (reserve % pack)
  341. this.fragment.canAdd = false
  342. }
  343. } else if (newNum > reserve) {
  344. this.fragment.canSub = true
  345. this.fragment.canAdd = false
  346. this.$message.error('库存不足')
  347. this.fragment.num = reserve - (reserve % pack)
  348. } else {
  349. this.fragment.canSub = true
  350. this.fragment.canAdd = true
  351. let remainder = newNum % pack
  352. if (remainder !== 0) {
  353. // console.log(this.fragment.num)
  354. this.$message.error('不支持拆包且包装量为' + pack)
  355. // 这个直接赋值的,应该给这个值进行判断(Math.floor(newNum / pack) + 1) * pack
  356. let res = (Math.floor(newNum / pack) + 1) * pack
  357. this.fragment.num = res > reserve ? Math.floor(newNum / pack) * pack : res
  358. } else {
  359. this.fragment.num = newNum
  360. }
  361. newNum === buy && (this.fragment.canSub = false)
  362. newNum === reserve && (this.fragment.canAdd = false)
  363. }
  364. }
  365. }
  366. },
  367. subNum () {
  368. let pack = this.commodity.perQty || this.commodity.minPackQty
  369. let newNum = 0
  370. if (this.commodity.breakUp) {
  371. newNum = this.fragment.num - 1
  372. } else {
  373. newNum = this.fragment.num - pack
  374. }
  375. this.changeNum(newNum)
  376. getFragment(this.commodity, this.fragment)
  377. this.onInput()
  378. },
  379. addNum () {
  380. let pack = this.commodity.perQty || this.commodity.minPackQty
  381. let newNum = 0
  382. if (this.commodity.breakUp) {
  383. newNum = this.fragment.num + 1
  384. } else {
  385. newNum = this.fragment.num + pack
  386. }
  387. this.changeNum(newNum)
  388. getFragment(this.commodity, this.fragment)
  389. this.onInput()
  390. },
  391. inputNum () {
  392. if ((/^[\d]*$/).test(this.fragment.num)) {
  393. this.changeNum(this.fragment.num)
  394. getFragment(this.commodity, this.fragment)
  395. } else {
  396. this.$message.error('请输入整数')
  397. this.fragment.num = this.commodity.minBuyQty
  398. }
  399. },
  400. buyNow: function (isBuy, item) {
  401. if (!this.$store.state.option.user.logged) {
  402. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  403. if (response.data) {
  404. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  405. }
  406. })
  407. } else {
  408. if (item) {
  409. if (isBuy) {
  410. this.$http.post('/trade/order/buyNow', [{
  411. uuid: item.uuid,
  412. batchCode: item.batchCode,
  413. number: this.fragment.num,
  414. storeid: item.storeid,
  415. storeUuid: item.storeid,
  416. currencyName: item.currencyName,
  417. minPackQty: item.minPackQty
  418. }])
  419. .then(response => {
  420. if (response.data.success) {
  421. if (response.data.message) {
  422. this.$message({
  423. message: response.data.message,
  424. type: 'success'
  425. })
  426. window.setTimeout(function () {
  427. window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
  428. }, 1000)
  429. } else {
  430. window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
  431. }
  432. } else {
  433. if (response.data.data && response.data.data.unvailable === 1) {
  434. this.$message.error('产品信息已失效,请刷新界面')
  435. } else {
  436. this.$message.error(response.data.message)
  437. }
  438. }
  439. }, err => {
  440. console.log(err)
  441. if (item.minBuyQty > item.reserve) {
  442. this.$message.error('商品' + item.code + '的库存已经不满足最小起订量')
  443. }
  444. })
  445. } else {
  446. // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
  447. this.$http.post('/trade/cart/add', {
  448. uuid: item.uuid,
  449. batchCode: item.batchCode,
  450. number: this.fragment.num,
  451. storeid: item.storeid,
  452. storeUuid: item.storeid,
  453. currencyName: item.currencyName,
  454. minPackQty: item.minPackQty
  455. })
  456. .then(response => {
  457. if (response.data.success) {
  458. if (response.data.message) {
  459. this.$message({
  460. message: '添加购物车成功,但商品信息有更新',
  461. type: 'success'
  462. })
  463. } else {
  464. this.$message({
  465. message: '添加购物车成功',
  466. type: 'success'
  467. })
  468. }
  469. } else {
  470. if (response.data.code === 2) {
  471. this.$message.error(response.data.message + ',请刷新页面')
  472. } else {
  473. this.$message.error(response.data.message)
  474. }
  475. }
  476. })
  477. }
  478. }
  479. }
  480. },
  481. toAttach: function (url) {
  482. if (this.user.logged) {
  483. if (url && url !== '1') {
  484. window.open(url)
  485. } else {
  486. this.$message.error('规格书地址错误')
  487. }
  488. } else {
  489. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  490. if (response.data) {
  491. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  492. }
  493. })
  494. }
  495. }
  496. }
  497. }
  498. </script>
  499. <style scoped>
  500. .container.commodity {
  501. width: 1190px;
  502. padding-left: 0;
  503. padding-right: 0;
  504. }
  505. .commodity .commodity-detail {
  506. width: 100%;
  507. display: inline-block;
  508. font-size: 0;
  509. }
  510. .commodity-detail .img{
  511. float: left;
  512. width: 258px;
  513. height: 320px;
  514. position: relative;
  515. }
  516. .commodity-detail .img >img {
  517. border: 1px solid #D6D3CE;
  518. }
  519. .commodity-detail .img .specific-price {
  520. position: absolute;
  521. left: 0;
  522. top: 0;
  523. border: none;
  524. }
  525. .commodity-detail .img .box {
  526. height: 62px;
  527. position: relative;
  528. }
  529. .commodity-detail .img .box img {
  530. position: absolute;
  531. right: 3px;
  532. bottom: 64px;
  533. }
  534. .commodity-detail .content {
  535. width: 932px;
  536. float: left;
  537. font-size: 14px;
  538. }
  539. .commodity-detail .content {
  540. padding-left: 20px;
  541. }
  542. .commodity-detail .content .code {
  543. font-size: 24px;
  544. color: rgb(50, 50, 50);
  545. font-weight: 600;
  546. border-bottom: 1px solid #D6D3CE;
  547. line-height: 40px;
  548. }
  549. .commodity-detail .content .com-info {
  550. font-size: 14px;
  551. line-height: 26px;
  552. }
  553. .commodity-detail .content .com-info em {
  554. font-size: 14px;
  555. line-height: 26px;
  556. font-style: normal;
  557. }
  558. .input-group .input-group-operate {
  559. padding: 6px 12px;
  560. font-size: 14px;
  561. font-weight: 400;
  562. line-height: 1;
  563. color: #555;
  564. text-align: center;
  565. background-color: #eee;
  566. border: 1px solid #ccc;
  567. border-radius: 4px;
  568. }
  569. .input-group .input-group-operate:last-child {
  570. border-bottom-left-radius: 0;
  571. border-top-left-radius: 0;
  572. }
  573. .input-group .input-group-operate:first-child {
  574. border-bottom-right-radius: 0;
  575. border-top-right-radius: 0;
  576. }
  577. .content .com-info .name {
  578. letter-spacing: 15px;
  579. }
  580. .content .com-info .no-letter {
  581. letter-spacing: 1.5px;
  582. }
  583. .content .com-info a{
  584. color: #1162a4;
  585. }
  586. .content .com-info:hover a{
  587. color: #23527c;
  588. }
  589. .content .warn-area {
  590. font-size: 16px;
  591. font-weight: bold;
  592. color: #333;
  593. margin-top: 15px;
  594. }
  595. .commodity-info-detail {
  596. float: left;
  597. padding-top: 10px;
  598. width: 582px;
  599. }
  600. .price-block {
  601. float: right;
  602. width: 330px;
  603. margin-top: 10px;
  604. height: 220px;
  605. }
  606. .commodity-price {
  607. line-height: 30px;
  608. text-align: center;
  609. border: 1px solid #D6D3CE;
  610. }
  611. .commodity-price .title {
  612. background-color: #f7f7f7;
  613. border-bottom: 1px solid #D6D3CE;
  614. }
  615. .commodity-price .head {
  616. border-bottom: 1px solid #D6D3CE;
  617. }
  618. .commodity-price .fragment {
  619. display: inline-block;
  620. width: 150px;
  621. }
  622. .commodity-price .price {
  623. width: 150px;
  624. display: inline-block;
  625. }
  626. .com-info div.select {
  627. display: inline-block;
  628. font-weight: 600;
  629. color: red;
  630. font-size: 14px;
  631. }
  632. .com-info div.select .tax {
  633. font-weight: normal;
  634. color: black;
  635. font-size: 12px;
  636. }
  637. .com-info .operate {
  638. cursor: pointer;
  639. }
  640. .com-info .operate:hover, .com-info .operate:link {
  641. background-color: #00B83F;
  642. color: white;
  643. }
  644. .com-info .money {
  645. font-weight: 600;
  646. color: red;
  647. font-size: 14px;
  648. }
  649. .com-info select {
  650. border-radius: 4px;
  651. width: 120px!important;
  652. }
  653. ul.list-inline {
  654. margin: 0;
  655. }
  656. .commodity-price ul.list-inline li {
  657. padding-left: 0;
  658. padding-right: 0;
  659. border-bottom: 1px dashed #D6D3CE;
  660. }
  661. .commodity-price .table {
  662. margin-bottom: 0;
  663. }
  664. .commodity-price ul>li:last-child {
  665. border-bottom: none;
  666. }
  667. div.button {
  668. padding-top: 20px;
  669. float: left;
  670. }
  671. button.btn-now {
  672. border: 1px solid #3D76C6;
  673. color: #3D76C6;
  674. margin-left: 30px;
  675. }
  676. .com-info .delivery {
  677. display: inline;
  678. }
  679. #commodity-info-fragment{
  680. margin-bottom: 20px;
  681. }
  682. .commodity-detail .content .com-info .div-sell {
  683. font-size: 12px;
  684. height: 16px;
  685. line-height: 16px;
  686. color: #fff;
  687. padding: 0 5px;
  688. display: inline-block;
  689. position: relative;
  690. }
  691. .commodity-detail .content .com-info .can-div-sell {
  692. background: #5078cb;
  693. }
  694. .commodity-detail .content .com-info .not-div-sell {
  695. background: #fc8200;
  696. }
  697. .commodity-detail .content .com-info .can-div-sell:before {
  698. content: '';
  699. position: absolute;
  700. left: -8px;
  701. top: 10px;
  702. border-left: 8px solid transparent;
  703. border-bottom: 6px solid #5078cb;
  704. }
  705. .commodity-detail .content .com-info .not-div-sell:before {
  706. content: '';
  707. position: absolute;
  708. left: -8px;
  709. top: 10px;
  710. border-left: 8px solid transparent;
  711. border-bottom: 6px solid #fc8200;
  712. }
  713. </style>