material.vue 43 KB

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