articleOne.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. <template>
  2. <div class="article_one">
  3. <div class="title">
  4. <span><i class="purchase_icon"></i>发布求购</span>
  5. </div>
  6. <div class="publish-area">
  7. <div class="area_title">
  8. <span>单个求购</span>
  9. </div>
  10. <div class="publish-form-area">
  11. <div class="form-item">
  12. <span>
  13. <i>*</i>品牌:
  14. </span>
  15. <input type="text" class="form-control" :class="{'error': !validObj.brand}" v-model="applyObj.brand" @blur="checkBrand" @input="onBrandChange" placeholder="请勿填中文符号" />
  16. <ul class="brand-similar-list" v-show="showSimilarBrandList && applyObj.brand">
  17. <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
  18. </ul>
  19. </div>
  20. <div class="form-item">
  21. <span>
  22. <i>*</i>物料名称(类目):
  23. </span>
  24. <input type="text" class="form-control" :class="{'error': !validObj.prodTitle}" v-model="applyObj.prodTitle" @blur="checkProdTitle" @input="onProdTitleInput"/>
  25. </div>
  26. <div class="form-item">
  27. <span>
  28. <i>*</i>型号:
  29. </span>
  30. <input type="text" class="form-control" :class="{'error': !validObj.code}" v-model="applyObj.code" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号"/>
  31. <ul v-show="showSimilarCodeList && applyObj.code">
  32. <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
  33. </ul>
  34. </div>
  35. <div class="form-item">
  36. <span>
  37. 规格:
  38. </span>
  39. <input type="text" class="form-control" :class="{'error': !validObj.spec}" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput"/>
  40. </div>
  41. <div class="form-item">
  42. <span>
  43. <i>*</i>截止日期:
  44. </span>
  45. <!--<input type="text" class="form-control" readonly :class="{'error': !validObj.deadline}" v-model="applyObj.deadline" @blur="checkDeadline" />-->
  46. <el-date-picker
  47. v-model="applyObj.deadline"
  48. type="date"
  49. :picker-options="pickerOptions"
  50. :class="{'error': !validObj.deadline}"
  51. @change="setDeadLineValid"
  52. :editable="false"
  53. :clearable="true"
  54. size="mini">
  55. </el-date-picker>
  56. </div>
  57. <!--<div class="form-item">
  58. <span>
  59. 单价预算:
  60. </span>
  61. <select v-model="applyObj.currency" class="form-control">
  62. <option value="RMB">¥</option>
  63. <option value="USD">$</option>
  64. </select>
  65. <input type="number" class="form-control" :class="{'error': !validObj.unitPrice}" v-model="applyObj.unitPrice" @blur="checkUnitPrice" @input="onUnitPriceInput" />
  66. </div>-->
  67. <!--<div class="form-item">
  68. <span>
  69. 封装:
  70. </span>
  71. <input type="text" class="form-control" v-model="applyObj.encapsulation" @input="onEncapsulationChange" />
  72. </div>-->
  73. <div class="form-item">
  74. <span>
  75. 采购数量(PCS):
  76. </span>
  77. <input type="text" class="form-control" :class="{'error': !validObj.amount}" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput" />
  78. </div>
  79. <!--<div class="form-item">
  80. <span>
  81. 生产日期:
  82. </span>
  83. <input type="text" class="form-control" v-model="applyObj.produceDate" @input="onProduceDateChange" />
  84. </div>-->
  85. <div class="form-item">
  86. <a @click="goPublish">发布求购</a>
  87. </div>
  88. </div>
  89. <div class="area_title">
  90. <span>批量求购</span>
  91. </div>
  92. <div class="publish-upload">
  93. <h2>3秒一键配单采购</h2>
  94. <label>
  95. <img src="/images/applyPurchase/upload.png" />
  96. <el-upload
  97. drag
  98. action="/seek/importBom"
  99. accept="*.xls, *.xlsx"
  100. :show-file-list="false"
  101. :on-success="onSuccess"
  102. :on-error="onError">
  103. </el-upload>
  104. </label>
  105. <h3>把Excel格式的BOM<br/>拖放到框中</h3>
  106. <a @click="downloadTemplate()" class="download-line"><i class="down_icon"></i>Excel模板下载</a>
  107. </div>
  108. </div>
  109. <!--提示框-->
  110. <div class="apply-del-box" v-if="showRemindBox">
  111. <div class="title">
  112. <a @click="showRemindBox = false"><i class="fa fa-close fa-lg"></i></a>
  113. </div>
  114. <div class="content">
  115. <!--<p style="line-height: 20px;margin-top: 10px;padding:0 10px">非常抱歉,目前暂无此品牌!<br>若直接前往“品牌申请”,我们将为您先开通寄售功能,待申请通过后再提交开店申请。</p>-->
  116. <!--<p style="line-height: 20px;">前往<a @click="goBrandApply()" target="_blank" style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>-->
  117. <p><img src="/images/applyPurchase/check.png" alt="">发布成功</p>
  118. <p>其中 <span>100</span>个求购型号有现货在售,您可前往“<span>买家中心-我的求购</span>”查询并直接购买</p>
  119. <div>
  120. <a @click="showRemindBox = false">我知道了</a>
  121. <a href="/user#/seekPurchase">前往我的求购</a>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </template>
  127. <script>
  128. export default {
  129. data () {
  130. return {
  131. applyObj: {
  132. code: '',
  133. brand: '',
  134. unitPrice: '',
  135. currency: 'RMB',
  136. prodTitle: '',
  137. spec: '',
  138. encapsulation: '',
  139. produceDate: '',
  140. amount: '',
  141. deadline: ''
  142. },
  143. validObj: {
  144. code: true,
  145. brand: true,
  146. unitPrice: true,
  147. // encapsulation: true,
  148. // produceDate: true,
  149. amount: true,
  150. deadline: true,
  151. spec: true,
  152. prodTitle: true
  153. },
  154. pickerOptions: {
  155. disabledDate (time) {
  156. // 大于等于今天 小于三个月后
  157. return time.getTime() < Date.now() - 1000 * 60 * 60 * 24 || time.getTime() > Date.now() + 1000 * 60 * 60 * 24 * 30 * 3
  158. }
  159. },
  160. showRemindBox: false,
  161. showSimilarCodeList: false,
  162. showSimilarBrandList: false,
  163. similarCode: [],
  164. similarBrand: []
  165. }
  166. },
  167. computed: {
  168. goodPurchaseMan () {
  169. return this.$store.state.applyPurchase.goodPurchaseMan.goodPurchaseMan.data
  170. },
  171. user () {
  172. return this.$store.state.option.user
  173. }
  174. },
  175. filters: {
  176. enterpriseFilter (str) {
  177. return str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str
  178. },
  179. userNameFilter (str) {
  180. return str.substring(0, 1) + '**'
  181. }
  182. },
  183. mounted () {
  184. let _this = this
  185. this.$nextTick(() => {
  186. document.getElementsByClassName('el-upload-dragger')[0].onclick = function (event) {
  187. event.stopPropagation()
  188. }
  189. document.body.onclick = function () {
  190. _this.showSimilarCodeList = false
  191. _this.showSimilarBrandList = false
  192. }
  193. })
  194. },
  195. methods: {
  196. emptyForm: function () {
  197. for (let attr in this.applyObj) {
  198. this.applyObj[attr] = attr === 'currency' ? 'RMB' : ''
  199. }
  200. },
  201. getRankBg: function (index) {
  202. return index === 0 ? 1 : index < 3 ? 2 : 3
  203. },
  204. getMaterialKind: function (code, brand) {
  205. return this.$http.get('/productuser/match/getKind', {params: {cmpCode: code, brand: brand}})
  206. },
  207. startPublish: function (prodTitle) {
  208. let inquiry = {}
  209. let inquiryItem = {}
  210. if (this.user.data.enterprise) {
  211. inquiry.enUU = this.user.data.enterprise.uu
  212. }
  213. let date = new Date()
  214. let currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  215. inquiry.recorderUU = this.user.data.userUU
  216. inquiry.code = 'MALL' + date.getTime()
  217. inquiry.date = date
  218. inquiry.recorder = this.user.data.userName
  219. inquiry.endDate = this.applyObj.deadline
  220. inquiry.sourceapp = 'MALL'
  221. inquiry.amount = 1
  222. inquiryItem.userUU = this.user.data.userUU
  223. inquiryItem.source = 'MALL'
  224. inquiryItem.userName = this.user.data.userName
  225. inquiryItem.userTel = this.user.data.userTel
  226. inquiryItem.needquantity = this.applyObj.amount
  227. inquiryItem.inbrand = this.applyObj.brand
  228. inquiryItem.spec = this.applyObj.spec
  229. inquiryItem.currency = currency
  230. inquiryItem.cmpCode = this.applyObj.code.trim().toUpperCase()
  231. inquiryItem.unitPrice = this.applyObj.unitPrice
  232. inquiryItem.produceDate = this.applyObj.produceDate
  233. inquiryItem.date = date
  234. inquiryItem.endDate = this.applyObj.deadline
  235. inquiryItem.encapsulation = this.applyObj.encapsulation
  236. inquiryItem.spec = this.applyObj.spec
  237. inquiryItem.prodTitle = prodTitle || this.applyObj.prodTitle || '其他'
  238. let inquiryItems = []
  239. inquiryItems.push(inquiryItem)
  240. inquiry.inquiryItems = inquiryItems
  241. inquiry.currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  242. this.$http.post('/inquiry/buyer/save', inquiry)
  243. .then(response => {
  244. this.$message.success('发布成功')
  245. // this.showRemindBox = true
  246. this.emptyForm()
  247. // this.validObj.deadline = true
  248. this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
  249. }, error => {
  250. console.log(error)
  251. this.$message.error('发布失败')
  252. })
  253. },
  254. goPublish: function () {
  255. if (this.user.logged) {
  256. this.authorityInterceptor(this.baseUrls.userPublishSeek, () => {
  257. if (this.checkAll()) {
  258. // if (!this.applyObj.prodTitle || this.applyObj.prodTitle.length === 0) {
  259. // this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
  260. // this.startPublish(response.data && response.data.length ? response.data : '其他')
  261. // })
  262. // } else {
  263. // this.startPublish()
  264. // }
  265. this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
  266. this.startPublish(response.data && response.data.length ? response.data : this.applyObj.prodTitle)
  267. })
  268. } else {
  269. if (!this.validObj.prodTitle) {
  270. this.$message.error('类目不能为空')
  271. } else if (!this.validObj.deadline) {
  272. this.$message.error('截止日期不能为空')
  273. } else if (!this.validObj.amount) {
  274. this.$message.error('请输入正确的数值')
  275. }
  276. }
  277. })
  278. } else {
  279. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  280. }
  281. },
  282. getSimilarCode: function () {
  283. if (this.applyObj.code) {
  284. this.$http.get('/search/similarComponents', {params: {keyword: this.applyObj.code}})
  285. .then(response => {
  286. this.similarCode = response.data
  287. this.showSimilarCodeList = response.data.length > 0
  288. })
  289. } else {
  290. this.showSimilarCodeList = false
  291. }
  292. },
  293. getSimilarBrand: function () {
  294. if (this.applyObj.brand) {
  295. this.$http.get('/search/similarBrands', {params: {keyword: this.applyObj.brand}})
  296. .then(response => {
  297. this.similarBrand = response.data
  298. this.showSimilarBrandList = response.data.length > 0
  299. })
  300. } else {
  301. this.showSimilarBrandList = false
  302. }
  303. },
  304. checkCode: function () {
  305. let code = this.applyObj.code.trim()
  306. let nullStrFlag = this.baseUtils.checkNullStr(code)
  307. this.validObj.code = code && code !== '' && nullStrFlag
  308. if (!this.validObj.code) {
  309. if (!nullStrFlag) {
  310. this.$message.error('型号输入不合法')
  311. } else {
  312. this.$message.error('型号不能为空')
  313. }
  314. }
  315. return this.validObj.code
  316. },
  317. checkProdTitle: function () {
  318. let prodTitle = this.applyObj.prodTitle.trim()
  319. this.validObj.prodTitle = prodTitle && prodTitle !== ''
  320. if (!this.validObj.prodTitle) {
  321. this.$message.error('类目不能为空')
  322. }
  323. console.log(prodTitle)
  324. return this.validObj.prodTitle
  325. },
  326. checkBrand: function () {
  327. let nullStrFlag = this.baseUtils.checkNullStr(this.applyObj.brand)
  328. this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== '' && nullStrFlag
  329. if (!this.validObj.brand) {
  330. if (!nullStrFlag) {
  331. this.$message.error('品牌输入不合法')
  332. } else {
  333. this.$message.error('品牌不能为空')
  334. }
  335. }
  336. return this.validObj.brand
  337. },
  338. checkUnitPrice: function () {
  339. this.validObj.unitPrice = this.applyObj.unitPrice === '' ? true : this.applyObj.unitPrice > 0 && this.applyObj.unitPrice < 100000000
  340. if (!this.validObj.unitPrice && this.applyObj.unitPrice <= 0) {
  341. this.$message.error('单价必须是大于0的数字')
  342. }
  343. return this.validObj.unitPrice
  344. },
  345. checkSpec: function () {
  346. let nullStrFlag = this.baseUtils.checkNullStr(this.applyObj.spec)
  347. this.validObj.spec = nullStrFlag
  348. if (!nullStrFlag) {
  349. this.$message.error('规格输入不合法')
  350. }
  351. return this.validObj.spec
  352. },
  353. checkAmount: function () {
  354. this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
  355. return this.validObj.amount
  356. },
  357. checkAll: function () {
  358. return this.checkBrand() && this.checkProdTitle() && this.checkCode() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
  359. },
  360. checkDeadline: function () {
  361. this.validObj.deadline = Boolean(this.applyObj.deadline)
  362. return this.validObj.deadline
  363. },
  364. setDeadLineValid: function () {
  365. this.applyObj.deadline = this.baseUtils.formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
  366. this.validObj.deadline = true
  367. },
  368. onUnitPriceInput: function () {
  369. let price = this.applyObj.unitPrice
  370. if (price >= 10000) {
  371. this.applyObj.unitPrice = price.substring(0, 4)
  372. } else if (price.indexOf('.') > -1) {
  373. let arr = price.split('.')
  374. if (arr[0].length > 4) {
  375. this.applyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  376. } else if (arr[1].length > 6) {
  377. this.applyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  378. }
  379. }
  380. },
  381. onProduceDateChange: function () {
  382. if (this.applyObj.produceDate && this.baseUtils.getRealLen(this.applyObj.produceDate) > 12) {
  383. this.applyObj.produceDate = this.baseUtils.cutOutString(this.applyObj.produceDate, 12)
  384. }
  385. },
  386. onEncapsulationChange: function () {
  387. if (this.applyObj.encapsulation && this.baseUtils.getRealLen(this.applyObj.encapsulation) > 20) {
  388. this.applyObj.encapsulation = this.baseUtils.cutOutString(this.applyObj.encapsulation, 20)
  389. }
  390. },
  391. onProdTitleInput: function () {
  392. if (this.applyObj.prodTitle && this.baseUtils.getRealLen(this.applyObj.prodTitle) > 40) {
  393. this.applyObj.prodTitle = this.baseUtils.cutOutString(this.applyObj.prodTitle, 40)
  394. }
  395. },
  396. onSpecInput: function () {
  397. if (this.applyObj.spec && this.baseUtils.getRealLen(this.applyObj.spec) > 100) {
  398. this.applyObj.spec = this.baseUtils.cutOutString(this.applyObj.spec, 100)
  399. }
  400. },
  401. onCodeChange: function () {
  402. if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
  403. let chineseIndex = -1
  404. for (let i = 0; i < this.applyObj.code.length; i++) {
  405. if ((/[^\x00-\xff]/g).test(this.applyObj.code.charAt(i))) {
  406. chineseIndex = i
  407. break
  408. }
  409. }
  410. this.applyObj.code = this.baseUtils.cutOutString(this.applyObj.code, chineseIndex)
  411. } else if (this.applyObj.code && this.baseUtils.getRealLen(this.applyObj.code) > 100) {
  412. this.applyObj.code = this.baseUtils.cutOutString(this.applyObj.code, 100)
  413. } else {
  414. this.getSimilarCode()
  415. }
  416. },
  417. onBrandChange: function () {
  418. this.applyObj.brand = this.applyObj.brand.trim()
  419. if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
  420. let chineseIndex = -1
  421. for (let i = 0; i < this.applyObj.brand.length; i++) {
  422. if ((/[^\x00-\xff]/g).test(this.applyObj.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.applyObj.brand.charAt(i))) {
  423. chineseIndex = i
  424. break
  425. }
  426. }
  427. if (chineseIndex > -1) {
  428. this.applyObj.brand = this.applyObj.brand.substring(0, chineseIndex)
  429. }
  430. } else if (this.applyObj.brand && this.baseUtils.getRealLen(this.applyObj.brand) > 50) {
  431. this.applyObj.brand = this.baseUtils.cutOutString(this.applyObj.brand, 50)
  432. } else {
  433. this.getSimilarBrand()
  434. }
  435. },
  436. onAmountInput: function () {
  437. if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
  438. let chineseIndex = -1
  439. for (let i = 0; i < this.applyObj.amount.length; i++) {
  440. if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
  441. chineseIndex = i
  442. break
  443. }
  444. }
  445. this.applyObj.amount = this.baseUtils.cutOutString(this.applyObj.amount, chineseIndex)
  446. } else if (this.applyObj.amount.length > 9) {
  447. this.applyObj.amount = this.baseUtils.cutOutString(this.applyObj.amount, 9)
  448. }
  449. },
  450. onSuccess: function (data) {
  451. if (!this.user.logged) {
  452. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  453. } else {
  454. // 能拦截跳转但无法阻止上传
  455. this.authorityInterceptor(this.baseUrls.userImportBom, () => {
  456. if (data.success) {
  457. window.location.href = '/applyPurchase/' + data.data
  458. } else {
  459. this.$message.error(data.message)
  460. }
  461. })
  462. }
  463. },
  464. onError: function () {
  465. if (!this.user.logged) {
  466. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  467. } else {
  468. this.$message.error('上传失败, 系统错误')
  469. }
  470. },
  471. downloadTemplate: function () {
  472. window.location.href = '/seek/release/template'
  473. },
  474. setCode: function (code) {
  475. this.applyObj.code = code
  476. this.showSimilarCodeList = false
  477. },
  478. setBrand: function (brand) {
  479. this.applyObj.brand = brand
  480. this.showSimilarBrandList = false
  481. }
  482. // upload: function (e) {
  483. // let file = e.target.files[0]
  484. // let param = new FormData()
  485. // param.append('file', file, file.name)
  486. // let config = {
  487. // headers: {'Content-Type': file.type}
  488. // }
  489. // this.$http.post('/seek/importBom', param, config).then(response => {
  490. // if (response.data.success) {
  491. // window.open('/applyPurchase/' + response.data.data)
  492. // } else {
  493. // this.$message.error('上传失败')
  494. // }
  495. // }, err => {
  496. // console.log(err)
  497. // this.$message.error('系统错误')
  498. // })
  499. // }
  500. }
  501. }
  502. </script>
  503. <style lang="scss" type="text/scss">
  504. .article_one{
  505. border-radius:5px;
  506. background: #fff;
  507. margin-bottom:30px;
  508. .title{
  509. height:34px;
  510. line-height: 34px;
  511. background: #2496f1;
  512. padding:0 10px;
  513. border-top-left-radius: 5px;
  514. border-top-right-radius: 5px;
  515. span{
  516. font-size: 14px;
  517. color:#fff;
  518. line-height: 30px;
  519. font-weight: bold;
  520. }
  521. }
  522. .publish-area{
  523. padding:5px 10px 10px;
  524. .area_title{
  525. border-bottom:1px solid #e5e5e5;
  526. margin-bottom:10px;
  527. span{
  528. position:relative;
  529. top:1px;
  530. display:inline-block;
  531. height:25px;
  532. line-height: 25px;
  533. border-bottom:1px solid #2496f1;
  534. font-size: 14px;
  535. color:#666;
  536. }
  537. }
  538. .publish-form-area{
  539. background: #d3eafc;
  540. border-radius:10px;
  541. padding:5px 10px;
  542. margin-bottom:5px;
  543. .form-item {
  544. margin-bottom: 5px;
  545. position: relative;
  546. >a{
  547. width: 120px;
  548. height: 30px;
  549. line-height: 30px;
  550. background: #2496f1;
  551. color: #eee;
  552. font-size: 14px;
  553. display: block;
  554. border-radius: 3px;
  555. cursor: pointer;
  556. text-align: center;
  557. margin:15px auto;
  558. }
  559. >span {
  560. text-align: right;
  561. display: inline-block;
  562. line-height: 23px;
  563. color: #333;
  564. i {
  565. position: relative;
  566. top: 2px;
  567. right: 3px;
  568. color: #e41515;
  569. }
  570. }
  571. > ul {
  572. line-height: normal;
  573. position: absolute;
  574. top: 100%;
  575. left: 0;
  576. background: #fff;
  577. border: 1px solid #b5b5b5;
  578. z-index: 1;
  579. max-height: 120px;
  580. overflow-y: auto;
  581. overflow-x: hidden;
  582. border-radius: 3px;
  583. width: 178px;
  584. font-size: 12px;
  585. li {
  586. height: 24px;
  587. line-height: 24px;
  588. cursor: pointer;
  589. overflow: hidden;
  590. text-overflow: ellipsis;
  591. white-space: nowrap;
  592. padding: 0 3px;
  593. &:hover {
  594. background: #ddd;
  595. }
  596. }
  597. }
  598. select {
  599. width: 32px;
  600. position: absolute;
  601. height: 20px;
  602. background: url('/images/applyPurchase/select.png')no-repeat right;
  603. background-position-x: 15px;
  604. padding: 0 0 0 3px;
  605. border-radius: 0;
  606. & + input {
  607. padding-left: 34px;
  608. }
  609. }
  610. .el-input {
  611. width: 100%;
  612. }
  613. input {
  614. font-size: 12px;
  615. height: 26px;
  616. line-height: 26px;
  617. border-radius: 5px;
  618. padding: 0 3px;
  619. box-shadow: none;
  620. -webkit-box-shadow: none;
  621. -moz-box-shadow: none;
  622. &.error {
  623. border-color: #f4645f!important;
  624. }
  625. }
  626. }
  627. }
  628. .publish-upload{
  629. height:208px;
  630. background: #d3eafc;
  631. border-radius:5px;
  632. text-align: center;
  633. color:#666;
  634. padding-top:16px;
  635. h2 {
  636. font-size: 12px;
  637. margin:0;
  638. margin-bottom:18px;
  639. }
  640. h3 {
  641. font-size: 12px;
  642. line-height: 20px;
  643. margin: 15px 0;
  644. }
  645. label {
  646. position: relative;
  647. > div {
  648. position: absolute;
  649. }
  650. }
  651. .download-line {
  652. cursor: pointer;
  653. width: 130px;
  654. height: 30px;
  655. line-height: 30px;
  656. background: #2496f1;
  657. color: #eee;
  658. font-size: 12px;
  659. display: block;
  660. border-radius: 3px;
  661. text-align: center;
  662. margin:15px auto;
  663. }
  664. }
  665. }
  666. }
  667. .el-upload {
  668. input {
  669. display: none;
  670. }
  671. .el-upload-dragger {
  672. width: 198px;
  673. height: 150px;
  674. position: absolute;
  675. top: -80px;
  676. left: -75px;
  677. opacity: 0;
  678. }
  679. }
  680. .el-date-editor--date{
  681. width: 100%;
  682. &.error {
  683. input {
  684. border: 1px solid #f4645f !important;
  685. }
  686. }
  687. }
  688. .el-icon-date {
  689. display: none;
  690. }
  691. .el-input__inner {
  692. height: 20px;
  693. border-radius: 0;
  694. border: 1px solid #c9c9c9;
  695. }
  696. </style>