upoff-material.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. <template>
  2. <div class="upoff-material-wrapper" v-if="showUpoff">
  3. <div class="mobile-nav">
  4. <div class="mobile-header mobile-center-header">
  5. <a @click="hide"><i class="iconfont icon-fanhui"></i></a>
  6. <p>编辑上下架</p>
  7. <p class="en-name">
  8. <img :src="`/images/mobile/center/${user.data.enterprise && user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}
  9. </p>
  10. </div>
  11. </div>
  12. <div class="upoff-materiel-wrapper" @click="clearInfo()">
  13. <div ref="scroll" style="height: 100%;overflow-y:scroll">
  14. <div>
  15. <div style="background: #fff;border: 1px solid #dcdcdc;padding:0 0.2rem 0.5rem">
  16. <div class="opoff-title clearfix">
  17. <!-- :class="item.standard ? 'standed' : 'istanded'"-->
  18. <div class="icon" :class="chooseItem.standard === 1 ? 'standed' : 'istanded'"></div>
  19. <div class="opoff-title-text pull-left">{{chooseItem.pcmpcode || '-'}}</div>
  20. </div>
  21. <div class="off-content">
  22. <div class="clearfix">
  23. <span class="name">品牌:</span>
  24. <span class="con">{{chooseItem.pbranden || chooseItem.pbrand || '-'}}</span>
  25. </div>
  26. <div class="clearfix">
  27. <span class="name">物料名称:</span>
  28. <span class="con">{{chooseItem.kind || chooseItem.kinden || '-'}}</span>
  29. </div>
  30. <div class="clearfix">
  31. <span class="name">规格:</span>
  32. <span class="con">{{chooseItem.spec || '-'}}</span>
  33. </div>
  34. <div class="clearfix">
  35. <span class="name">库存(PCS):</span>
  36. <span class="con">{{chooseItem.erpReserve || '-'}}</span>
  37. </div>
  38. <div class="clearfix">
  39. <span class="name">平均成本:</span>
  40. <span class="con">{{chooseItem.price || '-'}}</span>
  41. </div>
  42. </div>
  43. <div class="off-info clearfix">
  44. <div class="minBuyqty pull-left">
  45. <span>最小起订量:</span>
  46. <input type="number" maxlength="10" @blur="minBuyQtyBlur()" v-model="chooseItem.goods.minBuyQty" placeholder="请输入最小起订量" />
  47. </div>
  48. <div class="pull-left" style="margin-left:0.2rem">
  49. <span>可拆卖:</span>
  50. <div class="progress-wrapper" :class="{active: chooseItem.goods.breakUp}" @click="changeBreakUp()">
  51. <div class="progress-btn"></div>
  52. </div>
  53. </div>
  54. <div class="pull-left">
  55. <span>上架:</span>
  56. <div class="progress-wrapper" :class="{active: chooseItem.goods.autoPublish}" @click="changeautoPublish()">
  57. <div class="progress-btn"></div>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="off-info clearfix">
  62. <div class="pull-left">
  63. <span class="name">销售方式:</span>
  64. <div class="selectInput" @click.stop="showdropmenu()">
  65. <span v-if="chooseItem.storeInfoOms">{{chooseItem.storeInfoOms}}</span>
  66. <span v-else>{{chooseItem.goods.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}</span>
  67. <img src="/images/mobile/product/drop_icon.png" v-if="!ShowShopshelfOff"/>
  68. <ul :class="{active : showDrop }" v-if="!ShowShopshelfOff">
  69. <li v-for="item in storeObj" @click.stop="chooseStore(item)">{{item}}</li>
  70. </ul>
  71. </div>
  72. </div>
  73. <div class="pull-left" style="margin-left: 0.2rem">
  74. <span class="name">交期:</span>
  75. <input type="tel" placeholder="天数" v-model="chooseItem.goods.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.minDelivery)" />
  76. -
  77. <input type="tel" placeholder="天数" v-model="chooseItem.goods.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.maxDelivery)"/>
  78. </div>
  79. </div>
  80. <div class="off-info clearfix">
  81. <div class="pscList-top clearfix">
  82. <div class="pull-left">梯度/pcs</div>
  83. <div class="pull-right">单价</div>
  84. </div>
  85. <ul class="prices">
  86. <li v-for="(item, index) in chooseItem.goods.prices" v-bind:key="index">
  87. <div class="clearfix">
  88. <div class="pull-left">
  89. <input v-if="index > 0" oninput="if(value.length>5)value=value.slice(0,9)"
  90. type="tel" placeholder="数量" class="otherNumber"
  91. :class="{firstNumber: index === 0}"
  92. v-model.lazy.trim="item.start"
  93. :disabled="index === 0" :readonly="index === 0"
  94. @blur="startpriceBlur(item, index)" maxlength="9"
  95. />
  96. <input v-else oninput="if(value.length>5)value=value.slice(0,9)"
  97. type="tel" placeholder="数量" class="otherNumber"
  98. :class="{firstNumber: index === 0}"
  99. v-model.lazy.trim="item.start"
  100. :disabled="index === 0" :readonly="index === 0"
  101. @blur="startpriceBlur(item, index)" maxlength="9"
  102. />
  103. <!--<label v-if="index !== chooseItem.goods.prices.length - 1">-</label>-->
  104. <label v-if="index !== chooseItem.goods.prices.length - 1">以上</label>
  105. <label v-if="index === chooseItem.goods.prices.length - 1">以上</label>
  106. <!--<input oninput="if(value.length>5)value=value.slice(0,9)"-->
  107. <!--type="tel" placeholder="数量" class="otherNumber"-->
  108. <!--v-model.lazy.trim="item.end"-->
  109. <!--v-if="index !== chooseItem.goods.prices.length - 1"-->
  110. <!--@blur="endpriceBlur(item, index)"-->
  111. <!--maxlength="9"/>-->
  112. </div>
  113. <div class="pull-right">
  114. <input v-show="storeInfoStore.enType !== 'HK'"
  115. class="priceM" type="text"
  116. placeholder="单价(¥)"
  117. v-model.lazy="item.rMBPrice"
  118. @blur="rMBPriceBlur(item, 'rMBPrice')"/>
  119. <input v-show="storeInfoStore.enType === 'HK'"
  120. class="priceM" type="text"
  121. placeholder="单价($)"
  122. v-model.lazy="item.uSDPrice"
  123. @blur="rMBPriceBlur(item, 'uSDPrice')"/>
  124. <span @click="miuPrice(index)" class="clearfix"><img class="pull-left" src="/images/mobile/product/mui_icon.png"/></span>
  125. <span @click="addPrice()" class="clearfix"><img class="pull-left" src="/images/mobile/product/add_icon.png"/></span>
  126. </div>
  127. </div>
  128. </li>
  129. </ul>
  130. </div>
  131. </div>
  132. <div class="update-materiel-wrapper-controll clearfix">
  133. <div class="pull-left" @click.stop="saveMateriel()">保存</div>
  134. <div class="pull-right" @click.stop="hide('cancel')">取消</div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
  140. </div>
  141. </template>
  142. <script>
  143. import { RemindBox } from '~components/mobile/common'
  144. export default {
  145. props: {
  146. chooseItem: {
  147. type: Object,
  148. default: {}
  149. },
  150. firstPrice: {
  151. type: String,
  152. default: ''
  153. }
  154. },
  155. computed: {
  156. storeInfoStore() {
  157. return this.$store.state.option.storeStatus.data
  158. }
  159. },
  160. data() {
  161. return {
  162. collectResult: '',
  163. timeoutCount: 0,
  164. ShowShopshelfOff: false,
  165. showDrop: false,
  166. storeObj: ['寄售', '自营'],
  167. showUpoff: false,
  168. }
  169. },
  170. methods: {
  171. clearInfo() {},
  172. changeBreakUp() {
  173. this.chooseItem.goods.breakUp = !this.chooseItem.goods.breakUp
  174. this.minBuyQtyBlur()
  175. },
  176. saveMateriel() {
  177. if (!/^\d{1,6}$/.test(this.chooseItem.goods.minBuyQty)) {
  178. this.timeoutCount++
  179. this.collectResult = '最小起订量只能输入数字'
  180. return false
  181. } else if (this.chooseItem.goods.minBuyQty && !toString(this.chooseItem.goods.minBuyQty).trim()) {
  182. this.timeoutCount++
  183. this.collectResult = '最小起订量不能为空'
  184. return false
  185. } else if (!this.chooseItem.goods.minDelivery && !toString(this.chooseItem.goods.minDelivery).trim()) {
  186. this.timeoutCount++
  187. this.collectResult = '请填写最小交期时间'
  188. return false
  189. } else if (!this.chooseItem.goods.maxDelivery && !toString(this.chooseItem.goods.maxDelivery).trim()) {
  190. this.timeoutCount++
  191. this.collectResult = '请填写最大交期时间'
  192. return false
  193. } else if (!this.chooseItem.goods.minDelivery || !this.chooseItem.goods.maxDelivery) {
  194. this.timeoutCount++
  195. this.collectResult = '交期不能为空'
  196. return false
  197. } else if (!/^\d{1,3}$/.test(this.chooseItem.goods.minDelivery) || !/^\d{1,3}$/.test(this.chooseItem.goods.maxDelivery)) {
  198. this.timeoutCount++
  199. this.collectResult = '交期只能输入数字'
  200. return false
  201. } else {
  202. let isHas = false
  203. for (let i = 0; i < this.chooseItem.goods.prices.length; i++) {
  204. if (!this.chooseItem.goods.prices[i].start) {
  205. this.timeoutCount++
  206. this.collectResult = '分段数量必须填写'
  207. isHas = true
  208. break
  209. } else if (Math.abs(this.chooseItem.goods.prices[i].rMBPrice) <= 0 && this.storeInfoStore.enType !== 'HK') {
  210. this.timeoutCount++
  211. this.collectResult = '单价必须是大于0的数字'
  212. isHas = true
  213. break
  214. } else if (Math.abs(this.chooseItem.goods.prices[i].uSDPrice) <= 0 && this.storeInfoStore.enType === 'HK') {
  215. this.timeoutCount++
  216. this.collectResult = '单价必须是大于0的数字'
  217. isHas = true
  218. break
  219. } else if (!/^\d+$/.test(this.chooseItem.goods.prices[i].start) || (this.chooseItem.goods.prices[i].end !== '' && !/^\d+$/.test(this.chooseItem.goods.prices[i].end))) {
  220. this.timeoutCount++
  221. this.collectResult = '分段数量必须是正整数'
  222. isHas = true
  223. break
  224. } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.goods.prices[i].rMBPrice) && this.storeInfoStore.enType !== 'HK') {
  225. this.timeoutCount++
  226. this.collectResult = '单价只能输入数字'
  227. isHas = true
  228. break
  229. } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.goods.prices[i].uSDPrice) && this.storeInfoStore.enType === 'HK') {
  230. this.timeoutCount++
  231. this.collectResult = '单价只能输入数字'
  232. isHas = true
  233. break
  234. }
  235. }
  236. if (isHas === true) {
  237. return false
  238. }
  239. }
  240. this.chooseItem.goods.selfSale = this.storeInfoStore.uuid ? 1 : 2
  241. if (!this.chooseItem.storeInfoOms) {
  242. this.chooseItem.storeInfoOms = this.chooseItem.goods.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'
  243. }
  244. if (this.storeInfoStore.uuid) {
  245. if (this.chooseItem.storeInfoOms === '寄售') {
  246. this.chooseItem.goods.selfSale = 2
  247. } else if (this.chooseItem.storeInfoOms === '自营') {
  248. this.chooseItem.goods.selfSale = 1
  249. }
  250. }
  251. this.chooseItem.goods.prices[this.chooseItem.goods.prices.length - 1].end = '9999999999'
  252. // if (this.storeInfoStore.enType === 'HK') {
  253. // for (let i = 0; i < this.chooseItem.goods.prices.length; i++) {
  254. // this.chooseItem.goods.prices[i].uSDPrice = this.chooseItem.goods.prices[i].rMBPrice
  255. // this.chooseItem.goods.prices[i].uSDNTPrice = ''
  256. // }
  257. // }
  258. this.$http.put('/trade/goods', this.chooseItem.goods).then(res => {
  259. if (res.data.success) {
  260. this.timeoutCount++
  261. this.collectResult = '保存成功'
  262. setTimeout(() => {
  263. this.hide()
  264. }, 300)
  265. } else {
  266. this.timeoutCount++
  267. this.collectResult = res.data.message
  268. }
  269. }, err => {
  270. this.timeoutCount++
  271. this.collectResult = err.response.data
  272. })
  273. },
  274. // 最低起订量失去焦点操作
  275. minBuyQtyBlur() {
  276. if (Math.abs(this.chooseItem.minPackQty) <= 0) {
  277. this.timeoutCount++
  278. this.collectResult = '包装数必须是大于0的整数'
  279. this.chooseItem.minPackQty = 1
  280. } else if (Math.abs(this.chooseItem.goods.minBuyQty) <= 0) {
  281. this.timeoutCount++
  282. this.collectResult = '起订量必须是大于0的整数'
  283. this.chooseItem.goods.minBuyQty = 1
  284. } else if ((!this.chooseItem.goods.breakUp && this.chooseItem.goods.minBuyQty) && this.chooseItem.goods.minBuyQty % this.chooseItem.minPackQty !== 0) {
  285. this.timeoutCount++
  286. this.collectResult = '不可拆卖时,起订量必须是包装数量的倍数'
  287. if (!this.chooseItem.minPackQty) {
  288. this.chooseItem.minPackQty = 1
  289. } else {
  290. if (this.chooseItem.minPackQty > this.chooseItem.goods.minBuyQty) {
  291. this.chooseItem.goods.minBuyQty = this.chooseItem.minPackQty
  292. } else {
  293. this.chooseItem.goods.minBuyQty = this.chooseItem.goods.minBuyQty - this.chooseItem.goods.minBuyQty % this.chooseItem.minPackQty
  294. }
  295. }
  296. }
  297. if (Number(this.firstPrice) <= Number(this.chooseItem.goods.minBuyQty)) {
  298. this.chooseItem.goods.prices[0].start = this.firstPrice
  299. } else {
  300. this.chooseItem.goods.prices[0].start = this.chooseItem.goods.minBuyQty
  301. }
  302. },
  303. changeautoPublish() {
  304. this.chooseItem.goods.autoPublish = !this.chooseItem.goods.autoPublish
  305. },
  306. showdropmenu() {
  307. this.showDrop = !this.showDrop
  308. },
  309. // 选择销售方式
  310. chooseStore(item) {
  311. this.chooseItem.storeInfoOms = item
  312. this.showdropmenu()
  313. },
  314. minDeliveryBlur(str) {
  315. if (Math.abs(this.chooseItem.goods.minDelivery) === 0) {
  316. this.timeoutCount++
  317. this.collectResult = `交期天数不能为0`
  318. this.chooseItem.goods.minDelivery = ''
  319. return false
  320. } else if (Math.abs(this.chooseItem.goods.minDelivery) === 0) {
  321. this.timeoutCount++
  322. this.collectResult = `交期天数不能为0`
  323. this.chooseItem.goods.minDelivery = ''
  324. return false
  325. }
  326. if (Math.abs(this.chooseItem.goods.minDelivery) > Math.abs(this.chooseItem.goods.minDelivery)) {
  327. this.timeoutCount++
  328. this.collectResult = `最短交期应小于等于最长交期`
  329. this.chooseItem.goods.minDelivery = ''
  330. }
  331. },
  332. show() {
  333. this.showUpoff = true
  334. },
  335. hide(type) {
  336. this.showUpoff = false
  337. this.$emit('upoffMaterial', type, this.chooseItem)
  338. },
  339. // 开始价格阶段失去焦点
  340. startpriceBlur(item, index) {
  341. if (index > 0) {
  342. if (item.start === '' || toString(item.start).trim() === '') {
  343. return false
  344. } else if (this.chooseItem.goods.prices[index].start <= this.chooseItem.goods.prices[index - 1].start){
  345. this.timeoutCount++
  346. this.collectResult = '输入值会导致梯度重叠,请重新修改'
  347. item.start = ''
  348. }
  349. this.chooseItem.goods.prices[index - 1].end = item.start - 1
  350. }
  351. },
  352. // 单价失去焦点
  353. rMBPriceBlur(item, key) {
  354. if (item[key] === '' || !item[key]) { return false }
  355. if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(item[key])) {
  356. this.timeoutCount++
  357. this.collectResult = '单价只能输入数字带6位小数'
  358. } else if (Math.abs(item[key]) === 0) {
  359. return false
  360. } else if (Math.abs(item[key]) >= 10000) {
  361. this.timeoutCount++
  362. item[key] = 9999
  363. this.collectResult = '单价不能高于10000'
  364. return false
  365. }
  366. item[key] = item[key].toString()
  367. let splits = item[key].split('.')
  368. if (splits[0].length >= 4) {
  369. splits[0] = splits[0].substr(0, 4)
  370. item[key] = splits[0]
  371. }
  372. if (splits[1]) {
  373. item[key] = splits[0] + '.' + splits[1]
  374. }
  375. if (splits[1] && splits[1].length > 6) {
  376. splits[1] = splits[1].substr(0, 7)
  377. let str = splits[1].substr(0, 6)
  378. if (splits[1][splits[1].length - 1] >= 5) {
  379. str = splits[1].substr(0, 6)
  380. str = Math.abs(str) + 1
  381. }
  382. item[key] = splits[0] + '.' + Math.ceil(str)
  383. }
  384. },
  385. addPrice() {
  386. if (this.chooseItem.goods.prices.length === 3) {
  387. this.timeoutCount++
  388. this.collectResult = '价格梯度最多只能有三个分段'
  389. return false
  390. }
  391. let copy = Object.assign({}, this.chooseItem.goods.prices[this.chooseItem.goods.prices.length - 1], {
  392. end: ''
  393. })
  394. this.chooseItem.goods.prices[this.chooseItem.goods.prices.length - 1] = copy
  395. this.chooseItem.goods.prices.push({
  396. end: '',
  397. rMBNTPrice: '',
  398. rMBPrice: '',
  399. uSDNTPrice: '',
  400. uSDPrice: '',
  401. start: ''
  402. })
  403. },
  404. miuPrice(index) {
  405. if (index === 0) {
  406. if (this.chooseItem.goods.prices.length === 3) {
  407. this.chooseItem.goods.prices[0].rMBPrice = this.chooseItem.goods.prices[1].rMBPrice
  408. this.chooseItem.goods.prices[0].uSDPrice = this.chooseItem.goods.prices[1].uSDPrice
  409. this.chooseItem.goods.prices[0].end = this.chooseItem.goods.prices[1].end
  410. this.chooseItem.goods.prices[1].start = this.chooseItem.goods.prices[2].start
  411. this.chooseItem.goods.prices[1].rMBPrice = this.chooseItem.goods.prices[2].rMBPrice
  412. this.chooseItem.goods.prices[1].uSDPrice = this.chooseItem.goods.prices[2].uSDPrice
  413. this.chooseItem.goods.prices[1].end = '9999999999'
  414. this.chooseItem.goods.prices.splice(2, 1)
  415. } else {
  416. index++
  417. if (this.chooseItem.goods.prices.length === 1) return
  418. this.chooseItem.goods.prices[0].rMBPrice = this.chooseItem.goods.prices[1].rMBPrice
  419. this.chooseItem.goods.prices[0].uSDPrice = this.chooseItem.goods.prices[1].uSDPrice
  420. this.chooseItem.goods.prices[0].end = '9999999999'
  421. this.chooseItem.goods.prices.splice(index, 1)
  422. }
  423. } else if (index === 1) {
  424. if (this.chooseItem.goods.prices.length === 3) {
  425. this.chooseItem.goods.prices[1].rMBPrice = this.chooseItem.goods.prices[2].rMBPrice
  426. this.chooseItem.goods.prices[1].uSDPrice = this.chooseItem.goods.prices[2].uSDPrice
  427. this.chooseItem.goods.prices[1].end = '9999999999'
  428. this.chooseItem.goods.prices.splice(2, 1)
  429. } else {
  430. this.chooseItem.goods.prices[0].end = '9999999999'
  431. this.chooseItem.goods.prices.splice(index, 1)
  432. }
  433. } else {
  434. this.chooseItem.goods.prices[1].end = '9999999999'
  435. this.chooseItem.goods.prices.splice(index, 1)
  436. }
  437. console.log(this.chooseItem.goods.prices)
  438. },
  439. // 结束价格阶段失去焦点
  440. endpriceBlur(item, index) {
  441. if (item.end === '') {
  442. return false
  443. } else if (Math.abs(item.end) + 1 <= Math.abs(item.start)) {
  444. this.timeoutCount++
  445. this.collectResult = `输入值不能小于${item.start}`
  446. item.end = ''
  447. return false
  448. } else if (this.chooseItem.goods.prices[index + 1].start !== '' && toString(this.chooseItem.goods.prices[index + 1].start).trim() !== '' && Math.abs(item.end) + 1 > Math.abs(this.chooseItem.goods.prices[index + 1].start)) {
  449. this.timeoutCount++
  450. this.collectResult = `输入值不能大于${this.chooseItem.goods.prices[index + 1].start - 1}`
  451. item.end = ''
  452. return false
  453. } else if (this.chooseItem.goods.prices[index + 1].end !== '' && toString(this.chooseItem.goods.prices[index + 1].end).trim() !== '' && Math.abs(item.end) + 1 > Math.abs(this.chooseItem.goods.prices[index + 1].end)) {
  454. this.timeoutCount++
  455. this.collectResult = `输入值不能大于${this.chooseItem.goods.prices[index + 1].end}`
  456. item.end = ''
  457. return false
  458. }
  459. this.chooseItem.goods.prices[index + 1].start = Math.abs(item.end) + 1
  460. console.log(this.chooseItem.goods.prices)
  461. }
  462. },
  463. components: {
  464. RemindBox
  465. }
  466. }
  467. </script>
  468. <style scoped lang='scss'>
  469. @mixin overFlowHidden {
  470. overflow: hidden;
  471. text-overflow: ellipsis;
  472. white-space: nowrap;
  473. }
  474. @mixin lineHeight($value) {
  475. height: $value;
  476. line-height: $value;
  477. }
  478. .upoff-material-wrapper {
  479. position: fixed;
  480. z-index: 1000;
  481. background: #f1f3f6;
  482. /*background: red;*/
  483. top: 0;
  484. left: 0;
  485. bottom: 0;
  486. right: 0;
  487. .mobile-header{
  488. position: fixed;
  489. top: 0;
  490. z-index: 100;
  491. width:100%;
  492. height: 1.26rem;
  493. line-height: 1.26rem;
  494. /*border-bottom:.01rem solid #ccc;*/
  495. background: #3e82f5;
  496. padding:0 .2rem 0 .1rem;
  497. color:#fff;
  498. }
  499. .mobile-header p{
  500. overflow: hidden;
  501. text-overflow: ellipsis;
  502. white-space: nowrap;
  503. font-size:.36rem;
  504. text-align: center;
  505. width: 6rem;
  506. padding-left: 1rem;
  507. }
  508. .mobile-center-header p.en-name {
  509. font-size: .3rem;
  510. }
  511. .mobile-header a{
  512. font-size:.28rem;
  513. color:#fff;
  514. position: absolute;
  515. }
  516. .mobile-header a i{
  517. font-size: .48rem;
  518. margin-right: -.1rem;
  519. }
  520. .upoff-materiel-wrapper {
  521. border-radius: 0.07rem;
  522. position: fixed;
  523. overflow: hidden;
  524. bottom: 0;
  525. top: 1.46rem;
  526. left: 0.2rem;
  527. right: 0.2rem;
  528. /*padding: 0 0.25rem;*/
  529. /*background: #fff;*/
  530. .opoff-title {
  531. border-bottom: 1px solid #dcdcdc;
  532. padding: 0.25rem 0;
  533. .opoff-title-text {
  534. font-size: 0.28rem;
  535. color: #3f84f6;
  536. @include overFlowHidden();
  537. width: 5.81rem;
  538. }
  539. .icon {
  540. width: 0.6rem;
  541. height: 0.36rem;
  542. line-height: 0.36rem;
  543. float: left;
  544. background-size: 100%;
  545. background-repeat: no-repeat;
  546. margin-right: 0.12rem;
  547. text-align: center;
  548. &.istanded {
  549. background-image: url('/images/mobile/@2x/istanded.png')
  550. }
  551. &.standed {
  552. background-image: url('/images/mobile/@2x/standed.png')
  553. }
  554. }
  555. }
  556. .off-content {
  557. padding: 0.42rem 0;
  558. border-bottom: 1px solid #dcdcdc;
  559. .clearfix {
  560. margin-bottom: 0.25rem;
  561. &:nth-last-of-type(1) {
  562. margin-bottom: 0;
  563. }
  564. @include overFlowHidden();
  565. }
  566. .name {
  567. color: #666;
  568. font-size:0.28rem;
  569. }
  570. .con{
  571. color: #333;
  572. font-size:0.28rem;
  573. }
  574. }
  575. .off-info {
  576. margin-top: 0.3rem;
  577. line-height: 0.5rem;
  578. span {
  579. color: #666;
  580. font-size: 0.28rem;
  581. }
  582. .minBuyqty {
  583. input {
  584. border: 1px solid #d2d2d2;
  585. border-radius: 2px;
  586. text-indent: .12rem;
  587. width: 1.5rem;
  588. font-size: 0.24rem;
  589. color: #333;
  590. }
  591. }
  592. .progress-wrapper {
  593. width: .68rem;
  594. height: .32rem;
  595. border-radius: 0.32rem;
  596. position: relative;
  597. display: inline-block;
  598. vertical-align: top;
  599. margin-left: 0.15rem;
  600. margin-top: 0.12rem;
  601. background: #c4c5c6;
  602. .progress-btn {
  603. position: absolute;
  604. height: 0.28rem;
  605. width: 0.28rem;
  606. border-radius: 50%;
  607. left: 0.01rem;
  608. top: 0.01rem;
  609. background: #fff;
  610. box-shadow: 0 0 5px #000;
  611. }
  612. &.active {
  613. background: #22ac38;
  614. .progress-btn {
  615. left: 0.37rem;
  616. }
  617. }
  618. }
  619. .selectInput {
  620. display: inline-block;
  621. position: relative;
  622. vertical-align: top;
  623. height: 0.5rem;
  624. line-height: 0.5rem;
  625. border: 1px solid #d2d2d2;
  626. border-radius: 2px;
  627. width: 1.78rem;
  628. text-indent: 0.12rem;
  629. img {
  630. position: absolute;
  631. width: 0.17rem;
  632. height: 0.11rem;
  633. right:0.1rem;
  634. top: 0.17rem;
  635. }
  636. &.selectInput2 {
  637. width: 1.56rem;
  638. }
  639. span {
  640. height: 0.5rem;
  641. line-height: 0.5rem;
  642. display: block;
  643. }
  644. ul {
  645. position: absolute;
  646. left: 0;
  647. top: .5rem;
  648. z-index: 12;
  649. width: 100%;
  650. max-height: 3rem;
  651. overflow-y: auto;
  652. display: none;
  653. li {
  654. text-indent: 0px;
  655. width: 100%;
  656. background: #666;
  657. color: rgba(255, 255, 255, 0.89);
  658. text-align: center;
  659. font-size: .3rem;
  660. }
  661. &.active {
  662. display: block;
  663. }
  664. }
  665. }
  666. .startInput, .endInput {
  667. text-indent: 0;
  668. text-align: center;
  669. width: 1rem;
  670. height: 0.5rem;
  671. line-height: 0.5rem;
  672. border: 1px solid #d2d2d2;
  673. border-radius: 2px;
  674. }
  675. .pscList-top {
  676. height: 0.5rem;
  677. line-height: 0.5rem;
  678. background: #e5e5e5;
  679. font-size: 0.28rem;
  680. color: #666;
  681. border-radius: 3px;
  682. .pull-left {
  683. margin-left: 0.2rem
  684. }
  685. .pull-right {
  686. margin-right: 0.2rem
  687. }
  688. }
  689. ul.prices{
  690. margin: 0.2rem 0 0;
  691. padding-bottom: 0.2rem;
  692. .clearfix {
  693. margin-bottom: 0.14rem;
  694. font-size: 0.24rem;
  695. color: #666;
  696. .priceM {
  697. width: 1.6rem;
  698. height: 0.5rem;
  699. border: 1px solid #d2d2d2;
  700. text-align: center;
  701. line-height: 0.5rem;
  702. border-radius: 3px;
  703. }
  704. span {
  705. width: 0.34rem;
  706. height: 0.34rem;
  707. margin-top: 0.08rem;
  708. display: inline-block;
  709. vertical-align: top;
  710. &:nth-of-type(1){
  711. margin: 0.08rem 0.2rem 0;
  712. }
  713. img {
  714. width: 100%;
  715. }
  716. }
  717. .firstNumber {
  718. width: 0.4rem;
  719. background: #eeeeee !important;
  720. height: 0.5rem;
  721. border:1px solid #d2d2d2;
  722. border-radius: 3px;
  723. line-height: 0.5rem;
  724. text-align: center;
  725. font-size: 0.24rem;
  726. }
  727. .otherNumber {
  728. width: 1.6rem;
  729. background: #fff;
  730. height: 0.5rem;
  731. border:1px solid #d2d2d2;
  732. border-radius: 3px;
  733. line-height: 0.5rem;
  734. text-align: center;
  735. font-size: 0.24rem;
  736. }
  737. }
  738. }
  739. }
  740. }
  741. .update-materiel-wrapper-controll {
  742. margin: 0.4rem 0.2rem 0;
  743. div {
  744. width: 48%;
  745. background: #b5b5b5;
  746. font-size: 0.3rem;
  747. color: #fafbfc;
  748. text-align: center;
  749. @include lineHeight(0.62rem);
  750. border-radius: 0.07rem;
  751. &:first-child {
  752. background: #3f84f6;
  753. }
  754. }
  755. }
  756. }
  757. </style>