material.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  1. <template>
  2. <div>
  3. <div class="material-wrapper" >
  4. <div class="order-nav">
  5. <div :class="activeType === '' ? 'active': ''" @click="ChangeList('')"><span>公司产品库</span></div>
  6. <div :class="activeType === 'mine' ? 'active' : ''" @click="ChangeList('mine')"><span>我的产品库</span></div>
  7. </div>
  8. <div class="search-content">
  9. <input type="text" placeholder="请输入您要查找的品牌或型号" v-model="seekKeyword" @keyup.13="searchSeek">
  10. <span @click="searchSeek" >
  11. <i class="iconfont icon-sousuo"></i>
  12. </span>
  13. </div>
  14. <div class="scrollContent" id="provider-wrapper">
  15. <div class="providerList" v-for="(item, index) in GetEnterpriseListData">
  16. <div class="top">
  17. <div class="icon" :class="item.standard ? 'standed' : 'istanded'"></div>
  18. <div class="text" style="width: 4.3rem">
  19. {{item.pcmpcode}}
  20. </div>
  21. <div class="text" style="width: 1rem;color: #666;font-size: 0.28rem">
  22. {{item.goods && item.goods.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营' || '寄售'}}
  23. <!--{{item.goods && item.goods.selfSale === 1 ? '自营' : '寄售' || '-'}}-->
  24. </div>
  25. <div class="text" style="width: 1rem;color: #666;font-size: 0.28rem">
  26. {{item.goods && (item.goods.status === 601 || item.goods.status === 602) ? '已上架' : '已下架' }}
  27. </div>
  28. <!-- <div class="pms">
  29. {{item.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}
  30. </div>-->
  31. <!--<img class="store-type" v-if="item.goods && item.goods.storeid === '33069557578d44e69bd91ad12d28a8d4'" src="/images/mobile/product/consignment.png" alt="">-->
  32. <!--<img class="store-type" src="/images/mobile/product/self.png" alt="" v-else >=-->
  33. <img class="store-type" src="/images/mobile/product/mine_icon.png" v-if="item.addProductPerson"/>
  34. </div>
  35. <div class="middle">
  36. <div class="list" style="height: 0.46rem;">
  37. <div class="fl">
  38. <div class="name">品牌:</div>
  39. <div class="text">{{item.pbranden || item.pbrand || '-'}}</div>
  40. </div>
  41. <!--<div class="fr">-->
  42. <!--<div class="button" @click="update(item)">编辑</div>-->
  43. <!--<div class="button" @click="offProduct(item, index)">下架</div>-->
  44. <!--</div>-->
  45. </div>
  46. <div class="list">
  47. <div class="name">物料名称:</div>
  48. <div class="text">{{item.kind || item.kinden || '-'}}</div>
  49. <!--<div class="fr">-->
  50. <!--<div class="textinfo" v-if="item.goods && item.goods.breakUp">可拆卖</div>-->
  51. <!--</div>-->
  52. </div>
  53. <div class="list">
  54. <div class="name">规格:</div>
  55. <div class="text">{{item.spec || '-'}}</div>
  56. </div>
  57. <div class="list">
  58. <div class="fl">
  59. <div class="name">包装方式:</div>
  60. <div class="text">{{item.packaging || '无包装信息'}}</div>
  61. </div>
  62. <div class="fr">
  63. <div class="name">库存(pcs):</div>
  64. <div class="text">{{item.erpReserve || '-'}}</div>
  65. </div>
  66. </div>
  67. <div class="list">
  68. <div class="fl">
  69. <div class="name">最小包装数:</div>
  70. <div class="text">{{item.minPackQty || '-'}}</div>
  71. </div>
  72. <div class="fr">
  73. <div class="name">成本单价:</div>
  74. <div class="text">{{item.price || '-'}}</div>
  75. </div>
  76. </div>
  77. <div class="list">
  78. <div class="fl">
  79. <div class="name">最小起订量:</div>
  80. <div class="text">{{item.goods && item.goods.minBuyQty || '-'}}</div>
  81. </div>
  82. <div class="fr">
  83. <div class="name">交期(天):</div>
  84. <div class="text" v-if="item.goods && item.goods.b2cMaxDelivery && (item.goods.b2cMaxDelivery != item.goods.b2cMinDelivery)" v-text="item.goods.b2cMinDelivery + '-'+ item.goods.b2cMaxDelivery"></div>
  85. <div class="text" v-if="item.goods && item.goods.b2cMaxDelivery && (item.goods.b2cMaxDelivery == item.goods.b2cMinDelivery)" v-text="item.goods.b2cMinDelivery"></div>
  86. </div>
  87. </div>
  88. <!--<div class="list">-->
  89. <!--<div class="name">生产日期:</div>-->
  90. <!--<div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>-->
  91. <!--</div>-->
  92. <div class="list">
  93. <div class="name left">价格梯度:</div>
  94. <div class="table left">
  95. <ul>
  96. <li class="title">
  97. <div>分段数量/PCS</div>
  98. <div>分段单价</div>
  99. </li>
  100. <template v-if="item.goods">
  101. <li v-for="price in item.goods.prices">
  102. <div>{{price.start}}+</div>
  103. <!--{{item.goods.currencyName}}-->
  104. <div v-if="item.goods.currencyName === 'RMB'">¥{{price.rMBPrice}}</div>
  105. <div v-else>${{price.uSDPrice}}</div>
  106. </li>
  107. </template>
  108. <template v-else>
  109. <li>
  110. <div style="color: #666;width: 100%">暂无梯度数据</div>
  111. </li>
  112. </template>
  113. </ul>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="clearfix">
  118. <div class="pull-right add" @click="addProtoperson(item)" :class="{noadd: item.addProductPerson}" v-if="activeType !== 'mine'">加入个人产品</div>
  119. <div class="pull-right look" @click="toAddpro(item, index)">编辑上架</div>
  120. <div class="pull-right look" @click="updateMateriel(item)">编辑物料</div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <!-- 编辑物料 -->
  126. <div class="update-materiel" v-show="showMateriel">
  127. <div class="mobile-nav">
  128. <div class="mobile-header mobile-center-header">
  129. <a @click="saveMateriel('a')"><i class="iconfont icon-fanhui"></i></a>
  130. <p>编辑物料</p>
  131. <p class="en-name">
  132. <img :src="`/images/mobile/center/${user.data.enterprise && user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}
  133. </p>
  134. </div>
  135. </div>
  136. <div class="update-materiel-wrapper" @click="clearInfo()">
  137. <template v-if="MaterielItem.standard === 1">
  138. <img class="imgUrl" src="/images/mobile/@2x/productDetail/Strand.png" />
  139. </template>
  140. <template v-else>
  141. <img class="imgUrl" src="/images/mobile/@2x/productDetail/isStrand.png" />
  142. </template>
  143. <div ref="scroll" style="height: 100%;overflow-y:scroll">
  144. <div>
  145. <div style="background: #fff;border: 1px solid #dcdcdc;padding-bottom: 0.5rem;">
  146. <div class="update-materiel-wrapper-list clearfix" :class="{'overHidden': MaterielItem.standard === 1}">
  147. <div class="name pull-left"><a class="red">*</a>品牌:</div>
  148. <template v-if="MaterielItem.standard === 1">
  149. {{MaterielItem.pbranden}}
  150. </template>
  151. <template v-else>
  152. <div class="input pull-left clearfix" :class="{'overHidden': MaterielItem.standard === 1}">
  153. <input type="text" v-model="MaterielItem.pbranden" placeholder="请勿填中文符号" @blur.stop="checkBrand" @input.stop="onBrandChange"/>
  154. <ul class="similar brand-similar-list" v-show="showSimilarBrandList && MaterielItem.pbranden">
  155. <li v-for="sBrand in similarBrand" @click.stop="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
  156. </ul>
  157. <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.pbranden = ''"></i>
  158. </div>
  159. </template>
  160. </div>
  161. <div class="update-materiel-wrapper-list clearfix" :class="{'overHidden': MaterielItem.standard === 1}">
  162. <div class="name pull-left"><a class="red">*</a>物料名称:</div>
  163. <template v-if="MaterielItem.standard === 1">
  164. {{MaterielItem.kind}}
  165. </template>
  166. <template v-else>
  167. <div class="input pull-left clearfix" style="width: 4.44rem">
  168. <!--<input type="text" v-model="MaterielItem.kind" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">-->
  169. <input type="text" placeholder="请输入物料名称" v-model="MaterielItem.kind"/>
  170. <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.kind = ''"></i>
  171. </div>
  172. </template>
  173. </div>
  174. <div class="update-materiel-wrapper-list clearfix">
  175. <div class="name pull-left"><a class="red">*</a>型号:</div>
  176. <template v-if="MaterielItem.standard === 1">
  177. {{MaterielItem.pcmpcode}}
  178. </template>
  179. <template v-else>
  180. <div class="input pull-left clearfix">
  181. <input type="text" v-model="MaterielItem.pcmpcode" @blur.stop="checkCode" @input.stop="onCodeChange" placeholder="请勿填中文符号">
  182. <ul class="similar" v-show="showSimilarCodeList && MaterielItem.pcmpcode">
  183. <li v-for="sCode in similarCode" @click.stop="setCode(sCode.code)">{{sCode.code}}</li>
  184. </ul>
  185. <!--<input type="text" placeholder="请输入型号" v-model="MaterielItem.pcmpcode"/>-->
  186. <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.pcmpcode = ''"></i>
  187. </div>
  188. </template>
  189. </div>
  190. <div class="update-materiel-wrapper-list clearfix">
  191. <div class="name pull-left"><a class="red" style="opacity: 0">*</a>规格:</div>
  192. <div class="input pull-left clearfix">
  193. <input type="text" placeholder="请输入规格" v-model="MaterielItem.spec" @blur="checkSpec" @input="onSpecInput" maxlength="50"/>
  194. <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.spec = ''"></i>
  195. </div>
  196. </div>
  197. <div class="update-materiel-wrapper-list clearfix">
  198. <div class="name pull-left"><a class="red">*</a>最小包装数:</div>
  199. <div class="input pull-left clearfix" style="width: 4.15rem;">
  200. <input type="number" placeholder="请输入最小包装数" v-model="MaterielItem.minPackQty" maxlength="6" oninput="if(value.length>6)value=value.slice(0,6)"/>
  201. <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.minPackQty = ''"></i>
  202. </div>
  203. </div>
  204. <div class="update-materiel-wrapper-list clearfix">
  205. <div class="name pull-left"><a class="red" style="opacity: 0">*</a>包装方式:</div>
  206. <div class="selectInput pull-left" @click.stop="showdropmenu('pack')">
  207. <span>{{MaterielItem.packaging || '无包装信息'}}</span>
  208. <img src="/images/mobile/product/drop_icon.png"/>
  209. <ul :class="{active : showDrop === 'pack' }">
  210. <li v-for="item in packObj" @click.stop="choosePack(item)">{{item}}</li>
  211. </ul>
  212. </div>
  213. </div>
  214. <div class="update-materiel-wrapper-list clearfix">
  215. <div class="name pull-left"><a class="red" style="opacity: 0">*</a>规格书:</div>
  216. </div>
  217. <div class="clearfix">
  218. <div class="update-materiel-wrapper-image">
  219. <a v-if="MaterielItem.IsSave" @click.stop="WinOpen(MaterielItem.Regulpic)">
  220. <img src="/images/mobile/openStore/pdf.png" style='width: 0.49rem; height: 0.49rem;display:block;margin: 0.2rem auto 0'/>
  221. </a>
  222. <img v-else src="/images/mobile/openStore/upload.png" style='width: 0.49rem; height: 0.49rem;display:block;margin: 0.2rem auto 0'/>
  223. <!--v-if="MaterielItem.standard !== 1"-->
  224. <input type="file" class="com-input" @change.stop="update" accept="*.pdf" v-if="!MaterielItem.IsSave"/>
  225. <span style="position: relative" v-if="MaterielItem.Regulpic === ''">上传规格书</span>
  226. </div>
  227. <span class="uploadImgInfo pull-left">
  228. <div class="name"><a class="red">*</a>仅支持PDF格式文件,大小不超过20M:</div>
  229. <div class="name"><a class="red">*</a>规格书上传后,将在两个工作日内完成审核</div>
  230. <div class="name"><a class="red">*</a>如审核不通过,将会以消息的形式通知您</div>
  231. <div class="name"><a class="red">*</a>已有原厂规格书的器件暂不开放上传</div>
  232. <div class="name"><a class="red">*</a>更新规格书需重新审核</div>
  233. </span>
  234. <div style="clear:both"></div>
  235. <div class="uploadImgBtn pull-left" v-if="MaterielItem.standard !== 1">上传规格书<input type="file" class="com-input" @change.stop="update" accept=".pdf" /></div>
  236. <div style="color: #ea0f42;font-size: 0.2rem;line-height: 0.47rem;margin-left: 0.2rem" class="pull-left" v-if="(MaterielItem.productAttachSubmit && MaterielItem.productAttachSubmit.uploadAttach) && MaterielItem.standard !== 1 && MaterielItem.Regulpic !== '' && MaterielItem.IsSave" >该规格书正在审核中</div>
  237. </div>
  238. <div class="update-materiel-wrapper-list clearfix">
  239. <div class="name pull-left"><a class="red" style="opacity: 0">*</a>物料图片:</div>
  240. </div>
  241. <div class="clearfix">
  242. <div class="update-materiel-wrapper-image">
  243. <img :src="MaterielItem.cmpImg || '/images/mobile/openStore/upload.png'" style='width: 0.49rem; height: 0.49rem;display:block;margin: 0.2rem auto 0'/>
  244. <input type="file" class="com-input" @change.stop="update2" accept="image/jpeg,image/jpg,image/png" />
  245. <span style="position: relative" v-if="MaterielItem.cmpImg === ''">上传图片</span>
  246. </div>
  247. <span class="uploadImgInfo pull-left" style="line-height: 1.09rem">
  248. <div class="name"><a class="red">*</a>仅支持JPG、PNG格式文件,大小不超过1M</div>
  249. </span>
  250. <div style="clear:both"></div>
  251. <div class="uploadImgBtn pull-left" style="margin-top: 0.15rem">上传图片<input type="file" class="com-input" @change.stop="update2" accept="image/jpeg,image/jpg,image/png" /></div>
  252. </div>
  253. </div>
  254. <div class="update-materiel-wrapper-controll clearfix">
  255. <div class="pull-left" @click.stop="saveMateriel()">保存</div>
  256. <div class="pull-right" @click.stop="saveMateriel('a')">取消</div>
  257. </div>
  258. <div style="height: 1rem;position:relative"></div>
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <!-- 物料上下架 -->
  264. <div>
  265. <upoff-material ref="upoffMaterial" :chooseItem="MaterielItem" @upoffMaterial="upoffMaterial" :firstPrice="firstPrice">
  266. </upoff-material>
  267. </div>
  268. <!-- /end 物料上下架 -->
  269. <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
  270. <pull-up :fixId="'provider-wrapper'" :searchMore="isSearchSearchingMore" :allPage="EnterprisePage" :page="seekPage" @pullUpAction="getMoreSearch"></pull-up>
  271. </div>
  272. </template>
  273. <script>
  274. // 移动端IOS不支持上传PDF文件
  275. import { RemindBox, PullUp } from '~components/mobile/common'
  276. import { upoffMaterial } from '~components/mobile/center'
  277. export default {
  278. layout: 'mobile',
  279. middleware: 'authenticated',
  280. name: 'mobileProduct',
  281. fetch ({store}) {
  282. return Promise.all([
  283. store.dispatch('loadStoreStatus', {op: 'check'})
  284. ])
  285. },
  286. data() {
  287. return {
  288. activeType: '',
  289. collectResult: '',
  290. timeoutCount: 0,
  291. isSearchSearchingMore: false, // 是否请求状态
  292. EnterprisePage: 0, // 总页数
  293. GetEnterpriseListData: [], // 当前数据源
  294. seekPage: 1, // 当前页数
  295. seekKeyword: '', // 搜索关键字
  296. MaterielItem: {}, // 当前选择编辑物料对象 或者 编辑上下架对象
  297. showMateriel: false, // 编辑物料弹窗
  298. showSimilarCodeList: false, // 型号选择框
  299. showSimilarBrandList: false, // 品牌选择框
  300. similarBrand: [],
  301. similarCode: [],
  302. packObj: ['其他', 'Bulk-散装', 'Reel-卷装', 'Tape/Reel-编带', 'Tray-盘装', 'Tube-管装', '盒装', '袋装', '罐装', '瓶装', '桶装', '箱装'],
  303. showDrop: '',
  304. firstPrice: ''
  305. }
  306. },
  307. created() {
  308. this.$http.get('/store-service/stores', { params: { op: 'check' } }).then(response => {
  309. this.$store.commit('option/REQUEST_STORE_STATUS_SUCCESS', response.data)
  310. }, err => {
  311. this.$store.commit('option/REQUEST_STORE_STATUS_FAILURE', err)
  312. })
  313. this.getResourceProvidor()
  314. // this.MaterielItem.packaging = this.packObj[0]
  315. },
  316. computed: {
  317. // 是否展示空数据
  318. StateNone() {
  319. return this.GetEnterpriseListData.length === 0 && this.EnterprisePage === 0
  320. }
  321. },
  322. methods: {
  323. // 打开pdf
  324. WinOpen(item) {
  325. window.open(item, '_blank')
  326. },
  327. // 获取当前企业产品库
  328. GetEnterpriseList: function() {
  329. let params = {
  330. _status: 'all',
  331. count: 20,
  332. isStandard: true,
  333. keyword: this.seekKeyword || '',
  334. page: this.seekPage,
  335. sorting: { id: 'DESC' },
  336. type: 'all'
  337. }
  338. return this.$http.get('/trade/products', { params })
  339. },
  340. // 获取当前个人产品库
  341. GetPersonList: function(cb) {
  342. let params = {
  343. _status: 'all',
  344. count: 20,
  345. isStandard: true,
  346. keyword: this.seekKeyword || '',
  347. page: this.seekPage,
  348. sorting: { id: 'DESC' },
  349. type: 'all'
  350. }
  351. return this.$http.get('/trade/products/person', { params })
  352. },
  353. ChangeList(_tp) {
  354. this.activeType = _tp
  355. this.seekPage = 1
  356. this.GetEnterpriseListData = []
  357. this.getResourceProvidor()
  358. },
  359. getResourceProvidor: function() {
  360. if (this.activeType === '') {
  361. this.GetEnterpriseList().then(res => {
  362. this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
  363. this.EnterprisePage = res.data.totalPages
  364. this.isSearchSearchingMore = false
  365. })
  366. } else if (this.activeType === 'mine') {
  367. this.GetPersonList().then(res => {
  368. this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
  369. this.EnterprisePage = res.data.totalPages
  370. this.isSearchSearchingMore = false
  371. })
  372. } else if (this.providerType === 'onLine') {
  373. this.GetOnlineList().then(res => {
  374. this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
  375. this.EnterprisePage = res.data.totalPages
  376. this.isSearchSearchingMore = false
  377. })
  378. }
  379. },
  380. getMoreSearch: function () {
  381. this.seekPage++
  382. this.isSearchSearchingMore = true
  383. this.getResourceProvidor()
  384. },
  385. searchSeek: function() {
  386. this.seekPage = 0
  387. this.GetEnterpriseListData = []
  388. this.getMoreSearch()
  389. },
  390. addProtoperson: function(item) {
  391. if (item.addProductPerson) {
  392. this.collectResult = '已在个人产品库'
  393. this.timeoutCount++
  394. return false
  395. }
  396. this.$http.post('/trade/products/person', [item.id])
  397. .then(response => {
  398. this.collectResult = '绑定成功'
  399. this.timeoutCount++
  400. this.seekPage = 1
  401. this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
  402. this.GetEnterpriseListData = null
  403. this.GetEnterpriseListData = []
  404. this.getResourceProvidor()
  405. // this.reloadData()
  406. }, () => {
  407. this.collectResult = '绑定失败'
  408. this.timeoutCount++
  409. })
  410. },
  411. // 编辑上架
  412. toAddpro(item, index) {
  413. if (item.erpReserve === '' || item.erpReserve === 0 || !item.erpReserve) {
  414. this.setRemindText(`当前物料库存为0,请先入库`)
  415. return false
  416. }
  417. if (item.minPackQty === '' || item.minPackQty === 0 || !item.minPackQty) {
  418. this.setRemindText(`请先编辑物料,最小包装数选项`)
  419. return false
  420. }
  421. // this.$item = this.baseUtils.deepCopy(item)
  422. this.$index = index
  423. // this.MaterielItem = item
  424. this.MaterielItem = item
  425. this.$item = this.baseUtils.deepCopy(this.MaterielItem)
  426. if (!this.MaterielItem.goods) {
  427. this.$set(this.MaterielItem, 'goods', {
  428. prices: [{end: '',
  429. rMBNTPrice: '',
  430. rMBPrice: '',
  431. start: '1'}],
  432. selfSale: 1,
  433. breakUp: true,
  434. autoPublish: true,
  435. productid: item.id,
  436. minDelivery: 1,
  437. maxDelivery: 10,
  438. minBuyQty: 1
  439. })
  440. }
  441. if (this.MaterielItem.goods.prices.length === 0) {
  442. this.MaterielItem.goods.prices = [{end: '', rMBNTPrice: '', rMBPrice: '', start: '1'}]
  443. }
  444. this.firstPrice = this.MaterielItem.goods.prices[0].start.toString()
  445. let rf = document.body.offsetHeight // 触发浏览器重绘
  446. // console.log(item)
  447. this.$refs.upoffMaterial.show()
  448. },
  449. update2 (e) {
  450. // 上传图片
  451. let file = e.target.files[0]
  452. if (file.size > 1024 * 1024) {
  453. this.setRemindText(`上传文件不得超过1M`)
  454. return false
  455. }
  456. if (file.type.indexOf('gif') > -1) {
  457. this.setRemindText(`不允许上传gif`)
  458. return false
  459. }
  460. let param = new FormData()
  461. param.append('file', file, file.name)
  462. param.append('chunk', '0')
  463. let config = {
  464. headers: {'Content-Type': 'multipart/form-data'}
  465. }
  466. this.$http.post('/api/images', param, config)
  467. .then(response => {
  468. this.$set(this.MaterielItem, 'cmpImg', response.data[0].path)
  469. // this.MaterielItem.cmpImg = response.data[0].path
  470. })
  471. },
  472. update (e) {
  473. // 上传PDF
  474. let file = e.target.files[0]
  475. if (file.size > 1024 * 1024 * 20) {
  476. this.setRemindText(`上传文件不得超过20M`)
  477. return false
  478. }
  479. if (file.type.indexOf('pdf') < 0) {
  480. this.setRemindText(`规格书只允许上传pdf文件`)
  481. return false
  482. }
  483. let param = new FormData()
  484. param.append('file', file, file.name)
  485. param.append('chunk', '0')
  486. let config = {
  487. headers: {'Content-Type': file.type}
  488. }
  489. this.$http.post('/file', param, config)
  490. .then(response => {
  491. this.MaterielItem.IsSave = true
  492. this.MaterielItem.Regulpic = response.data[0].path
  493. }, err => {
  494. console.log(err)
  495. })
  496. },
  497. // 编辑物料
  498. updateMateriel(item) {
  499. // Object.assign(this.MaterielItem, item, {Regulpic: '', IsSave: false, cmpImg: ''})
  500. this.MaterielItem = item
  501. this.$item = this.baseUtils.deepCopy(item)
  502. this.MaterielItem.minPackQty = (this.MaterielItem.minPackQty === '' || this.MaterielItem.minPackQty === 0) ? 1 : this.MaterielItem.minPackQty
  503. this.MaterielItem.packaging = (!this.MaterielItem.packaging && this.MaterielItem.packaging !== '') ? this.MaterielItem.packaging : this.packObj[0]
  504. this.$set(this.MaterielItem, 'IsSave', (item.productAttachSubmit && item.productAttachSubmit.uploadAttach || item.attach) ? true : false) // 规格书是否存在
  505. this.$set(this.MaterielItem, 'cmpImg', item.cmpImg || '')
  506. this.$set(this.MaterielItem, 'Regulpic', (item.productAttachSubmit && item.productAttachSubmit.uploadAttach) || item.attach || '')
  507. this.showMateriel = true
  508. // this._initScroll()
  509. },
  510. // 编辑物料保存按钮
  511. saveMateriel(str) {
  512. if (str) {
  513. let _key1 = Object.keys(this.$item)
  514. let _key2 = Object.keys(this.MaterielItem)
  515. for (let i = 0; i < _key1.length; i++) {
  516. this.MaterielItem[_key2[i]] = this.$item[_key1[i]]
  517. }
  518. this.showMateriel = false
  519. this.showDrop = ''
  520. return
  521. }
  522. if (this.MaterielItem.pbranden === '') {
  523. this.setRemindText('品牌不能为空')
  524. return
  525. } else if (this.MaterielItem.kind === '') {
  526. this.setRemindText('物料名称不能为空')
  527. return
  528. } else if (this.MaterielItem.minPackQty === '') {
  529. this.setRemindText('最小包装数不能为空')
  530. return
  531. } else if (this.MaterielItem.pcmpcode === '') {
  532. this.setRemindText('型号不能为空')
  533. return
  534. }
  535. this.MaterielItem.pcmpcode = this.MaterielItem.pcmpcode
  536. this.MaterielItem.pbranden = this.MaterielItem.pbranden
  537. let item = {
  538. id: this.MaterielItem.id,
  539. kind : this.MaterielItem.kind,
  540. pbranden: this.MaterielItem.pbranden,
  541. pcmpcode: this.MaterielItem.pcmpcode,
  542. spec: this.MaterielItem.spec,
  543. url: this.MaterielItem.Regulpic || '',
  544. cmpImg: this.MaterielItem.cmpImg, // 物料图片
  545. packaging: this.MaterielItem.packaging, // 包装
  546. minPackQty: this.MaterielItem.minPackQty // 最小包装数
  547. }
  548. let _url = item.url
  549. if (this.MaterielItem.standard === 1) {
  550. _url = ''
  551. }
  552. this.$http.post(`/trade/products/update/product?attachUrl=${_url}`, item).then(res => {
  553. if (res.data.success) {
  554. this.setRemindText('修改成功')
  555. this.showMateriel = false
  556. this.page = 1
  557. this.GetEnterpriseListData = null
  558. this.GetEnterpriseListData = []
  559. this.getResourceProvidor()
  560. } else {
  561. this.setRemindText(res.data.message)
  562. }
  563. })
  564. },
  565. // 显示包装选择
  566. showdropmenu(str) {
  567. this.showDrop = str
  568. },
  569. // 选择包装
  570. choosePack(item) {
  571. this.showDrop = ''
  572. this.MaterielItem.packaging = item
  573. },
  574. // 关闭包装选项
  575. closeAlert() {
  576. this.MaterielItem = this.$item
  577. this.showDrop = ''
  578. },
  579. clearInfo() {
  580. this.showSimilarCodeList = false
  581. this.showSimilarBrandList = false
  582. },
  583. checkBrand: function () {
  584. // this.MaterielItem.brand = this.MaterielItem.brand && this.MaterielItem.brand !== ''
  585. if (!this.MaterielItem.pbranden || this.MaterielItem.pbranden === '') {
  586. this.setRemindText('品牌不能为空')
  587. }
  588. return this.MaterielItem.pbranden
  589. },
  590. checkCode: function () {
  591. if (!this.MaterielItem.pcmpcode || this.MaterielItem.pcmpcode === '') {
  592. this.setRemindText('型号不能为空')
  593. }
  594. return this.MaterielItem.pcmpcode
  595. },
  596. onCodeChange: function () {
  597. this.MaterielItem.pcmpcode = this.MaterielItem.pcmpcode.trim()
  598. if ((/[^\x00-\xff]/g).test(this.MaterielItem.pcmpcode)) {
  599. let chineseIndex = -1
  600. for (let i = 0; i < this.MaterielItem.pcmpcode.length; i++) {
  601. if ((/[^\x00-\xff]/g).test(this.MaterielItem.pcmpcode.charAt(i))) {
  602. chineseIndex = i
  603. break
  604. }
  605. }
  606. this.MaterielItem.pcmpcode = this.baseUtils.cutOutString(this.MaterielItem.pcmpcode, chineseIndex)
  607. } else if (this.MaterielItem.pcmpcode && this.baseUtils.getRealLen(this.MaterielItem.pcmpcode) > 100) {
  608. this.MaterielItem.pcmpcode = this.baseUtils.cutOutString(this.MaterielItem.pcmpcode, 100)
  609. } else {
  610. this.getSimilarCode()
  611. }
  612. },
  613. onBrandChange: function () {
  614. this.MaterielItem.pbranden = this.MaterielItem.pbranden.trim()
  615. if ((/[^\x00-\xff]/g).test(this.MaterielItem.pbranden)) {
  616. let chineseIndex = -1
  617. for (let i = 0; i < this.MaterielItem.pbranden.length; i++) {
  618. if ((/[^\x00-\xff]/g).test(this.MaterielItem.pbranden.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.MaterielItem.pbranden.charAt(i))) {
  619. chineseIndex = i
  620. break
  621. }
  622. }
  623. if (chineseIndex > -1) {
  624. this.MaterielItem.pbranden = this.MaterielItem.pbranden.substring(0, chineseIndex)
  625. }
  626. } else if (this.MaterielItem.pbranden && this.baseUtils.getRealLen(this.MaterielItem.pbranden) > 50) {
  627. this.MaterielItem.pbranden = this.baseUtils.cutOutString(this.MaterielItem.pbranden, 50)
  628. } else {
  629. this.getSimilarBrand()
  630. }
  631. },
  632. getSimilarBrand: function () {
  633. if (this.MaterielItem.pbranden) {
  634. this.$http.get('/search/similarBrands', {params: {keyword: this.MaterielItem.pbranden}})
  635. .then(response => {
  636. this.similarBrand = response.data
  637. this.showSimilarBrandList = response.data.length > 0
  638. })
  639. } else {
  640. this.showSimilarBrandList = false
  641. }
  642. },
  643. getSimilarCode: function () {
  644. if (this.MaterielItem.pcmpcode) {
  645. this.$http.get('/search/similarComponents', {params: {keyword: this.MaterielItem.pcmpcode}})
  646. .then(response => {
  647. this.similarCode = response.data
  648. this.showSimilarCodeList = response.data.length > 0
  649. })
  650. } else {
  651. this.showSimilarCodeList = false
  652. }
  653. },
  654. setCode: function (code) {
  655. this.MaterielItem.pcmpcode = code
  656. this.showSimilarCodeList = false
  657. },
  658. setBrand: function (brand) {
  659. this.MaterielItem.pbranden = brand
  660. this.showSimilarBrandList = false
  661. },
  662. setRemindText: function (str) {
  663. this.collectResult = str
  664. this.timeoutCount++
  665. },
  666. checkSpec: function () {
  667. // let nullStrFlag =
  668. // this.MaterielItem.spec = nullStrFlag
  669. if (!this.baseUtils.checkNullStr(this.MaterielItem.spec)) {
  670. this.setRemindText('规格输入不合法')
  671. }
  672. return this.MaterielItem.spec
  673. },
  674. onSpecInput: function () {
  675. if (this.MaterielItem.spec && this.baseUtils.getRealLen(this.MaterielItem.spec) > 100) {
  676. this.MaterielItem.spec = this.baseUtils.cutOutString(this.MaterielItem.spec, 100)
  677. }
  678. },
  679. upoffMaterial(type, item) {
  680. if (!type) {
  681. this.showMateriel = false
  682. this.page = 1
  683. this.GetEnterpriseListData = null
  684. this.GetEnterpriseListData = []
  685. this.getResourceProvidor()
  686. } else {
  687. // console.log(this.$item)
  688. // console.log(this.MaterielItem)
  689. // let _key1 = Object.keys(this.$item)
  690. // let _key2 = Object.keys(this.MaterielItem)
  691. // for (let i = 0; i < _key1.length; i++) {
  692. // this.MaterielItem[_key2[i]] = this.$item[_key1[i]]
  693. // }
  694. this.GetEnterpriseListData.splice(this.$index, 1, this.$item)
  695. // delete item.goods
  696. // this.MaterielItem = this.$item
  697. }
  698. this.MaterielItem = {}
  699. }
  700. // _initScroll() {
  701. // this.$nextTick(() => {
  702. // if (!this.scroll) {
  703. // this.scroll = new BScroll(this.$refs.scroll, {
  704. // click: true
  705. // })
  706. // } else {
  707. // this.scroll.refresh()
  708. // }
  709. // })
  710. // }
  711. },
  712. components: {
  713. RemindBox,
  714. PullUp,
  715. upoffMaterial
  716. }
  717. }
  718. </script>
  719. <style lang="scss">
  720. @mixin overFlowHidden {
  721. overflow: hidden;
  722. text-overflow: ellipsis;
  723. white-space: nowrap;
  724. }
  725. @mixin lineHeight($value) {
  726. height: $value;
  727. line-height: $value;
  728. }
  729. .material-wrapper {
  730. background: #f1f3f6;
  731. /*margin: 1.26rem 0 0.98rem 0;*/
  732. /*height: calc(100vh - 1.26rem - 0.98rem);*/
  733. position: absolute;
  734. width: 100%;
  735. top: 1.26rem;
  736. bottom: 0.98rem;
  737. overflow-y: auto;
  738. z-index: 100;
  739. .order-nav {
  740. background: #fff;
  741. div {
  742. height: 0.82rem;
  743. line-height: 0.82rem;
  744. display: inline-block;
  745. width: 50%;
  746. text-align: center;
  747. font-size: .28rem;
  748. color: #666;
  749. &.active span{
  750. color: #3f84f6;
  751. border-bottom: 0.04rem solid #3f84f6;
  752. padding-bottom: 0.2rem;
  753. }
  754. }
  755. }
  756. .search-content {
  757. text-align: center;
  758. padding: .25rem 0;
  759. input {
  760. border: 1px solid #376ff3;
  761. }
  762. span {
  763. }
  764. }
  765. .scrollContent {
  766. height: calc(100vh - 3.19rem - 0.98rem);
  767. overflow-y: auto;
  768. .providerList {
  769. margin-bottom: 0.24rem;
  770. .top {
  771. position: relative;
  772. padding: 0 0.24rem;
  773. border-bottom: 1px solid #d3d3d3;
  774. height: 0.9rem;
  775. line-height: 0.9rem;
  776. color: #0067e7;
  777. font-size: 0.3rem;
  778. background: #fff;
  779. &::after {
  780. clear: both;
  781. display: block;
  782. content: ' ';
  783. visibility: hidden;
  784. zoom: 1;
  785. }
  786. .text {
  787. width: 5.4rem;
  788. }
  789. .pms {
  790. color: #f57710;
  791. border: 1px solid #f57710;
  792. border-radius: 0.4rem;
  793. background: #fff;
  794. font-size: 0.24rem;
  795. height: 0.4rem;
  796. line-height: 0.4rem;
  797. width: 0.8rem;
  798. text-align: center;
  799. float: right;
  800. margin-top: 0.25rem;
  801. }
  802. .store-type {
  803. width: .77rem;
  804. height: .77rem;
  805. position: absolute;
  806. right: 0;
  807. top: 0;
  808. }
  809. .icon {
  810. width: 0.6rem;
  811. height: 0.36rem;
  812. line-height: 0.36rem;
  813. margin-top: 0.27rem;
  814. float: left;
  815. background-size: 100%;
  816. background-repeat: no-repeat;
  817. margin-right: 0.12rem;
  818. text-align: center;
  819. &.istanded {
  820. background-image: url('/images/mobile/@2x/istanded.png')
  821. }
  822. &.standed {
  823. background-image: url('/images/mobile/@2x/standed.png')
  824. }
  825. }
  826. .person-flag {
  827. width: .75rem;
  828. position: absolute;
  829. right: 0;
  830. }
  831. .text {
  832. float: left;
  833. width: 6.3rem;
  834. overflow: hidden;
  835. text-overflow: ellipsis;
  836. white-space: nowrap;
  837. }
  838. }
  839. .middle {
  840. padding: 0.24rem 0.24rem;
  841. background: #fff;
  842. .pms {
  843. color: #f57710;
  844. border: 1px solid #f57710;
  845. border-radius: 0.4rem;
  846. background: #fff;
  847. font-size: 0.24rem;
  848. height: 0.4rem;
  849. line-height: 0.4rem;
  850. width: 0.8rem;
  851. text-align: center;
  852. }
  853. .list {
  854. /*height: 0.46rem;*/
  855. @include overFlowHidden();
  856. width: 100%;
  857. .left {
  858. float: left;
  859. overflow: hidden;
  860. text-overflow: ellipsis;
  861. white-space: nowrap;
  862. }
  863. .textinfo {
  864. color: #0067e7;
  865. font-size: 0.3rem;
  866. }
  867. .button {
  868. font-size: 0.26rem;
  869. color: #fff;
  870. width: 0.92rem;
  871. text-align: center;
  872. border-radius: 5px;
  873. /*border:1px solid #1a58dd;*/
  874. background: #1a58dd;
  875. display: inline-block;
  876. margin-right: 0.2rem;
  877. line-height: 0.33rem;
  878. height: 0.37rem;
  879. }
  880. margin-bottom: 0.18rem;
  881. &::after{
  882. clear: both;
  883. display: block;
  884. content: ' ';
  885. visibility: hidden;
  886. zoom: 1;
  887. }
  888. .fl {
  889. width: 4.3rem;
  890. float: left;
  891. overflow: hidden;
  892. text-overflow: ellipsis;
  893. white-space: nowrap;
  894. }
  895. .fr {
  896. text-align: left;
  897. width: 2.6rem;
  898. overflow: hidden;
  899. text-overflow: ellipsis;
  900. white-space: nowrap;
  901. }
  902. &.list-long {
  903. .fl {
  904. width: 100% !important;
  905. }
  906. }
  907. .name {
  908. color: #666;
  909. font-size: 0.3rem;
  910. display: inline-block;
  911. }
  912. .text {
  913. display: inline-block;
  914. color: #333;
  915. font-size: 0.3rem;
  916. }
  917. .table {
  918. width: 5.5rem;
  919. margin-bottom: 0;
  920. margin-top: 0;
  921. li {
  922. height: 0.43rem;
  923. line-height: 0.43rem;
  924. border-left: .01rem solid #c5c5c5;
  925. font-size: .28rem;
  926. &::after {
  927. clear: both;
  928. display: block;
  929. content: ' ';
  930. visibility: hidden;
  931. zoom: 1;
  932. }
  933. div {
  934. text-align: center;
  935. width: 50%;
  936. float: left;
  937. border-right: .01rem solid #c5c5c5;
  938. border-bottom: .01rem solid #c5c5c5;
  939. }
  940. &:nth-child(odd) {
  941. background: #ddd;
  942. color: #666;
  943. font-size: 0.28rem;
  944. }
  945. &:nth-child(even) {
  946. background: #fcfcfc;
  947. color: #666;
  948. font-size: 0.28rem;
  949. }
  950. &:nth-last-of-type(1){
  951. color: #f31919;
  952. }
  953. &.title {
  954. font-size: 0.28rem;
  955. color: #333;
  956. }
  957. }
  958. }
  959. }
  960. }
  961. div.clearfix {
  962. padding: 0.2rem 0.2rem;
  963. border-top: 1px solid #d3d3d3;
  964. background: #fff;
  965. div{
  966. width: 2.1rem;
  967. height: .6rem;
  968. text-align: center;
  969. line-height: .6rem;
  970. border-radius: 3px;
  971. margin-right: .2rem;
  972. &.look {
  973. color: #008bf7;
  974. border: 1px solid #008bf7;
  975. }
  976. &.add {
  977. background: #fff;
  978. color: #f57710;
  979. border: 1px solid #f57710;
  980. }
  981. &.noadd{
  982. background: #cccbcb;
  983. color: #fff;
  984. border:1px solid #cccbcb;
  985. }
  986. }
  987. }
  988. }
  989. }
  990. }
  991. .update-materiel {
  992. position: fixed;
  993. z-index: 102;
  994. background: #f1f3f6;
  995. /*background: red;*/
  996. top: 0;
  997. left: 0;
  998. bottom: 0;
  999. right: 0;
  1000. .mobile-header{
  1001. position: fixed;
  1002. top: 0;
  1003. z-index: 100;
  1004. width:100%;
  1005. height: 1.26rem;
  1006. line-height: 1.26rem;
  1007. /*border-bottom:.01rem solid #ccc;*/
  1008. background: #3e82f5;
  1009. padding:0 .2rem 0 .1rem;
  1010. color:#fff;
  1011. }
  1012. .mobile-header p{
  1013. overflow: hidden;
  1014. text-overflow: ellipsis;
  1015. white-space: nowrap;
  1016. font-size:.36rem;
  1017. text-align: center;
  1018. width: 6rem;
  1019. padding-left: 1rem;
  1020. }
  1021. .mobile-center-header p.en-name {
  1022. font-size: .3rem;
  1023. }
  1024. .mobile-header a{
  1025. font-size:.28rem;
  1026. color:#fff;
  1027. position: absolute;
  1028. }
  1029. .mobile-header a i{
  1030. font-size: .48rem;
  1031. margin-right: -.1rem;
  1032. }
  1033. .update-materiel-wrapper {
  1034. border-radius: 0.07rem;
  1035. position: fixed;
  1036. overflow: hidden;
  1037. bottom: 0;
  1038. top: 1.46rem;
  1039. left: 0.2rem;
  1040. right: 0.2rem;
  1041. .imgUrl{
  1042. position: absolute;
  1043. width: 0.94rem;
  1044. height: 0.94rem;
  1045. right: 0;
  1046. top: 0;
  1047. z-index: 1;
  1048. }
  1049. .update-materiel-wrapper-image {
  1050. width: 1.09rem;
  1051. height: 1.09rem;
  1052. border: 1px solid #dcdcdc;
  1053. border-radius: 0.07rem;
  1054. position: relative;
  1055. margin: 0rem 0 0 0.5rem;
  1056. text-align: center;
  1057. position: relative;
  1058. float: left;
  1059. span {
  1060. color: #b2b2b2;
  1061. font-size: 0.2rem;
  1062. }
  1063. .com-input {
  1064. width: 100%;
  1065. height: 100%;
  1066. text-align: center;
  1067. position: absolute;
  1068. bottom: 0;
  1069. left: 0;
  1070. opacity: 0;
  1071. display: inline-block !important;
  1072. }
  1073. }
  1074. .uploadImgBtn {
  1075. color: #fff;
  1076. font-size: .28rem;
  1077. width: 1.51rem;
  1078. @include lineHeight(0.47rem);
  1079. border-radius: 0.07rem;
  1080. background: #f9b209;
  1081. text-align: center;
  1082. margin: 0rem 0 0 0.3rem;
  1083. position: relative;
  1084. .com-input {
  1085. width: 100%;
  1086. height: 100%;
  1087. text-align: center;
  1088. position: absolute;
  1089. bottom: 0;
  1090. left: 0;
  1091. opacity: 0;
  1092. display: inline-block !important;
  1093. }
  1094. }
  1095. .uploadImgInfo {
  1096. font-size: 0.24rem;
  1097. margin-left: 0.44rem;
  1098. color: #999;
  1099. .red {
  1100. color: red;
  1101. }
  1102. }
  1103. .update-materiel-wrapper-list {
  1104. margin-left:0.28rem;
  1105. margin-top: 0.3rem;
  1106. line-height: 0.7rem;
  1107. .red {color: #ea0f42}
  1108. .name {color: #666;font-size: 0.28rem}
  1109. .input {
  1110. position: relative;
  1111. width: 5rem;
  1112. line-height: 0.7rem;
  1113. height: 0.7rem;
  1114. border: 1px solid #dcdcdc;
  1115. input {
  1116. text-indent: 5px;
  1117. border: 0;
  1118. border-radius: 0.07rem;
  1119. line-height: 0.64rem;
  1120. height: 0.64rem;
  1121. width: 90%;
  1122. font-size:0.28rem;
  1123. float: left;
  1124. color: #333;
  1125. }
  1126. i {
  1127. font-size: 0.16rem;
  1128. vertical-align: top;
  1129. color: #666;
  1130. float: right;
  1131. margin-right: 0.05rem
  1132. }
  1133. .similar {
  1134. position: absolute;
  1135. width:100%;
  1136. max-height: 2.5rem;
  1137. overflow-y: auto;
  1138. z-index: 12;
  1139. border: 1px solid #7e7e7e;
  1140. border-radius: .05rem;
  1141. top: .5rem;
  1142. background: #fff;
  1143. li {
  1144. height: .5rem;
  1145. line-height: .5rem;
  1146. font-size: .26rem;
  1147. color: #999;
  1148. padding-left: .19rem;
  1149. &:focus, &:active, &:hover {
  1150. background: #999;
  1151. color: #fff;
  1152. }
  1153. }
  1154. }
  1155. }
  1156. }
  1157. .update-materiel-wrapper-list2 {
  1158. margin-left: 0.28rem;
  1159. margin-top: 0.3rem;
  1160. }
  1161. .update-materiel-wrapper-controll {
  1162. margin: 0.4rem 0.2rem 0;
  1163. div {
  1164. width: 48%;
  1165. background: #b5b5b5;
  1166. font-size: 0.3rem;
  1167. color: #fafbfc;
  1168. text-align: center;
  1169. @include lineHeight(0.62rem);
  1170. border-radius: 0.07rem;
  1171. &:first-child {
  1172. background: #3f84f6;
  1173. }
  1174. }
  1175. }
  1176. }
  1177. .selectInput {
  1178. display: inline-block;
  1179. position: relative;
  1180. vertical-align: top;
  1181. height: 0.7rem;
  1182. line-height: 0.7rem;
  1183. border: 1px solid #d2d2d2;
  1184. border-radius: 2px;
  1185. width: 4.44rem;
  1186. text-indent: 0.12rem;
  1187. img {
  1188. position: absolute;
  1189. width: 0.17rem;
  1190. height: 0.11rem;
  1191. right:0.1rem;
  1192. top: 0.28rem;
  1193. }
  1194. &.selectInput2 {
  1195. width: 1.56rem;
  1196. }
  1197. span {
  1198. height: 0.64rem;
  1199. line-height: 0.64rem;
  1200. display: block;
  1201. font-size: 0.28rem;
  1202. }
  1203. ul {
  1204. position: absolute;
  1205. left: 0;
  1206. top: .64rem;
  1207. z-index: 12;
  1208. width: 100%;
  1209. max-height: 3rem;
  1210. overflow-y: auto;
  1211. display: none;
  1212. li {
  1213. text-indent: 0px;
  1214. width: 100%;
  1215. background: #666;
  1216. color: rgba(255, 255, 255, 0.89);
  1217. text-align: center;
  1218. font-size: .3rem;
  1219. }
  1220. &.active {
  1221. display: block;
  1222. }
  1223. }
  1224. }
  1225. }
  1226. </style>