articleOne.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710
  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.code}" v-model="applyObj.code" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号"/>
  16. <ul v-show="showSimilarCodeList && applyObj.code">
  17. <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</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.brand}" v-model="applyObj.brand" @blur="checkBrand" @input="onBrandChange" placeholder="请勿填中文符号" />
  25. <ul class="brand-similar-list" v-show="showSimilarBrandList && applyObj.brand">
  26. <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
  27. </ul>
  28. </div>
  29. <div class="form-item">
  30. <span>
  31. <i>*</i>物料名称:
  32. </span>
  33. <input type="text" class="form-control" :class="{'error': !validObj.prodTitle}" v-model="applyObj.prodTitle" @blur="checkProdTitle" @input="onProdTitleInput"/>
  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. return this.validObj.prodTitle
  324. },
  325. checkBrand: function () {
  326. let nullStrFlag = this.baseUtils.checkNullStr(this.applyObj.brand)
  327. this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== '' && nullStrFlag
  328. if (!this.validObj.brand) {
  329. if (!nullStrFlag) {
  330. this.$message.error('品牌输入不合法')
  331. } else {
  332. this.$message.error('品牌不能为空')
  333. }
  334. }
  335. return this.validObj.brand
  336. },
  337. checkUnitPrice: function () {
  338. this.validObj.unitPrice = this.applyObj.unitPrice === '' ? true : this.applyObj.unitPrice > 0 && this.applyObj.unitPrice < 100000000
  339. if (!this.validObj.unitPrice && this.applyObj.unitPrice <= 0) {
  340. this.$message.error('单价必须是大于0的数字')
  341. }
  342. return this.validObj.unitPrice
  343. },
  344. checkSpec: function () {
  345. let nullStrFlag = this.baseUtils.checkNullStr(this.applyObj.spec)
  346. this.validObj.spec = nullStrFlag
  347. if (!nullStrFlag) {
  348. this.$message.error('规格输入不合法')
  349. }
  350. return this.validObj.spec
  351. },
  352. checkAmount: function () {
  353. this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
  354. return this.validObj.amount
  355. },
  356. checkAll: function () {
  357. return this.checkCode() && this.checkBrand() && this.checkProdTitle() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
  358. },
  359. checkDeadline: function () {
  360. this.validObj.deadline = Boolean(this.applyObj.deadline)
  361. return this.validObj.deadline
  362. },
  363. setDeadLineValid: function () {
  364. this.applyObj.deadline = this.baseUtils.formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
  365. this.validObj.deadline = true
  366. },
  367. onUnitPriceInput: function () {
  368. let price = this.applyObj.unitPrice
  369. if (price >= 10000) {
  370. this.applyObj.unitPrice = price.substring(0, 4)
  371. } else if (price.indexOf('.') > -1) {
  372. let arr = price.split('.')
  373. if (arr[0].length > 4) {
  374. this.applyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  375. } else if (arr[1].length > 6) {
  376. this.applyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  377. }
  378. }
  379. },
  380. onProduceDateChange: function () {
  381. if (this.applyObj.produceDate && this.baseUtils.getRealLen(this.applyObj.produceDate) > 12) {
  382. this.applyObj.produceDate = this.baseUtils.cutOutString(this.applyObj.produceDate, 12)
  383. }
  384. },
  385. onEncapsulationChange: function () {
  386. if (this.applyObj.encapsulation && this.baseUtils.getRealLen(this.applyObj.encapsulation) > 20) {
  387. this.applyObj.encapsulation = this.baseUtils.cutOutString(this.applyObj.encapsulation, 20)
  388. }
  389. },
  390. onProdTitleInput: function () {
  391. if (this.applyObj.prodTitle && this.baseUtils.getRealLen(this.applyObj.prodTitle) > 40) {
  392. this.applyObj.prodTitle = this.baseUtils.cutOutString(this.applyObj.prodTitle, 40)
  393. }
  394. },
  395. onSpecInput: function () {
  396. if (this.applyObj.spec && this.baseUtils.getRealLen(this.applyObj.spec) > 100) {
  397. this.applyObj.spec = this.baseUtils.cutOutString(this.applyObj.spec, 100)
  398. }
  399. },
  400. onCodeChange: function () {
  401. if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
  402. let chineseIndex = -1
  403. for (let i = 0; i < this.applyObj.code.length; i++) {
  404. if ((/[^\x00-\xff]/g).test(this.applyObj.code.charAt(i))) {
  405. chineseIndex = i
  406. break
  407. }
  408. }
  409. this.applyObj.code = this.baseUtils.cutOutString(this.applyObj.code, chineseIndex)
  410. } else if (this.applyObj.code && this.baseUtils.getRealLen(this.applyObj.code) > 100) {
  411. this.applyObj.code = this.baseUtils.cutOutString(this.applyObj.code, 100)
  412. } else {
  413. this.getSimilarCode()
  414. }
  415. },
  416. onBrandChange: function () {
  417. this.applyObj.brand = this.applyObj.brand.trim()
  418. if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
  419. let chineseIndex = -1
  420. for (let i = 0; i < this.applyObj.brand.length; i++) {
  421. if ((/[^\x00-\xff]/g).test(this.applyObj.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.applyObj.brand.charAt(i))) {
  422. chineseIndex = i
  423. break
  424. }
  425. }
  426. if (chineseIndex > -1) {
  427. this.applyObj.brand = this.applyObj.brand.substring(0, chineseIndex)
  428. }
  429. } else if (this.applyObj.brand && this.baseUtils.getRealLen(this.applyObj.brand) > 50) {
  430. this.applyObj.brand = this.baseUtils.cutOutString(this.applyObj.brand, 50)
  431. } else {
  432. this.getSimilarBrand()
  433. }
  434. },
  435. onAmountInput: function () {
  436. if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
  437. let chineseIndex = -1
  438. for (let i = 0; i < this.applyObj.amount.length; i++) {
  439. if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
  440. chineseIndex = i
  441. break
  442. }
  443. }
  444. this.applyObj.amount = this.baseUtils.cutOutString(this.applyObj.amount, chineseIndex)
  445. } else if (this.applyObj.amount.length > 9) {
  446. this.applyObj.amount = this.baseUtils.cutOutString(this.applyObj.amount, 9)
  447. }
  448. },
  449. onSuccess: function (data) {
  450. if (!this.user.logged) {
  451. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  452. } else {
  453. // 能拦截跳转但无法阻止上传
  454. this.authorityInterceptor(this.baseUrls.userImportBom, () => {
  455. if (data.success) {
  456. window.location.href = '/applyPurchase/' + data.data
  457. } else {
  458. this.$message.error(data.message)
  459. }
  460. })
  461. }
  462. },
  463. onError: function () {
  464. if (!this.user.logged) {
  465. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  466. } else {
  467. this.$message.error('上传失败, 系统错误')
  468. }
  469. },
  470. downloadTemplate: function () {
  471. window.location.href = '/seek/release/template'
  472. },
  473. setCode: function (code) {
  474. this.$http.get('/search/201819', {params: {page: 1, count: 1, type: 'component', keyword: code}})
  475. .then(res => {
  476. if (res.data && res.data.futures && res.data.futures.content) {
  477. let obj = res.data.futures.content[0]
  478. if (obj) {
  479. this.applyObj.brand = obj.pbrand || obj.pbranden || ''
  480. this.applyObj.prodTitle = obj.kind || obj.kinden || ''
  481. this.applyObj.spec = obj.spec || ''
  482. }
  483. }
  484. this.applyObj.code = code
  485. this.showSimilarCodeList = false
  486. }, err => {
  487. this.applyObj.code = code
  488. this.showSimilarCodeList = false
  489. console.log(err.response.data || err)
  490. })
  491. },
  492. setBrand: function (brand) {
  493. this.applyObj.brand = brand
  494. this.showSimilarBrandList = false
  495. }
  496. // upload: function (e) {
  497. // let file = e.target.files[0]
  498. // let param = new FormData()
  499. // param.append('file', file, file.name)
  500. // let config = {
  501. // headers: {'Content-Type': file.type}
  502. // }
  503. // this.$http.post('/seek/importBom', param, config).then(response => {
  504. // if (response.data.success) {
  505. // window.open('/applyPurchase/' + response.data.data)
  506. // } else {
  507. // this.$message.error('上传失败')
  508. // }
  509. // }, err => {
  510. // console.log(err)
  511. // this.$message.error('系统错误')
  512. // })
  513. // }
  514. }
  515. }
  516. </script>
  517. <style lang="scss" type="text/scss">
  518. .article_one{
  519. border-radius:5px;
  520. background: #fff;
  521. margin-bottom:30px;
  522. .title{
  523. height:34px;
  524. line-height: 34px;
  525. background: #2496f1;
  526. padding:0 10px;
  527. border-top-left-radius: 5px;
  528. border-top-right-radius: 5px;
  529. span{
  530. font-size: 14px;
  531. color:#fff;
  532. line-height: 30px;
  533. font-weight: bold;
  534. }
  535. }
  536. .publish-area{
  537. padding:5px 10px 10px;
  538. .area_title{
  539. border-bottom:1px solid #e5e5e5;
  540. margin-bottom:10px;
  541. span{
  542. position:relative;
  543. top:1px;
  544. display:inline-block;
  545. height:25px;
  546. line-height: 25px;
  547. border-bottom:1px solid #2496f1;
  548. font-size: 14px;
  549. color:#666;
  550. }
  551. }
  552. .publish-form-area{
  553. background: #d3eafc;
  554. border-radius:10px;
  555. padding:5px 10px;
  556. margin-bottom:5px;
  557. .form-item {
  558. margin-bottom: 5px;
  559. position: relative;
  560. >a{
  561. width: 120px;
  562. height: 30px;
  563. line-height: 30px;
  564. background: #2496f1;
  565. color: #eee;
  566. font-size: 14px;
  567. display: block;
  568. border-radius: 3px;
  569. cursor: pointer;
  570. text-align: center;
  571. margin:15px auto;
  572. }
  573. >span {
  574. text-align: right;
  575. display: inline-block;
  576. line-height: 23px;
  577. color: #333;
  578. i {
  579. position: relative;
  580. top: 2px;
  581. right: 3px;
  582. color: #e41515;
  583. }
  584. }
  585. > ul {
  586. line-height: normal;
  587. position: absolute;
  588. top: 100%;
  589. left: 0;
  590. background: #fff;
  591. border: 1px solid #b5b5b5;
  592. z-index: 1;
  593. max-height: 120px;
  594. overflow-y: auto;
  595. overflow-x: hidden;
  596. border-radius: 3px;
  597. width: 178px;
  598. font-size: 12px;
  599. li {
  600. height: 24px;
  601. line-height: 24px;
  602. cursor: pointer;
  603. overflow: hidden;
  604. text-overflow: ellipsis;
  605. white-space: nowrap;
  606. padding: 0 3px;
  607. &:hover {
  608. background: #ddd;
  609. }
  610. }
  611. }
  612. select {
  613. width: 32px;
  614. position: absolute;
  615. height: 20px;
  616. background: url('/images/applyPurchase/select.png')no-repeat right;
  617. background-position-x: 15px;
  618. padding: 0 0 0 3px;
  619. border-radius: 0;
  620. & + input {
  621. padding-left: 34px;
  622. }
  623. }
  624. .el-input {
  625. width: 100%;
  626. }
  627. input {
  628. font-size: 12px;
  629. height: 26px;
  630. line-height: 26px;
  631. border-radius: 5px;
  632. padding: 0 3px;
  633. box-shadow: none;
  634. -webkit-box-shadow: none;
  635. -moz-box-shadow: none;
  636. &.error {
  637. border-color: #f4645f!important;
  638. }
  639. }
  640. }
  641. }
  642. .publish-upload{
  643. height:208px;
  644. background: #d3eafc;
  645. border-radius:5px;
  646. text-align: center;
  647. color:#666;
  648. padding-top:16px;
  649. h2 {
  650. font-size: 12px;
  651. margin:0;
  652. margin-bottom:18px;
  653. }
  654. h3 {
  655. font-size: 12px;
  656. line-height: 20px;
  657. margin: 15px 0;
  658. }
  659. label {
  660. position: relative;
  661. > div {
  662. position: absolute;
  663. }
  664. }
  665. .download-line {
  666. cursor: pointer;
  667. width: 130px;
  668. height: 30px;
  669. line-height: 30px;
  670. background: #2496f1;
  671. color: #eee;
  672. font-size: 12px;
  673. display: block;
  674. border-radius: 3px;
  675. text-align: center;
  676. margin:15px auto;
  677. }
  678. }
  679. }
  680. }
  681. .el-upload {
  682. input {
  683. display: none;
  684. }
  685. .el-upload-dragger {
  686. width: 198px;
  687. height: 150px;
  688. position: absolute;
  689. top: -80px;
  690. left: -75px;
  691. opacity: 0;
  692. }
  693. }
  694. .el-date-editor--date{
  695. width: 100%;
  696. &.error {
  697. input {
  698. border: 1px solid #f4645f !important;
  699. }
  700. }
  701. }
  702. .el-icon-date {
  703. display: none;
  704. }
  705. .el-input__inner {
  706. height: 20px;
  707. border-radius: 0;
  708. border: 1px solid #c9c9c9;
  709. }
  710. </style>