articleOne.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  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. if(this.applyObj.deadline === '') {return ''}
  365. this.applyObj.deadline = this.baseUtils.formatDate(this.baseUtils.getFullDay(new Date(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.$http.get('/search/201819', {params: {page: 1, count: 1, type: 'component', keyword: code}})
  476. .then(res => {
  477. if (res.data && res.data.futures && res.data.futures.content) {
  478. let obj = res.data.futures.content[0]
  479. if (obj) {
  480. this.applyObj.brand = obj.pbrand || obj.pbranden || ''
  481. this.applyObj.prodTitle = obj.kind || obj.kinden || ''
  482. this.applyObj.spec = obj.spec || ''
  483. }
  484. }
  485. this.applyObj.code = code
  486. this.showSimilarCodeList = false
  487. }, err => {
  488. this.applyObj.code = code
  489. this.showSimilarCodeList = false
  490. console.log(err.response.data || err)
  491. })
  492. },
  493. setBrand: function (brand) {
  494. this.applyObj.brand = brand
  495. this.showSimilarBrandList = false
  496. }
  497. // upload: function (e) {
  498. // let file = e.target.files[0]
  499. // let param = new FormData()
  500. // param.append('file', file, file.name)
  501. // let config = {
  502. // headers: {'Content-Type': file.type}
  503. // }
  504. // this.$http.post('/seek/importBom', param, config).then(response => {
  505. // if (response.data.success) {
  506. // window.open('/applyPurchase/' + response.data.data)
  507. // } else {
  508. // this.$message.error('上传失败')
  509. // }
  510. // }, err => {
  511. // console.log(err)
  512. // this.$message.error('系统错误')
  513. // })
  514. // }
  515. }
  516. }
  517. </script>
  518. <style lang="scss" type="text/scss">
  519. .article_one{
  520. border-radius:5px;
  521. background: #fff;
  522. margin-bottom:30px;
  523. .title{
  524. height:34px;
  525. line-height: 34px;
  526. background: #2496f1;
  527. padding:0 10px;
  528. border-top-left-radius: 5px;
  529. border-top-right-radius: 5px;
  530. span{
  531. font-size: 14px;
  532. color:#fff;
  533. line-height: 30px;
  534. font-weight: bold;
  535. }
  536. }
  537. .publish-area{
  538. padding:5px 10px 10px;
  539. .area_title{
  540. border-bottom:1px solid #e5e5e5;
  541. margin-bottom:10px;
  542. span{
  543. position:relative;
  544. top:1px;
  545. display:inline-block;
  546. height:25px;
  547. line-height: 25px;
  548. border-bottom:1px solid #2496f1;
  549. font-size: 14px;
  550. color:#666;
  551. }
  552. }
  553. .publish-form-area{
  554. background: #d3eafc;
  555. border-radius:10px;
  556. padding:5px 10px;
  557. margin-bottom:5px;
  558. .form-item {
  559. margin-bottom: 5px;
  560. position: relative;
  561. >a{
  562. width: 120px;
  563. height: 30px;
  564. line-height: 30px;
  565. background: #2496f1;
  566. color: #eee;
  567. font-size: 14px;
  568. display: block;
  569. border-radius: 3px;
  570. cursor: pointer;
  571. text-align: center;
  572. margin:15px auto;
  573. }
  574. >span {
  575. text-align: right;
  576. display: inline-block;
  577. line-height: 23px;
  578. color: #333;
  579. i {
  580. position: relative;
  581. top: 2px;
  582. right: 3px;
  583. color: #e41515;
  584. }
  585. }
  586. > ul {
  587. line-height: normal;
  588. position: absolute;
  589. top: 100%;
  590. left: 0;
  591. background: #fff;
  592. border: 1px solid #b5b5b5;
  593. z-index: 1;
  594. max-height: 120px;
  595. overflow-y: auto;
  596. overflow-x: hidden;
  597. border-radius: 3px;
  598. width: 178px;
  599. font-size: 12px;
  600. li {
  601. height: 24px;
  602. line-height: 24px;
  603. cursor: pointer;
  604. overflow: hidden;
  605. text-overflow: ellipsis;
  606. white-space: nowrap;
  607. padding: 0 3px;
  608. &:hover {
  609. background: #ddd;
  610. }
  611. }
  612. }
  613. select {
  614. width: 32px;
  615. position: absolute;
  616. height: 20px;
  617. background: url('/images/applyPurchase/select.png')no-repeat right;
  618. background-position-x: 15px;
  619. padding: 0 0 0 3px;
  620. border-radius: 0;
  621. & + input {
  622. padding-left: 34px;
  623. }
  624. }
  625. .el-input {
  626. width: 100%;
  627. }
  628. input {
  629. font-size: 12px;
  630. height: 26px;
  631. line-height: 26px;
  632. border-radius: 5px;
  633. padding: 0 3px;
  634. box-shadow: none;
  635. -webkit-box-shadow: none;
  636. -moz-box-shadow: none;
  637. &.error {
  638. border-color: #f4645f!important;
  639. }
  640. }
  641. }
  642. }
  643. .publish-upload{
  644. height:208px;
  645. background: #d3eafc;
  646. border-radius:5px;
  647. text-align: center;
  648. color:#666;
  649. padding-top:16px;
  650. h2 {
  651. font-size: 12px;
  652. margin:0;
  653. margin-bottom:18px;
  654. }
  655. h3 {
  656. font-size: 12px;
  657. line-height: 20px;
  658. margin: 15px 0;
  659. }
  660. label {
  661. position: relative;
  662. > div {
  663. position: absolute;
  664. }
  665. }
  666. .download-line {
  667. cursor: pointer;
  668. width: 130px;
  669. height: 30px;
  670. line-height: 30px;
  671. background: #2496f1;
  672. color: #eee;
  673. font-size: 12px;
  674. display: block;
  675. border-radius: 3px;
  676. text-align: center;
  677. margin:15px auto;
  678. }
  679. }
  680. }
  681. }
  682. .el-upload {
  683. input {
  684. display: none;
  685. }
  686. .el-upload-dragger {
  687. width: 198px;
  688. height: 150px;
  689. position: absolute;
  690. top: -80px;
  691. left: -75px;
  692. opacity: 0;
  693. }
  694. }
  695. .el-date-editor--date{
  696. width: 100%;
  697. &.error {
  698. input {
  699. border: 1px solid #f4645f !important;
  700. }
  701. }
  702. }
  703. .el-icon-date {
  704. display: none;
  705. }
  706. .el-input__inner {
  707. height: 20px;
  708. border-radius: 0;
  709. border: 1px solid #c9c9c9;
  710. }
  711. </style>