CommodityInfo.vue 26 KB

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