upoff-material.vue 30 KB

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