material.vue 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245
  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" :isFromME="isFromME">
  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.isFromME = true // 自营
  309. this.$http.get('/store-service/stores', { params: { filter: 'enUU', enUU: this.$store.state.option.user.data.enterprise.uu } }).then(response => {
  310. if (!response.data.uuid || response.data.uuid === '33069557578d44e69bd91ad12d28a8d4') {
  311. this.isFromME = false
  312. }
  313. // this.$store.commit('option/REQUEST_STORE_STATUS_SUCCESS', response.data)
  314. }, err => {
  315. // this.$store.commit('option/REQUEST_STORE_STATUS_FAILURE', err)
  316. })
  317. this.getResourceProvidor()
  318. // this.MaterielItem.packaging = this.packObj[0]
  319. },
  320. computed: {
  321. // 是否展示空数据
  322. StateNone() {
  323. return this.GetEnterpriseListData.length === 0 && this.EnterprisePage === 0
  324. }
  325. },
  326. methods: {
  327. // 打开pdf
  328. WinOpen(item) {
  329. window.open(item, '_blank')
  330. },
  331. // 获取当前企业产品库
  332. GetEnterpriseList: function() {
  333. let params = {
  334. _status: 'all',
  335. count: 20,
  336. isStandard: true,
  337. keyword: this.seekKeyword || '',
  338. page: this.seekPage,
  339. sorting: { id: 'DESC' },
  340. type: 'all'
  341. }
  342. return this.$http.get('/trade/products', { params })
  343. },
  344. // 获取当前个人产品库
  345. GetPersonList: function(cb) {
  346. let params = {
  347. _status: 'all',
  348. count: 20,
  349. isStandard: true,
  350. keyword: this.seekKeyword || '',
  351. page: this.seekPage,
  352. sorting: { id: 'DESC' },
  353. type: 'all'
  354. }
  355. return this.$http.get('/trade/products/person', { params })
  356. },
  357. ChangeList(_tp) {
  358. this.activeType = _tp
  359. this.seekPage = 1
  360. this.GetEnterpriseListData = []
  361. this.getResourceProvidor()
  362. },
  363. getResourceProvidor: function() {
  364. if (this.activeType === '') {
  365. this.GetEnterpriseList().then(res => {
  366. this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
  367. this.EnterprisePage = res.data.totalPages
  368. this.isSearchSearchingMore = false
  369. })
  370. } else if (this.activeType === 'mine') {
  371. this.GetPersonList().then(res => {
  372. this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
  373. this.EnterprisePage = res.data.totalPages
  374. this.isSearchSearchingMore = false
  375. })
  376. } else if (this.providerType === 'onLine') {
  377. this.GetOnlineList().then(res => {
  378. this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
  379. this.EnterprisePage = res.data.totalPages
  380. this.isSearchSearchingMore = false
  381. })
  382. }
  383. },
  384. getMoreSearch: function () {
  385. this.seekPage++
  386. this.isSearchSearchingMore = true
  387. this.getResourceProvidor()
  388. },
  389. searchSeek: function() {
  390. this.seekPage = 0
  391. this.GetEnterpriseListData = []
  392. this.getMoreSearch()
  393. },
  394. addProtoperson: function(item) {
  395. if (item.addProductPerson) {
  396. this.collectResult = '已在个人产品库'
  397. this.timeoutCount++
  398. return false
  399. }
  400. this.$http.post('/trade/products/person', [item.id])
  401. .then(response => {
  402. this.collectResult = '绑定成功'
  403. this.timeoutCount++
  404. this.seekPage = 1
  405. this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
  406. this.GetEnterpriseListData = null
  407. this.GetEnterpriseListData = []
  408. this.getResourceProvidor()
  409. // this.reloadData()
  410. }, () => {
  411. this.collectResult = '绑定失败'
  412. this.timeoutCount++
  413. })
  414. },
  415. // 编辑上架
  416. toAddpro(item, index) {
  417. if (item.erpReserve === '' || item.erpReserve === 0 || !item.erpReserve) {
  418. this.setRemindText(`当前物料库存为0,请先入库`)
  419. return false
  420. }
  421. if (item.minPackQty === '' || item.minPackQty === 0 || !item.minPackQty) {
  422. this.setRemindText(`请先编辑物料,最小包装数选项`)
  423. return false
  424. }
  425. // this.$item = this.baseUtils.deepCopy(item)
  426. this.$index = index
  427. // this.MaterielItem = item
  428. this.MaterielItem = item
  429. this.$item = this.baseUtils.deepCopy(this.MaterielItem)
  430. if (!this.MaterielItem.goods) {
  431. this.$set(this.MaterielItem, 'goods', {
  432. prices: [{end: '',
  433. rMBNTPrice: '',
  434. rMBPrice: '',
  435. start: '1'}],
  436. selfSale: 1,
  437. breakUp: true,
  438. autoPublish: true,
  439. productid: item.id,
  440. minDelivery: 1,
  441. maxDelivery: 10,
  442. minBuyQty: 1
  443. })
  444. }
  445. if (this.MaterielItem.goods.prices.length === 0) {
  446. this.MaterielItem.goods.prices = [{end: '', rMBNTPrice: '', rMBPrice: '', start: '1'}]
  447. }
  448. this.firstPrice = this.MaterielItem.goods.prices[0].start.toString()
  449. let rf = document.body.offsetHeight // 触发浏览器重绘
  450. // console.log(item)
  451. this.$refs.upoffMaterial.show()
  452. },
  453. update2 (e) {
  454. // 上传图片
  455. let file = e.target.files[0]
  456. if (file.size > 1024 * 1024) {
  457. this.setRemindText(`上传文件不得超过1M`)
  458. return false
  459. }
  460. if (file.type.indexOf('gif') > -1) {
  461. this.setRemindText(`不允许上传gif`)
  462. return false
  463. }
  464. let param = new FormData()
  465. param.append('file', file, file.name)
  466. param.append('chunk', '0')
  467. let config = {
  468. headers: {'Content-Type': 'multipart/form-data'}
  469. }
  470. this.$http.post('/api/images', param, config)
  471. .then(response => {
  472. this.$set(this.MaterielItem, 'cmpImg', response.data[0].path)
  473. // this.MaterielItem.cmpImg = response.data[0].path
  474. })
  475. },
  476. update (e) {
  477. // 上传PDF
  478. let file = e.target.files[0]
  479. if (file.size > 1024 * 1024 * 20) {
  480. this.setRemindText(`上传文件不得超过20M`)
  481. return false
  482. }
  483. if (file.type.indexOf('pdf') < 0) {
  484. this.setRemindText(`规格书只允许上传pdf文件`)
  485. return false
  486. }
  487. let param = new FormData()
  488. param.append('file', file, file.name)
  489. param.append('chunk', '0')
  490. let config = {
  491. headers: {'Content-Type': file.type}
  492. }
  493. this.$http.post('/file', param, config)
  494. .then(response => {
  495. this.MaterielItem.IsSave = true
  496. this.MaterielItem.Regulpic = response.data[0].path
  497. }, err => {
  498. console.log(err)
  499. })
  500. },
  501. // 编辑物料
  502. updateMateriel(item) {
  503. // Object.assign(this.MaterielItem, item, {Regulpic: '', IsSave: false, cmpImg: ''})
  504. this.MaterielItem = item
  505. this.$item = this.baseUtils.deepCopy(item)
  506. this.MaterielItem.minPackQty = (this.MaterielItem.minPackQty === '' || this.MaterielItem.minPackQty === 0) ? 1 : this.MaterielItem.minPackQty
  507. this.MaterielItem.packaging = (!this.MaterielItem.packaging && this.MaterielItem.packaging === '') ? this.packObj[0] : this.MaterielItem.packaging
  508. this.$set(this.MaterielItem, 'IsSave', (item.productAttachSubmit && item.productAttachSubmit.uploadAttach || item.attach) ? true : false) // 规格书是否存在
  509. this.$set(this.MaterielItem, 'cmpImg', item.cmpImg || '')
  510. this.$set(this.MaterielItem, 'Regulpic', (item.productAttachSubmit && item.productAttachSubmit.uploadAttach) || item.attach || '')
  511. this.showMateriel = true
  512. // this._initScroll()
  513. },
  514. // 编辑物料保存按钮
  515. saveMateriel(str) {
  516. if (str) {
  517. let _key1 = Object.keys(this.$item)
  518. let _key2 = Object.keys(this.MaterielItem)
  519. for (let i = 0; i < _key1.length; i++) {
  520. this.MaterielItem[_key2[i]] = this.$item[_key1[i]]
  521. }
  522. this.showMateriel = false
  523. this.showDrop = ''
  524. return
  525. }
  526. if (this.MaterielItem.pbranden === '') {
  527. this.setRemindText('品牌不能为空')
  528. return
  529. } else if (this.MaterielItem.kind === '') {
  530. this.setRemindText('物料名称不能为空')
  531. return
  532. } else if (this.MaterielItem.minPackQty === '') {
  533. this.setRemindText('最小包装数不能为空')
  534. return
  535. } else if (this.MaterielItem.pcmpcode === '') {
  536. this.setRemindText('型号不能为空')
  537. return
  538. }
  539. this.MaterielItem.pcmpcode = this.MaterielItem.pcmpcode
  540. this.MaterielItem.pbranden = this.MaterielItem.pbranden
  541. let item = {
  542. id: this.MaterielItem.id,
  543. kind : this.MaterielItem.kind,
  544. pbranden: this.MaterielItem.pbranden,
  545. pcmpcode: this.MaterielItem.pcmpcode,
  546. spec: this.MaterielItem.spec,
  547. url: this.MaterielItem.Regulpic || '',
  548. cmpImg: this.MaterielItem.cmpImg, // 物料图片
  549. packaging: this.MaterielItem.packaging, // 包装
  550. minPackQty: this.MaterielItem.minPackQty // 最小包装数
  551. }
  552. let _url = item.url
  553. if (this.MaterielItem.standard === 1) {
  554. _url = ''
  555. }
  556. this.$http.post(`/trade/products/update/product?attachUrl=${_url}`, item).then(res => {
  557. if (res.data.success) {
  558. this.setRemindText('修改成功')
  559. this.showMateriel = false
  560. this.page = 1
  561. this.GetEnterpriseListData = null
  562. this.GetEnterpriseListData = []
  563. this.getResourceProvidor()
  564. } else {
  565. this.setRemindText(res.data.message)
  566. }
  567. })
  568. },
  569. // 显示包装选择
  570. showdropmenu(str) {
  571. this.showDrop = str
  572. },
  573. // 选择包装
  574. choosePack(item) {
  575. this.showDrop = ''
  576. this.MaterielItem.packaging = item
  577. },
  578. // 关闭包装选项
  579. closeAlert() {
  580. this.MaterielItem = this.$item
  581. this.showDrop = ''
  582. },
  583. clearInfo() {
  584. this.showSimilarCodeList = false
  585. this.showSimilarBrandList = false
  586. },
  587. checkBrand: function () {
  588. // this.MaterielItem.brand = this.MaterielItem.brand && this.MaterielItem.brand !== ''
  589. if (!this.MaterielItem.pbranden || this.MaterielItem.pbranden === '') {
  590. this.setRemindText('品牌不能为空')
  591. }
  592. return this.MaterielItem.pbranden
  593. },
  594. checkCode: function () {
  595. if (!this.MaterielItem.pcmpcode || this.MaterielItem.pcmpcode === '') {
  596. this.setRemindText('型号不能为空')
  597. }
  598. return this.MaterielItem.pcmpcode
  599. },
  600. onCodeChange: function () {
  601. this.MaterielItem.pcmpcode = this.MaterielItem.pcmpcode.trim()
  602. if ((/[^\x00-\xff]/g).test(this.MaterielItem.pcmpcode)) {
  603. let chineseIndex = -1
  604. for (let i = 0; i < this.MaterielItem.pcmpcode.length; i++) {
  605. if ((/[^\x00-\xff]/g).test(this.MaterielItem.pcmpcode.charAt(i))) {
  606. chineseIndex = i
  607. break
  608. }
  609. }
  610. this.MaterielItem.pcmpcode = this.baseUtils.cutOutString(this.MaterielItem.pcmpcode, chineseIndex)
  611. } else if (this.MaterielItem.pcmpcode && this.baseUtils.getRealLen(this.MaterielItem.pcmpcode) > 100) {
  612. this.MaterielItem.pcmpcode = this.baseUtils.cutOutString(this.MaterielItem.pcmpcode, 100)
  613. } else {
  614. this.getSimilarCode()
  615. }
  616. },
  617. onBrandChange: function () {
  618. this.MaterielItem.pbranden = this.MaterielItem.pbranden.trim()
  619. if ((/[^\x00-\xff]/g).test(this.MaterielItem.pbranden)) {
  620. let chineseIndex = -1
  621. for (let i = 0; i < this.MaterielItem.pbranden.length; i++) {
  622. if ((/[^\x00-\xff]/g).test(this.MaterielItem.pbranden.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.MaterielItem.pbranden.charAt(i))) {
  623. chineseIndex = i
  624. break
  625. }
  626. }
  627. if (chineseIndex > -1) {
  628. this.MaterielItem.pbranden = this.MaterielItem.pbranden.substring(0, chineseIndex)
  629. }
  630. } else if (this.MaterielItem.pbranden && this.baseUtils.getRealLen(this.MaterielItem.pbranden) > 50) {
  631. this.MaterielItem.pbranden = this.baseUtils.cutOutString(this.MaterielItem.pbranden, 50)
  632. } else {
  633. this.getSimilarBrand()
  634. }
  635. },
  636. getSimilarBrand: function () {
  637. if (this.MaterielItem.pbranden) {
  638. this.$http.get('/search/similarBrands', {params: {keyword: this.MaterielItem.pbranden}})
  639. .then(response => {
  640. this.similarBrand = response.data
  641. this.showSimilarBrandList = response.data.length > 0
  642. })
  643. } else {
  644. this.showSimilarBrandList = false
  645. }
  646. },
  647. getSimilarCode: function () {
  648. if (this.MaterielItem.pcmpcode) {
  649. this.$http.get('/search/similarComponents', {params: {keyword: this.MaterielItem.pcmpcode}})
  650. .then(response => {
  651. this.similarCode = response.data
  652. this.showSimilarCodeList = response.data.length > 0
  653. })
  654. } else {
  655. this.showSimilarCodeList = false
  656. }
  657. },
  658. setCode: function (code) {
  659. this.MaterielItem.pcmpcode = code
  660. this.showSimilarCodeList = false
  661. },
  662. setBrand: function (brand) {
  663. this.MaterielItem.pbranden = brand
  664. this.showSimilarBrandList = false
  665. },
  666. setRemindText: function (str) {
  667. this.collectResult = str
  668. this.timeoutCount++
  669. },
  670. checkSpec: function () {
  671. // let nullStrFlag =
  672. // this.MaterielItem.spec = nullStrFlag
  673. if (!this.baseUtils.checkNullStr(this.MaterielItem.spec)) {
  674. this.setRemindText('规格输入不合法')
  675. }
  676. return this.MaterielItem.spec
  677. },
  678. onSpecInput: function () {
  679. if (this.MaterielItem.spec && this.baseUtils.getRealLen(this.MaterielItem.spec) > 100) {
  680. this.MaterielItem.spec = this.baseUtils.cutOutString(this.MaterielItem.spec, 100)
  681. }
  682. },
  683. upoffMaterial(type, item) {
  684. if (!type) {
  685. this.showMateriel = false
  686. this.page = 1
  687. this.GetEnterpriseListData = null
  688. this.GetEnterpriseListData = []
  689. this.getResourceProvidor()
  690. } else {
  691. // console.log(this.$item)
  692. // console.log(this.MaterielItem)
  693. // let _key1 = Object.keys(this.$item)
  694. // let _key2 = Object.keys(this.MaterielItem)
  695. // for (let i = 0; i < _key1.length; i++) {
  696. // this.MaterielItem[_key2[i]] = this.$item[_key1[i]]
  697. // }
  698. this.GetEnterpriseListData.splice(this.$index, 1, this.$item)
  699. // delete item.goods
  700. // this.MaterielItem = this.$item
  701. }
  702. this.MaterielItem = {}
  703. }
  704. // _initScroll() {
  705. // this.$nextTick(() => {
  706. // if (!this.scroll) {
  707. // this.scroll = new BScroll(this.$refs.scroll, {
  708. // click: true
  709. // })
  710. // } else {
  711. // this.scroll.refresh()
  712. // }
  713. // })
  714. // }
  715. },
  716. components: {
  717. RemindBox,
  718. PullUp,
  719. upoffMaterial
  720. }
  721. }
  722. </script>
  723. <style lang="scss">
  724. @mixin overFlowHidden {
  725. overflow: hidden;
  726. text-overflow: ellipsis;
  727. white-space: nowrap;
  728. }
  729. @mixin lineHeight($value) {
  730. height: $value;
  731. line-height: $value;
  732. }
  733. .material-wrapper {
  734. background: #f1f3f6;
  735. /*margin: 1.26rem 0 0.98rem 0;*/
  736. /*height: calc(100vh - 1.26rem - 0.98rem);*/
  737. position: absolute;
  738. width: 100%;
  739. top: 1.26rem;
  740. bottom: 0.98rem;
  741. overflow-y: auto;
  742. z-index: 100;
  743. .order-nav {
  744. background: #fff;
  745. div {
  746. height: 0.82rem;
  747. line-height: 0.82rem;
  748. display: inline-block;
  749. width: 50%;
  750. text-align: center;
  751. font-size: .28rem;
  752. color: #666;
  753. &.active span{
  754. color: #3f84f6;
  755. border-bottom: 0.04rem solid #3f84f6;
  756. padding-bottom: 0.2rem;
  757. }
  758. }
  759. }
  760. .search-content {
  761. text-align: center;
  762. padding: .25rem 0;
  763. input {
  764. border: 1px solid #376ff3;
  765. }
  766. span {
  767. }
  768. }
  769. .scrollContent {
  770. height: calc(100vh - 3.19rem - 0.98rem);
  771. overflow-y: auto;
  772. .providerList {
  773. margin-bottom: 0.24rem;
  774. .top {
  775. position: relative;
  776. padding: 0 0.24rem;
  777. border-bottom: 1px solid #d3d3d3;
  778. height: 0.9rem;
  779. line-height: 0.9rem;
  780. color: #0067e7;
  781. font-size: 0.3rem;
  782. background: #fff;
  783. &::after {
  784. clear: both;
  785. display: block;
  786. content: ' ';
  787. visibility: hidden;
  788. zoom: 1;
  789. }
  790. .text {
  791. width: 5.4rem;
  792. }
  793. .pms {
  794. color: #f57710;
  795. border: 1px solid #f57710;
  796. border-radius: 0.4rem;
  797. background: #fff;
  798. font-size: 0.24rem;
  799. height: 0.4rem;
  800. line-height: 0.4rem;
  801. width: 0.8rem;
  802. text-align: center;
  803. float: right;
  804. margin-top: 0.25rem;
  805. }
  806. .store-type {
  807. width: .77rem;
  808. height: .77rem;
  809. position: absolute;
  810. right: 0;
  811. top: 0;
  812. }
  813. .icon {
  814. width: 0.6rem;
  815. height: 0.36rem;
  816. line-height: 0.36rem;
  817. margin-top: 0.27rem;
  818. float: left;
  819. background-size: 100%;
  820. background-repeat: no-repeat;
  821. margin-right: 0.12rem;
  822. text-align: center;
  823. &.istanded {
  824. background-image: url('/images/mobile/@2x/istanded.png')
  825. }
  826. &.standed {
  827. background-image: url('/images/mobile/@2x/standed.png')
  828. }
  829. }
  830. .person-flag {
  831. width: .75rem;
  832. position: absolute;
  833. right: 0;
  834. }
  835. .text {
  836. float: left;
  837. width: 6.3rem;
  838. overflow: hidden;
  839. text-overflow: ellipsis;
  840. white-space: nowrap;
  841. }
  842. }
  843. .middle {
  844. padding: 0.24rem 0.24rem;
  845. background: #fff;
  846. .pms {
  847. color: #f57710;
  848. border: 1px solid #f57710;
  849. border-radius: 0.4rem;
  850. background: #fff;
  851. font-size: 0.24rem;
  852. height: 0.4rem;
  853. line-height: 0.4rem;
  854. width: 0.8rem;
  855. text-align: center;
  856. }
  857. .list {
  858. /*height: 0.46rem;*/
  859. @include overFlowHidden();
  860. width: 100%;
  861. .left {
  862. float: left;
  863. overflow: hidden;
  864. text-overflow: ellipsis;
  865. white-space: nowrap;
  866. }
  867. .textinfo {
  868. color: #0067e7;
  869. font-size: 0.3rem;
  870. }
  871. .button {
  872. font-size: 0.26rem;
  873. color: #fff;
  874. width: 0.92rem;
  875. text-align: center;
  876. border-radius: 5px;
  877. /*border:1px solid #1a58dd;*/
  878. background: #1a58dd;
  879. display: inline-block;
  880. margin-right: 0.2rem;
  881. line-height: 0.33rem;
  882. height: 0.37rem;
  883. }
  884. margin-bottom: 0.18rem;
  885. &::after{
  886. clear: both;
  887. display: block;
  888. content: ' ';
  889. visibility: hidden;
  890. zoom: 1;
  891. }
  892. .fl {
  893. width: 4.3rem;
  894. float: left;
  895. overflow: hidden;
  896. text-overflow: ellipsis;
  897. white-space: nowrap;
  898. }
  899. .fr {
  900. text-align: left;
  901. width: 2.6rem;
  902. overflow: hidden;
  903. text-overflow: ellipsis;
  904. white-space: nowrap;
  905. }
  906. &.list-long {
  907. .fl {
  908. width: 100% !important;
  909. }
  910. }
  911. .name {
  912. color: #666;
  913. font-size: 0.3rem;
  914. display: inline-block;
  915. }
  916. .text {
  917. display: inline-block;
  918. color: #333;
  919. font-size: 0.3rem;
  920. }
  921. .table {
  922. width: 5.5rem;
  923. margin-bottom: 0;
  924. margin-top: 0;
  925. li {
  926. height: 0.43rem;
  927. line-height: 0.43rem;
  928. border-left: .01rem solid #c5c5c5;
  929. font-size: .28rem;
  930. &::after {
  931. clear: both;
  932. display: block;
  933. content: ' ';
  934. visibility: hidden;
  935. zoom: 1;
  936. }
  937. div {
  938. text-align: center;
  939. width: 50%;
  940. float: left;
  941. border-right: .01rem solid #c5c5c5;
  942. border-bottom: .01rem solid #c5c5c5;
  943. }
  944. &:nth-child(odd) {
  945. background: #ddd;
  946. color: #666;
  947. font-size: 0.28rem;
  948. }
  949. &:nth-child(even) {
  950. background: #fcfcfc;
  951. color: #666;
  952. font-size: 0.28rem;
  953. }
  954. &:nth-last-of-type(1){
  955. color: #f31919;
  956. }
  957. &.title {
  958. font-size: 0.28rem;
  959. color: #333;
  960. }
  961. }
  962. }
  963. }
  964. }
  965. div.clearfix {
  966. padding: 0.2rem 0.2rem;
  967. border-top: 1px solid #d3d3d3;
  968. background: #fff;
  969. div{
  970. width: 2.1rem;
  971. height: .6rem;
  972. text-align: center;
  973. line-height: .6rem;
  974. border-radius: 3px;
  975. margin-right: .2rem;
  976. &.look {
  977. color: #008bf7;
  978. border: 1px solid #008bf7;
  979. }
  980. &.add {
  981. background: #fff;
  982. color: #f57710;
  983. border: 1px solid #f57710;
  984. }
  985. &.noadd{
  986. background: #cccbcb;
  987. color: #fff;
  988. border:1px solid #cccbcb;
  989. }
  990. }
  991. }
  992. }
  993. }
  994. }
  995. .update-materiel {
  996. position: fixed;
  997. z-index: 102;
  998. background: #f1f3f6;
  999. /*background: red;*/
  1000. top: 0;
  1001. left: 0;
  1002. bottom: 0;
  1003. right: 0;
  1004. .mobile-header{
  1005. position: fixed;
  1006. top: 0;
  1007. z-index: 100;
  1008. width:100%;
  1009. height: 1.26rem;
  1010. line-height: 1.26rem;
  1011. /*border-bottom:.01rem solid #ccc;*/
  1012. background: #3e82f5;
  1013. padding:0 .2rem 0 .1rem;
  1014. color:#fff;
  1015. }
  1016. .mobile-header p{
  1017. overflow: hidden;
  1018. text-overflow: ellipsis;
  1019. white-space: nowrap;
  1020. font-size:.36rem;
  1021. text-align: center;
  1022. width: 6rem;
  1023. padding-left: 1rem;
  1024. }
  1025. .mobile-center-header p.en-name {
  1026. font-size: .3rem;
  1027. }
  1028. .mobile-header a{
  1029. font-size:.28rem;
  1030. color:#fff;
  1031. position: absolute;
  1032. }
  1033. .mobile-header a i{
  1034. font-size: .48rem;
  1035. margin-right: -.1rem;
  1036. }
  1037. .update-materiel-wrapper {
  1038. border-radius: 0.07rem;
  1039. position: fixed;
  1040. overflow: hidden;
  1041. bottom: 0;
  1042. top: 1.46rem;
  1043. left: 0.2rem;
  1044. right: 0.2rem;
  1045. .imgUrl{
  1046. position: absolute;
  1047. width: 0.94rem;
  1048. height: 0.94rem;
  1049. right: 0;
  1050. top: 0;
  1051. z-index: 1;
  1052. }
  1053. .update-materiel-wrapper-image {
  1054. width: 1.09rem;
  1055. height: 1.09rem;
  1056. border: 1px solid #dcdcdc;
  1057. border-radius: 0.07rem;
  1058. position: relative;
  1059. margin: 0rem 0 0 0.5rem;
  1060. text-align: center;
  1061. position: relative;
  1062. float: left;
  1063. span {
  1064. color: #b2b2b2;
  1065. font-size: 0.2rem;
  1066. }
  1067. .com-input {
  1068. width: 100%;
  1069. height: 100%;
  1070. text-align: center;
  1071. position: absolute;
  1072. bottom: 0;
  1073. left: 0;
  1074. opacity: 0;
  1075. display: inline-block !important;
  1076. }
  1077. }
  1078. .uploadImgBtn {
  1079. color: #fff;
  1080. font-size: .28rem;
  1081. width: 1.51rem;
  1082. @include lineHeight(0.47rem);
  1083. border-radius: 0.07rem;
  1084. background: #f9b209;
  1085. text-align: center;
  1086. margin: 0rem 0 0 0.3rem;
  1087. position: relative;
  1088. .com-input {
  1089. width: 100%;
  1090. height: 100%;
  1091. text-align: center;
  1092. position: absolute;
  1093. bottom: 0;
  1094. left: 0;
  1095. opacity: 0;
  1096. display: inline-block !important;
  1097. }
  1098. }
  1099. .uploadImgInfo {
  1100. font-size: 0.24rem;
  1101. margin-left: 0.44rem;
  1102. color: #999;
  1103. .red {
  1104. color: red;
  1105. }
  1106. }
  1107. .update-materiel-wrapper-list {
  1108. margin-left:0.28rem;
  1109. margin-top: 0.3rem;
  1110. line-height: 0.7rem;
  1111. .red {color: #ea0f42}
  1112. .name {color: #666;font-size: 0.28rem}
  1113. .input {
  1114. position: relative;
  1115. width: 5rem;
  1116. line-height: 0.7rem;
  1117. height: 0.7rem;
  1118. border: 1px solid #dcdcdc;
  1119. input {
  1120. text-indent: 5px;
  1121. border: 0;
  1122. border-radius: 0.07rem;
  1123. line-height: 0.64rem;
  1124. height: 0.64rem;
  1125. width: 90%;
  1126. font-size:0.28rem;
  1127. float: left;
  1128. color: #333;
  1129. }
  1130. i {
  1131. font-size: 0.16rem;
  1132. vertical-align: top;
  1133. color: #666;
  1134. float: right;
  1135. margin-right: 0.05rem
  1136. }
  1137. .similar {
  1138. position: absolute;
  1139. width:100%;
  1140. max-height: 2.5rem;
  1141. overflow-y: auto;
  1142. z-index: 12;
  1143. border: 1px solid #7e7e7e;
  1144. border-radius: .05rem;
  1145. top: .5rem;
  1146. background: #fff;
  1147. li {
  1148. height: .5rem;
  1149. line-height: .5rem;
  1150. font-size: .26rem;
  1151. color: #999;
  1152. padding-left: .19rem;
  1153. &:focus, &:active, &:hover {
  1154. background: #999;
  1155. color: #fff;
  1156. }
  1157. }
  1158. }
  1159. }
  1160. }
  1161. .update-materiel-wrapper-list2 {
  1162. margin-left: 0.28rem;
  1163. margin-top: 0.3rem;
  1164. }
  1165. .update-materiel-wrapper-controll {
  1166. margin: 0.4rem 0.2rem 0;
  1167. div {
  1168. width: 48%;
  1169. background: #b5b5b5;
  1170. font-size: 0.3rem;
  1171. color: #fafbfc;
  1172. text-align: center;
  1173. @include lineHeight(0.62rem);
  1174. border-radius: 0.07rem;
  1175. &:first-child {
  1176. background: #3f84f6;
  1177. }
  1178. }
  1179. }
  1180. }
  1181. .selectInput {
  1182. display: inline-block;
  1183. position: relative;
  1184. vertical-align: top;
  1185. height: 0.7rem;
  1186. line-height: 0.7rem;
  1187. border: 1px solid #d2d2d2;
  1188. border-radius: 2px;
  1189. width: 4.44rem;
  1190. text-indent: 0.12rem;
  1191. img {
  1192. position: absolute;
  1193. width: 0.17rem;
  1194. height: 0.11rem;
  1195. right:0.1rem;
  1196. top: 0.28rem;
  1197. }
  1198. &.selectInput2 {
  1199. width: 1.56rem;
  1200. }
  1201. span {
  1202. height: 0.64rem;
  1203. line-height: 0.64rem;
  1204. display: block;
  1205. font-size: 0.28rem;
  1206. }
  1207. ul {
  1208. position: absolute;
  1209. left: 0;
  1210. top: .64rem;
  1211. z-index: 12;
  1212. width: 100%;
  1213. max-height: 3rem;
  1214. overflow-y: auto;
  1215. display: none;
  1216. li {
  1217. text-indent: 0px;
  1218. width: 100%;
  1219. background: #666;
  1220. color: rgba(255, 255, 255, 0.89);
  1221. text-align: center;
  1222. font-size: .3rem;
  1223. }
  1224. &.active {
  1225. display: block;
  1226. }
  1227. }
  1228. }
  1229. }
  1230. </style>