articleOne.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  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. document.getElementsByClassName('el-upload-dragger')[0].onclick = function (event) {
  185. event.stopPropagation()
  186. }
  187. let _this = this
  188. document.body.onclick = function () {
  189. _this.showSimilarCodeList = false
  190. _this.showSimilarBrandList = false
  191. }
  192. },
  193. methods: {
  194. emptyForm: function () {
  195. for (let attr in this.applyObj) {
  196. this.applyObj[attr] = attr === 'currency' ? 'RMB' : ''
  197. }
  198. },
  199. getRankBg: function (index) {
  200. return index === 0 ? 1 : index < 3 ? 2 : 3
  201. },
  202. getMaterialKind: function (code, brand) {
  203. return this.$http.get('/productuser/match/getKind', {params: {cmpCode: code, brand: brand}})
  204. },
  205. startPublish: function (prodTitle) {
  206. let inquiry = {}
  207. let inquiryItem = {}
  208. if (this.user.data.enterprise) {
  209. inquiry.enUU = this.user.data.enterprise.uu
  210. }
  211. let date = new Date()
  212. let currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  213. inquiry.recorderUU = this.user.data.userUU
  214. inquiry.code = 'MALL' + date.getTime()
  215. inquiry.date = date
  216. inquiry.recorder = this.user.data.userName
  217. inquiry.endDate = this.applyObj.deadline
  218. inquiry.sourceapp = 'MALL'
  219. inquiry.amount = 1
  220. inquiryItem.userUU = this.user.data.userUU
  221. inquiryItem.source = 'MALL'
  222. inquiryItem.userName = this.user.data.userName
  223. inquiryItem.userTel = this.user.data.userTel
  224. inquiryItem.needquantity = this.applyObj.amount
  225. inquiryItem.inbrand = this.applyObj.brand
  226. inquiryItem.spec = this.applyObj.spec
  227. inquiryItem.currency = currency
  228. inquiryItem.cmpCode = this.applyObj.code.trim().toUpperCase()
  229. inquiryItem.unitPrice = this.applyObj.unitPrice
  230. inquiryItem.produceDate = this.applyObj.produceDate
  231. inquiryItem.date = date
  232. inquiryItem.endDate = this.applyObj.deadline
  233. inquiryItem.encapsulation = this.applyObj.encapsulation
  234. inquiryItem.spec = this.applyObj.spec
  235. inquiryItem.prodTitle = prodTitle || this.applyObj.prodTitle || '其他'
  236. let inquiryItems = []
  237. inquiryItems.push(inquiryItem)
  238. inquiry.inquiryItems = inquiryItems
  239. inquiry.currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  240. this.$http.post('/inquiry/buyer/save', inquiry)
  241. .then(response => {
  242. this.$message.success('发布成功')
  243. // this.showRemindBox = true
  244. this.emptyForm()
  245. // this.validObj.deadline = true
  246. this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
  247. }, error => {
  248. console.log(error)
  249. this.$message.error('发布失败')
  250. })
  251. },
  252. goPublish: function () {
  253. if (this.user.logged) {
  254. this.authorityInterceptor(this.baseUrls.userPublishSeek, () => {
  255. if (this.checkAll()) {
  256. // if (!this.applyObj.prodTitle || this.applyObj.prodTitle.length === 0) {
  257. // this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
  258. // this.startPublish(response.data && response.data.length ? response.data : '其他')
  259. // })
  260. // } else {
  261. // this.startPublish()
  262. // }
  263. this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
  264. this.startPublish(response.data && response.data.length ? response.data : this.applyObj.prodTitle)
  265. })
  266. } else {
  267. if (!this.validObj.prodTitle) {
  268. this.$message.error('类目不能为空')
  269. } else if (!this.validObj.deadline) {
  270. this.$message.error('截止日期不能为空')
  271. } else if (!this.validObj.amount) {
  272. this.$message.error('请输入正确的数值')
  273. }
  274. }
  275. })
  276. } else {
  277. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  278. }
  279. },
  280. getSimilarCode: function () {
  281. if (this.applyObj.code) {
  282. this.$http.get('/search/similarComponents', {params: {keyword: this.applyObj.code}})
  283. .then(response => {
  284. this.similarCode = response.data
  285. this.showSimilarCodeList = response.data.length > 0
  286. })
  287. } else {
  288. this.showSimilarCodeList = false
  289. }
  290. },
  291. getSimilarBrand: function () {
  292. if (this.applyObj.brand) {
  293. this.$http.get('/search/similarBrands', {params: {keyword: this.applyObj.brand}})
  294. .then(response => {
  295. this.similarBrand = response.data
  296. this.showSimilarBrandList = response.data.length > 0
  297. })
  298. } else {
  299. this.showSimilarBrandList = false
  300. }
  301. },
  302. checkCode: function () {
  303. let code = this.applyObj.code.trim()
  304. let nullStrFlag = this.baseUtils.checkNullStr(code)
  305. this.validObj.code = code && code !== '' && nullStrFlag
  306. if (!this.validObj.code) {
  307. if (!nullStrFlag) {
  308. this.$message.error('型号输入不合法')
  309. } else {
  310. this.$message.error('型号不能为空')
  311. }
  312. }
  313. return this.validObj.code
  314. },
  315. checkProdTitle: function () {
  316. let prodTitle = this.applyObj.prodTitle.trim()
  317. this.validObj.prodTitle = prodTitle && prodTitle !== ''
  318. if (!this.validObj.prodTitle) {
  319. this.$message.error('类目不能为空')
  320. }
  321. console.log(prodTitle)
  322. return this.validObj.prodTitle
  323. },
  324. checkBrand: function () {
  325. let nullStrFlag = this.baseUtils.checkNullStr(this.applyObj.brand)
  326. this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== '' && nullStrFlag
  327. if (!this.validObj.brand) {
  328. if (!nullStrFlag) {
  329. this.$message.error('品牌输入不合法')
  330. } else {
  331. this.$message.error('品牌不能为空')
  332. }
  333. }
  334. return this.validObj.brand
  335. },
  336. checkUnitPrice: function () {
  337. this.validObj.unitPrice = this.applyObj.unitPrice === '' ? true : this.applyObj.unitPrice > 0 && this.applyObj.unitPrice < 100000000
  338. if (!this.validObj.unitPrice && this.applyObj.unitPrice <= 0) {
  339. this.$message.error('单价必须是大于0的数字')
  340. }
  341. return this.validObj.unitPrice
  342. },
  343. checkSpec: function () {
  344. let nullStrFlag = this.baseUtils.checkNullStr(this.applyObj.spec)
  345. this.validObj.spec = nullStrFlag
  346. if (!nullStrFlag) {
  347. this.$message.error('规格输入不合法')
  348. }
  349. return this.validObj.spec
  350. },
  351. checkAmount: function () {
  352. this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
  353. return this.validObj.amount
  354. },
  355. checkAll: function () {
  356. return this.checkBrand() && this.checkProdTitle() && this.checkCode() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
  357. },
  358. checkDeadline: function () {
  359. this.validObj.deadline = Boolean(this.applyObj.deadline)
  360. return this.validObj.deadline
  361. },
  362. setDeadLineValid: function () {
  363. this.applyObj.deadline = this.baseUtils.formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
  364. this.validObj.deadline = true
  365. },
  366. onUnitPriceInput: function () {
  367. let price = this.applyObj.unitPrice
  368. if (price >= 10000) {
  369. this.applyObj.unitPrice = price.substring(0, 4)
  370. } else if (price.indexOf('.') > -1) {
  371. let arr = price.split('.')
  372. if (arr[0].length > 4) {
  373. this.applyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  374. } else if (arr[1].length > 6) {
  375. this.applyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  376. }
  377. }
  378. },
  379. onProduceDateChange: function () {
  380. if (this.applyObj.produceDate && this.baseUtils.getRealLen(this.applyObj.produceDate) > 12) {
  381. this.applyObj.produceDate = this.baseUtils.cutOutString(this.applyObj.produceDate, 12)
  382. }
  383. },
  384. onEncapsulationChange: function () {
  385. if (this.applyObj.encapsulation && this.baseUtils.getRealLen(this.applyObj.encapsulation) > 20) {
  386. this.applyObj.encapsulation = this.baseUtils.cutOutString(this.applyObj.encapsulation, 20)
  387. }
  388. },
  389. onProdTitleInput: function () {
  390. if (this.applyObj.prodTitle && this.baseUtils.getRealLen(this.applyObj.prodTitle) > 40) {
  391. this.applyObj.prodTitle = this.baseUtils.cutOutString(this.applyObj.prodTitle, 40)
  392. }
  393. },
  394. onSpecInput: function () {
  395. if (this.applyObj.spec && this.baseUtils.getRealLen(this.applyObj.spec) > 100) {
  396. this.applyObj.spec = this.baseUtils.cutOutString(this.applyObj.spec, 100)
  397. }
  398. },
  399. onCodeChange: function () {
  400. if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
  401. let chineseIndex = -1
  402. for (let i = 0; i < this.applyObj.code.length; i++) {
  403. if ((/[^\x00-\xff]/g).test(this.applyObj.code.charAt(i))) {
  404. chineseIndex = i
  405. break
  406. }
  407. }
  408. this.applyObj.code = this.baseUtils.cutOutString(this.applyObj.code, chineseIndex)
  409. } else if (this.applyObj.code && this.baseUtils.getRealLen(this.applyObj.code) > 100) {
  410. this.applyObj.code = this.baseUtils.cutOutString(this.applyObj.code, 100)
  411. } else {
  412. this.getSimilarCode()
  413. }
  414. },
  415. onBrandChange: function () {
  416. this.applyObj.brand = this.applyObj.brand.trim()
  417. if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
  418. let chineseIndex = -1
  419. for (let i = 0; i < this.applyObj.brand.length; i++) {
  420. if ((/[^\x00-\xff]/g).test(this.applyObj.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.applyObj.brand.charAt(i))) {
  421. chineseIndex = i
  422. break
  423. }
  424. }
  425. if (chineseIndex > -1) {
  426. this.applyObj.brand = this.applyObj.brand.substring(0, chineseIndex)
  427. }
  428. } else if (this.applyObj.brand && this.baseUtils.getRealLen(this.applyObj.brand) > 50) {
  429. this.applyObj.brand = this.baseUtils.cutOutString(this.applyObj.brand, 50)
  430. } else {
  431. this.getSimilarBrand()
  432. }
  433. },
  434. onAmountInput: function () {
  435. if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
  436. let chineseIndex = -1
  437. for (let i = 0; i < this.applyObj.amount.length; i++) {
  438. if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
  439. chineseIndex = i
  440. break
  441. }
  442. }
  443. this.applyObj.amount = this.baseUtils.cutOutString(this.applyObj.amount, chineseIndex)
  444. } else if (this.applyObj.amount.length > 9) {
  445. this.applyObj.amount = this.baseUtils.cutOutString(this.applyObj.amount, 9)
  446. }
  447. },
  448. onSuccess: function (data) {
  449. if (!this.user.logged) {
  450. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  451. } else {
  452. // 能拦截跳转但无法阻止上传
  453. this.authorityInterceptor(this.baseUrls.userImportBom, () => {
  454. if (data.success) {
  455. window.location.href = '/applyPurchase/' + data.data
  456. } else {
  457. this.$message.error(data.message)
  458. }
  459. })
  460. }
  461. },
  462. onError: function () {
  463. if (!this.user.logged) {
  464. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  465. } else {
  466. this.$message.error('上传失败, 系统错误')
  467. }
  468. },
  469. downloadTemplate: function () {
  470. window.location.href = '/seek/release/template'
  471. },
  472. setCode: function (code) {
  473. this.applyObj.code = code
  474. this.showSimilarCodeList = false
  475. },
  476. setBrand: function (brand) {
  477. this.applyObj.brand = brand
  478. this.showSimilarBrandList = false
  479. }
  480. // upload: function (e) {
  481. // let file = e.target.files[0]
  482. // let param = new FormData()
  483. // param.append('file', file, file.name)
  484. // let config = {
  485. // headers: {'Content-Type': file.type}
  486. // }
  487. // this.$http.post('/seek/importBom', param, config).then(response => {
  488. // if (response.data.success) {
  489. // window.open('/applyPurchase/' + response.data.data)
  490. // } else {
  491. // this.$message.error('上传失败')
  492. // }
  493. // }, err => {
  494. // console.log(err)
  495. // this.$message.error('系统错误')
  496. // })
  497. // }
  498. }
  499. }
  500. </script>
  501. <style lang="scss" type="text/scss">
  502. .article_one{
  503. border-radius:5px;
  504. background: #fff;
  505. margin-bottom:30px;
  506. .title{
  507. height:30px;
  508. background: #2496f1;
  509. padding:0 10px;
  510. span{
  511. font-size: 14px;
  512. color:#fff;
  513. line-height: 30px;
  514. font-weight: bold;
  515. }
  516. }
  517. .publish-area{
  518. padding:5px 10px 10px;
  519. .area_title{
  520. border-bottom:1px solid #e5e5e5;
  521. margin-bottom:10px;
  522. span{
  523. position:relative;
  524. top:1px;
  525. display:inline-block;
  526. height:25px;
  527. line-height: 25px;
  528. border-bottom:1px solid #2496f1;
  529. font-size: 14px;
  530. color:#666;
  531. }
  532. }
  533. .publish-form-area{
  534. background: #d3eafc;
  535. border-radius:10px;
  536. padding:5px 10px;
  537. margin-bottom:5px;
  538. .form-item {
  539. margin-bottom: 5px;
  540. position: relative;
  541. >a{
  542. width: 120px;
  543. height: 30px;
  544. line-height: 30px;
  545. background: #2496f1;
  546. color: #eee;
  547. font-size: 14px;
  548. display: block;
  549. border-radius: 3px;
  550. cursor: pointer;
  551. text-align: center;
  552. margin:15px auto;
  553. }
  554. >span {
  555. text-align: right;
  556. display: inline-block;
  557. line-height: 23px;
  558. color: #333;
  559. i {
  560. position: relative;
  561. top: 2px;
  562. right: 3px;
  563. color: #e41515;
  564. }
  565. }
  566. > ul {
  567. line-height: normal;
  568. position: absolute;
  569. top: 100%;
  570. left: 0;
  571. background: #fff;
  572. border: 1px solid #b5b5b5;
  573. z-index: 1;
  574. max-height: 120px;
  575. overflow-y: auto;
  576. overflow-x: hidden;
  577. border-radius: 3px;
  578. width: 178px;
  579. font-size: 12px;
  580. li {
  581. height: 24px;
  582. line-height: 24px;
  583. cursor: pointer;
  584. overflow: hidden;
  585. text-overflow: ellipsis;
  586. white-space: nowrap;
  587. padding: 0 3px;
  588. &:hover {
  589. background: #ddd;
  590. }
  591. }
  592. }
  593. select {
  594. width: 32px;
  595. position: absolute;
  596. height: 20px;
  597. background: url('/images/applyPurchase/select.png')no-repeat right;
  598. background-position-x: 15px;
  599. padding: 0 0 0 3px;
  600. border-radius: 0;
  601. & + input {
  602. padding-left: 34px;
  603. }
  604. }
  605. .el-input {
  606. width: 100%;
  607. }
  608. input {
  609. font-size: 12px;
  610. height: 26px;
  611. line-height: 26px;
  612. border-radius: 5px;
  613. padding: 0 3px;
  614. box-shadow: none;
  615. -webkit-box-shadow: none;
  616. -moz-box-shadow: none;
  617. &.error {
  618. border-color: #f4645f!important;
  619. }
  620. }
  621. }
  622. }
  623. .publish-upload{
  624. height:208px;
  625. background: #d3eafc;
  626. border-radius:5px;
  627. text-align: center;
  628. color:#666;
  629. padding-top:16px;
  630. h2 {
  631. font-size: 12px;
  632. margin:0;
  633. margin-bottom:18px;
  634. }
  635. h3 {
  636. font-size: 12px;
  637. line-height: 20px;
  638. margin: 15px 0;
  639. }
  640. label {
  641. position: relative;
  642. > div {
  643. position: absolute;
  644. }
  645. }
  646. .download-line {
  647. cursor: pointer;
  648. width: 130px;
  649. height: 30px;
  650. line-height: 30px;
  651. background: #2496f1;
  652. color: #eee;
  653. font-size: 12px;
  654. display: block;
  655. border-radius: 3px;
  656. text-align: center;
  657. margin:15px auto;
  658. }
  659. }
  660. }
  661. }
  662. .el-upload {
  663. input {
  664. display: none;
  665. }
  666. .el-upload-dragger {
  667. width: 198px;
  668. height: 150px;
  669. position: absolute;
  670. top: -80px;
  671. left: -75px;
  672. opacity: 0;
  673. }
  674. }
  675. .el-date-editor--date{
  676. width: 100%;
  677. &.error {
  678. input {
  679. border: 1px solid #f4645f !important;
  680. }
  681. }
  682. }
  683. .el-icon-date {
  684. display: none;
  685. }
  686. .el-input__inner {
  687. height: 20px;
  688. border-radius: 0;
  689. border: 1px solid #c9c9c9;
  690. }
  691. </style>