PublishApply.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. <template>
  2. <div class="publish-apply">
  3. <div class="good-purchaser">
  4. <p class="good-purchaser-title">
  5. <img src="/images/applyPurchase/good-purchaser-title.png" alt="">
  6. </p>
  7. <ul>
  8. <li v-for="(goodMan, index) in goodPurchaseMan.content">
  9. <i v-text="index + 1" :style="'background: url(/images/applyPurchase/level-' + getRankBg(index) + '.png) center no-repeat;'"></i>
  10. <span v-text="goodMan.name"></span>
  11. </li>
  12. </ul>
  13. </div>
  14. <div class="publish-area">
  15. <div class="publish-form-area">
  16. <p>单个发布</p>
  17. <div>
  18. <div class="form-item">
  19. <span>
  20. <i>*</i>型号:
  21. </span>
  22. <input type="text" class="form-control" :class="{'error': !validObj.code}" v-model="applyObj.code" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号"/>
  23. <ul v-show="showSimilarCodeList && applyObj.code">
  24. <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
  25. </ul>
  26. </div>
  27. <div class="form-item">
  28. <span>
  29. <i>*</i>品牌:
  30. </span>
  31. <input type="text" class="form-control" :class="{'error': !validObj.brand}" v-model="applyObj.brand" @blur="checkBrand" @input="onBrandChange" placeholder="请勿填中文符号" />
  32. <ul class="brand-similar-list" v-show="showSimilarBrandList && applyObj.brand">
  33. <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
  34. </ul>
  35. </div>
  36. <div class="form-item">
  37. <span>
  38. <i>*</i>截止日期:
  39. </span>
  40. <!--<input type="text" class="form-control" readonly :class="{'error': !validObj.deadline}" v-model="applyObj.deadline" @blur="checkDeadline" />-->
  41. <el-date-picker
  42. v-model="applyObj.deadline"
  43. type="date"
  44. :picker-options="pickerOptions"
  45. :class="{'error': !validObj.deadline}"
  46. @change="setDeadLineValid"
  47. :editable="false"
  48. :clearable="true"
  49. size="mini">
  50. </el-date-picker>
  51. </div>
  52. <div class="form-item">
  53. <span>
  54. 单价预算:
  55. </span>
  56. <select v-model="applyObj.currency" class="form-control">
  57. <option value="RMB">¥</option>
  58. <option value="USD">$</option>
  59. </select>
  60. <input type="number" class="form-control" :class="{'error': !validObj.unitPrice}" v-model="applyObj.unitPrice" @blur="checkUnitPrice" @input="onUnitPriceInput" />
  61. </div>
  62. <div class="form-item">
  63. <span>
  64. 封装:
  65. </span>
  66. <input type="text" class="form-control" v-model="applyObj.encapsulation" @input="onEncapsulationChange" />
  67. </div>
  68. <div class="form-item">
  69. <span>
  70. 采购数量:
  71. </span>
  72. <input type="text" class="form-control" :class="{'error': !validObj.amount}" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput" />
  73. </div>
  74. <div class="form-item">
  75. <span>
  76. 生产日期:
  77. </span>
  78. <input type="text" class="form-control" v-model="applyObj.produceDate" @input="onProduceDateChange" />
  79. </div>
  80. </div>
  81. <a @click="goPublish()">发布求购</a>
  82. </div>
  83. <div class="publish-upload">
  84. <h1>批量发布</h1>
  85. <h2>3秒一键配单采购</h2>
  86. <label>
  87. <img src="/images/applyPurchase/upload.png" alt="" />
  88. <!--<input type="file" accept="*.xls, *.xlsx" @change="upload">-->
  89. <el-upload
  90. drag
  91. action="/seek/importBom"
  92. accept="*.xls, *.xlsx"
  93. :show-file-list="false"
  94. :on-success="onSuccess"
  95. :on-error="onError">
  96. </el-upload>
  97. </label>
  98. <h3>把Excel格式的BOM拖放到框中</h3>
  99. <img @click="downloadTemplate()" class="download-line" src="/images/applyPurchase/download.png" alt="">
  100. <img class="apply-logo" src="/images/applyPurchase/publish-apply.png" alt="">
  101. </div>
  102. </div>
  103. <div class="apply-rank">
  104. <table>
  105. <thead>
  106. <tr>
  107. <th width="62">排名</th>
  108. <th width="90">买家</th>
  109. <th width="90">卖家</th>
  110. <th width="72">状态</th>
  111. </tr>
  112. </thead>
  113. <tbody>
  114. <tr v-for="(rank, index) in purchaseRank.content">
  115. <td><div>NO.<span>{{index + 1}}</span><i>|</i></div></td>
  116. <td>
  117. <div>
  118. <span v-if="rank.inquiry.enterprise">{{rank.inquiry.enterprise.enName | enterpriseFilter}}</span>
  119. <span v-if="!rank.inquiry.enterprise && rank.userName">{{rank.userName | userNameFilter}}</span>
  120. <!--<span v-if="!rank.inquiry.userName && !rank.inquiry.enterprise">-</span>-->
  121. <i>|</i>
  122. </div>
  123. </td>
  124. <td>
  125. <div>
  126. <span v-if="rank.vendName">{{rank.vendName | enterpriseFilter}}</span>
  127. <span v-if="!rank.vendName">-</span>
  128. <i>|</i>
  129. </div>
  130. </td>
  131. <td><div>已采纳</div></td>
  132. </tr>
  133. </tbody>
  134. </table>
  135. </div>
  136. <!--提示框-->
  137. <div class="apply-del-box" v-if="showRemindBox">
  138. <div class="title">
  139. <a @click="showRemindBox = false"><i class="fa fa-close fa-lg"></i></a>
  140. </div>
  141. <div class="content">
  142. <!--<p style="line-height: 20px;margin-top: 10px;padding:0 10px">非常抱歉,目前暂无此品牌!<br>若直接前往“品牌申请”,我们将为您先开通寄售功能,待申请通过后再提交开店申请。</p>-->
  143. <!--<p style="line-height: 20px;">前往<a @click="goBrandApply()" target="_blank" style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>-->
  144. <p><img src="/images/applyPurchase/check.png" alt="">发布成功</p>
  145. <p>其中 <span>100</span>个求购型号有现货在售,您可前往“<span>买家中心-我的求购</span>”查询并直接购买</p>
  146. <div>
  147. <a @click="showRemindBox = false">我知道了</a>
  148. <a href="/user#/seekPurchase">前往我的求购</a>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. </template>
  154. <script>
  155. let getRealLen = function (str) {
  156. let len = 0
  157. for (let i = 0; i < str.length; i++) {
  158. if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
  159. len += 2
  160. } else {
  161. len++
  162. }
  163. }
  164. return len
  165. }
  166. let cutOutString = function (str, length) {
  167. for (let i = 1; i <= str.length; i++) {
  168. if (getRealLen(str.substr(0, i)) > length) {
  169. str = str.substr(0, i - 1)
  170. break
  171. }
  172. }
  173. return str
  174. }
  175. let formatDate = function (date, fmt) {
  176. if (typeof date === 'string') {
  177. date = new Date(Date.parse(date.replace(/-/g, '/')))
  178. }
  179. let o = {
  180. 'M+': date.getMonth() + 1, // 月份
  181. 'd+': date.getDate(), // 日
  182. 'h+': 23, // 小时
  183. 'm+': 59, // 分
  184. 's+': 59, // 秒
  185. 'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
  186. 'S': date.getMilliseconds() // 毫秒
  187. }
  188. if (/(y+)/.test(fmt)) {
  189. fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
  190. }
  191. for (let k in o) {
  192. if (new RegExp('(' + k + ')').test(fmt)) {
  193. fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
  194. }
  195. }
  196. return fmt
  197. }
  198. export default {
  199. data () {
  200. return {
  201. applyObj: {
  202. code: '',
  203. brand: '',
  204. unitPrice: '',
  205. currency: 'RMB',
  206. encapsulation: '',
  207. produceDate: '',
  208. amount: '',
  209. deadline: ''
  210. },
  211. validObj: {
  212. code: true,
  213. brand: true,
  214. unitPrice: true,
  215. // encapsulation: true,
  216. // produceDate: true,
  217. amount: true,
  218. deadline: true
  219. },
  220. pickerOptions: {
  221. disabledDate (time) {
  222. // 大于等于今天 小于三个月后
  223. return time.getTime() < Date.now() - 1000 * 60 * 60 * 24 || time.getTime() > Date.now() + 1000 * 60 * 60 * 24 * 30 * 3
  224. }
  225. },
  226. showRemindBox: false,
  227. showSimilarCodeList: false,
  228. showSimilarBrandList: false,
  229. similarCode: [],
  230. similarBrand: []
  231. }
  232. },
  233. computed: {
  234. goodPurchaseMan () {
  235. return this.$store.state.applyPurchase.goodPurchaseMan.goodPurchaseMan.data
  236. },
  237. purchaseRank () {
  238. return this.$store.state.applyPurchase.purchaseApplyRank.purchaseApplyRank.data
  239. },
  240. user () {
  241. return this.$store.state.option.user
  242. }
  243. },
  244. filters: {
  245. enterpriseFilter (str) {
  246. return str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str
  247. },
  248. userNameFilter (str) {
  249. return str.substring(0, 1) + '**'
  250. }
  251. },
  252. mounted () {
  253. document.getElementsByClassName('el-upload-dragger')[0].onclick = function (event) {
  254. event.stopPropagation()
  255. }
  256. let _this = this
  257. document.body.onclick = function () {
  258. _this.showSimilarCodeList = false
  259. _this.showSimilarBrandList = false
  260. }
  261. },
  262. methods: {
  263. emptyForm: function () {
  264. for (let attr in this.applyObj) {
  265. this.applyObj[attr] = attr === 'currency' ? 'RMB' : ''
  266. }
  267. },
  268. getRankBg: function (index) {
  269. return index === 0 ? 1 : index < 3 ? 2 : 3
  270. },
  271. goPublish: function () {
  272. if (this.user.logged) {
  273. if (this.checkAll()) {
  274. let inquiry = {}
  275. let inquiryItem = {}
  276. if (this.user.data.enterprise) {
  277. inquiry.enUU = this.user.data.enterprise.uu
  278. }
  279. let date = new Date()
  280. inquiry.recorderUU = this.user.data.userUU
  281. inquiry.code = 'MALL' + date.getTime()
  282. inquiry.date = date
  283. inquiry.recorder = this.user.data.userName
  284. inquiry.endDate = this.applyObj.deadline
  285. inquiry.sourceapp = 'MALL'
  286. inquiry.amount = 1
  287. inquiryItem.prodTitle = this.applyObj.code
  288. inquiryItem.userUU = this.user.data.userUU
  289. inquiryItem.source = 'MALL'
  290. inquiryItem.userName = this.user.data.userName
  291. inquiryItem.userTel = this.user.data.userTel
  292. inquiryItem.needquantity = this.applyObj.amount
  293. inquiryItem.inbrand = this.applyObj.brand
  294. inquiryItem.currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  295. inquiryItem.cmpCode = this.applyObj.code
  296. inquiryItem.unitPrice = this.applyObj.unitPrice
  297. inquiryItem.produceDate = this.applyObj.produceDate
  298. inquiryItem.date = date
  299. inquiryItem.endDate = this.applyObj.deadline
  300. inquiryItem.encapsulation = this.applyObj.encapsulation
  301. let inquiryItems = []
  302. inquiryItems.push(inquiryItem)
  303. inquiry.inquiryItems = inquiryItems
  304. this.$http.post('/inquiry/buyer/save', inquiry)
  305. .then(response => {
  306. this.$message.success('发布成功')
  307. // this.showRemindBox = true
  308. this.emptyForm()
  309. // this.validObj.deadline = true
  310. this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
  311. }, error => {
  312. console.log(error)
  313. this.$message.error('发布失败')
  314. })
  315. } else {
  316. if (!this.validObj.code) {
  317. this.$message.error('型号不能为空')
  318. } else if (!this.validObj.brand) {
  319. this.$message.error('品牌不能为空')
  320. } else if (!this.validObj.deadline) {
  321. this.$message.error('截止日期不能为空')
  322. } else if (!this.validObj.amount) {
  323. this.$message.error('请输入正确的数值')
  324. }
  325. }
  326. } else {
  327. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  328. }
  329. },
  330. getSimilarCode: function () {
  331. this.$http.get('/search/similarComponents', {params: {keyword: this.applyObj.code}})
  332. .then(response => {
  333. this.similarCode = response.data
  334. this.showSimilarCodeList = response.data.length > 0
  335. })
  336. },
  337. getSimilarBrand: function () {
  338. this.$http.get('/search/similarBrands', {params: {keyword: this.applyObj.brand}})
  339. .then(response => {
  340. this.similarBrand = response.data
  341. this.showSimilarBrandList = response.data.length > 0
  342. })
  343. },
  344. checkCode: function () {
  345. this.validObj.code = this.applyObj.code && this.applyObj.code !== ''
  346. if (!this.validObj.code) {
  347. this.$message.error('型号不能为空')
  348. }
  349. return this.validObj.code
  350. },
  351. checkBrand: function () {
  352. this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== ''
  353. if (!this.validObj.brand) {
  354. this.$message.error('品牌不能为空')
  355. }
  356. return this.validObj.brand
  357. },
  358. checkUnitPrice: function () {
  359. this.validObj.unitPrice = this.applyObj.unitPrice === '' ? true : this.applyObj.unitPrice > 0 && this.applyObj.unitPrice < 100000000
  360. if (!this.validObj.unitPrice && this.applyObj.unitPrice <= 0) {
  361. this.$message.error('单价必须是大于0的数字')
  362. }
  363. return this.validObj.unitPrice
  364. },
  365. checkAmount: function () {
  366. this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 100000000
  367. return this.validObj.amount
  368. },
  369. checkAll: function () {
  370. return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount()
  371. },
  372. checkDeadline: function () {
  373. this.validObj.deadline = Boolean(this.applyObj.deadline)
  374. return this.validObj.deadline
  375. },
  376. setDeadLineValid: function () {
  377. this.applyObj.deadline = formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
  378. this.validObj.deadline = true
  379. },
  380. onUnitPriceInput: function () {
  381. let price = this.applyObj.unitPrice
  382. if (price >= 10000) {
  383. this.applyObj.unitPrice = price.substring(0, 4)
  384. } else if (price.indexOf('.') > -1) {
  385. let arr = price.split('.')
  386. if (arr[0].length > 4) {
  387. this.applyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  388. } else if (arr[1].length > 6) {
  389. this.applyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  390. }
  391. }
  392. },
  393. onProduceDateChange: function () {
  394. if (this.applyObj.produceDate && getRealLen(this.applyObj.produceDate) > 12) {
  395. this.applyObj.produceDate = cutOutString(this.applyObj.produceDate, 12)
  396. }
  397. },
  398. onEncapsulationChange: function () {
  399. if (this.applyObj.encapsulation && getRealLen(this.applyObj.encapsulation) > 20) {
  400. this.applyObj.encapsulation = cutOutString(this.applyObj.encapsulation, 20)
  401. }
  402. },
  403. onCodeChange: function () {
  404. this.applyObj.code = this.applyObj.code.trim()
  405. if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
  406. let chineseIndex = -1
  407. for (let i = 0; i < this.applyObj.code.length; i++) {
  408. if ((/[^\x00-\xff]/g).test(this.applyObj.code.charAt(i))) {
  409. chineseIndex = i
  410. break
  411. }
  412. }
  413. this.applyObj.code = cutOutString(this.applyObj.code, chineseIndex)
  414. } else if (this.applyObj.code && getRealLen(this.applyObj.code) > 100) {
  415. this.applyObj.code = cutOutString(this.applyObj.code, 100)
  416. } else {
  417. this.getSimilarCode()
  418. }
  419. },
  420. onBrandChange: function () {
  421. this.applyObj.brand = this.applyObj.brand.trim()
  422. if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
  423. let chineseIndex = -1
  424. for (let i = 0; i < this.applyObj.brand.length; i++) {
  425. if ((/[^\x00-\xff]/g).test(this.applyObj.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.applyObj.brand.charAt(i))) {
  426. chineseIndex = i
  427. break
  428. }
  429. }
  430. if (chineseIndex > -1) {
  431. this.applyObj.brand = this.applyObj.brand.substring(0, chineseIndex)
  432. }
  433. } else if (this.applyObj.brand && getRealLen(this.applyObj.brand) > 50) {
  434. this.applyObj.brand = cutOutString(this.applyObj.brand, 50)
  435. } else {
  436. this.getSimilarBrand()
  437. }
  438. },
  439. onAmountInput: function () {
  440. if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
  441. let chineseIndex = -1
  442. for (let i = 0; i < this.applyObj.amount.length; i++) {
  443. if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
  444. chineseIndex = i
  445. break
  446. }
  447. }
  448. this.applyObj.amount = cutOutString(this.applyObj.amount, chineseIndex)
  449. } else if (this.applyObj.amount.length > 9) {
  450. this.applyObj.amount = cutOutString(this.applyObj.amount, 9)
  451. }
  452. },
  453. onSuccess: function (data) {
  454. if (data.success) {
  455. window.open('/applyPurchase/' + data.data)
  456. } else {
  457. this.$message.error(data.message)
  458. }
  459. },
  460. onError: function () {
  461. if (!this.user.logged) {
  462. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  463. } else {
  464. this.$message.error('上传失败, 系统错误')
  465. }
  466. },
  467. downloadTemplate: function () {
  468. window.location.href = '/seek/release/template'
  469. },
  470. setCode: function (code) {
  471. this.applyObj.code = code
  472. this.showSimilarCodeList = false
  473. },
  474. setBrand: function (brand) {
  475. this.applyObj.brand = brand
  476. this.showSimilarBrandList = false
  477. }
  478. // upload: function (e) {
  479. // let file = e.target.files[0]
  480. // let param = new FormData()
  481. // param.append('file', file, file.name)
  482. // let config = {
  483. // headers: {'Content-Type': file.type}
  484. // }
  485. // this.$http.post('/seek/importBom', param, config).then(response => {
  486. // if (response.data.success) {
  487. // window.open('/applyPurchase/' + response.data.data)
  488. // } else {
  489. // this.$message.error('上传失败')
  490. // }
  491. // }, err => {
  492. // console.log(err)
  493. // this.$message.error('系统错误')
  494. // })
  495. // }
  496. }
  497. }
  498. </script>
  499. <style lang="scss">
  500. .publish-apply {
  501. background: url('/images/applyPurchase/banner.png') center center/cover no-repeat;
  502. height: 583px;
  503. padding-top: 290px;
  504. width: 1190px;
  505. margin: 0 auto;
  506. padding-left: 44px;
  507. >div {
  508. display: inline-block;
  509. border: 1px solid #3975f4;
  510. height: 267px;
  511. margin-right: 6px;
  512. vertical-align: middle;
  513. background: #fff;
  514. float: left;
  515. text-align: center;
  516. }
  517. .good-purchaser {
  518. width: 225px;
  519. .good-purchaser-title {
  520. height: 55px;
  521. line-height: 55px;
  522. background: #3975f4;
  523. margin: 0;
  524. }
  525. ul {
  526. padding: 0 22px 0 10px;
  527. li {
  528. line-height: 42px;
  529. span {
  530. float: right;
  531. display: inline-block;
  532. width: 152px;
  533. overflow: hidden;
  534. text-overflow: ellipsis;
  535. white-space: nowrap;
  536. text-align: left;
  537. }
  538. i {
  539. display: inline-block;
  540. float: left;
  541. width: 25px;
  542. color: #fff;
  543. font-size: 16px;
  544. font-style: normal;
  545. }
  546. }
  547. }
  548. }
  549. .publish-area {
  550. width: 549px;
  551. text-align: center;
  552. .publish-form-area {
  553. width: 243px;
  554. float: left;
  555. height: 100%;
  556. p {
  557. padding-top: 18px;
  558. font-size: 26px;
  559. color: #3975f4;
  560. margin-bottom: 7px;
  561. }
  562. >div {
  563. text-align: left;
  564. margin-left: 14px;
  565. .form-item {
  566. margin-bottom: 5px;
  567. position: relative;
  568. span {
  569. width: 80px;
  570. text-align: right;
  571. display: inline-block;
  572. i {
  573. position: relative;
  574. top: 2px;
  575. right: 3px;
  576. color: #e41515;
  577. }
  578. }
  579. ul {
  580. line-height: normal;
  581. position: absolute;
  582. top: 19px;
  583. left: 79px;
  584. background: #fff;
  585. border: 1px solid #b5b5b5;
  586. z-index: 1;
  587. max-height: 120px;
  588. overflow-y: auto;
  589. overflow-x: hidden;
  590. border-radius: 3px;
  591. width: 114px;
  592. font-size: 12px;
  593. li {
  594. height: 24px;
  595. line-height: 24px;
  596. cursor: pointer;
  597. overflow: hidden;
  598. text-overflow: ellipsis;
  599. white-space: nowrap;
  600. padding: 0 5px;
  601. &:hover {
  602. background: #ddd;
  603. }
  604. }
  605. }
  606. select {
  607. width: 32px;
  608. position: absolute;
  609. height: 20px;
  610. background: url('/images/applyPurchase/select.png')no-repeat right;
  611. background-position-x: 15px;
  612. padding: 0 0 0 3px;
  613. border-radius: 0;
  614. & + input {
  615. padding-left: 34px;
  616. }
  617. }
  618. .el-input {
  619. width: 111px;
  620. .el-input__inner {
  621. }
  622. }
  623. input {
  624. font-size: 12px;
  625. width: 111px;
  626. height: 20px;
  627. line-height: 20px;
  628. border-radius: 2px;
  629. padding: 0 3px;
  630. box-shadow: none;
  631. -webkit-box-shadow: none;
  632. -moz-box-shadow: none;
  633. &.error {
  634. border-color: #f4645f!important;
  635. }
  636. }
  637. }
  638. }
  639. >a {
  640. width: 90px;
  641. height: 25px;
  642. line-height: 25px;
  643. background: #3975f4;
  644. color: #fefefe;
  645. font-size: 16px;
  646. display: block;
  647. margin: 0 auto;
  648. border-radius: 3px;
  649. cursor: pointer;
  650. }
  651. }
  652. .publish-upload {
  653. background: url('/images/applyPurchase/publish-apply-bg.png')no-repeat;
  654. background-size: cover;
  655. width: 304px;
  656. height: 100%;
  657. padding-left: 22px;
  658. float: right;
  659. color: #fff;
  660. position: relative;
  661. h1 {
  662. font-size: 26px;
  663. margin: 22px 0 0 0;
  664. }
  665. h2 {
  666. font-size: 16px;
  667. margin: 10px 0 23px 0;
  668. }
  669. h3 {
  670. font-size: 16px;
  671. margin: 20px 0 13px 0;
  672. }
  673. label {
  674. position: relative;
  675. /*input {
  676. display: none;
  677. }*/
  678. > div {
  679. position: absolute;
  680. .el-upload {
  681. input {
  682. display: none;
  683. }
  684. .el-upload-dragger {
  685. width: 247px;
  686. height: 216px;
  687. position: absolute;
  688. bottom: -37px;
  689. right: -166px;
  690. opacity: 0;
  691. }
  692. }
  693. }
  694. }
  695. .download-line {
  696. cursor: pointer;
  697. }
  698. .apply-logo {
  699. position: absolute;
  700. left: -20px;
  701. top: 86px;
  702. }
  703. }
  704. }
  705. .apply-rank {
  706. width: 317px;
  707. margin-right: 0;
  708. background: url('/images/applyPurchase/rank-title.png') no-repeat;
  709. background-color: #fff;
  710. background-size: 319px 74px;
  711. background-position: -3px -2px;
  712. table {
  713. margin: 76px auto 0;
  714. width: 98%;
  715. thead {
  716. background: #e0e0e0;
  717. height: 26px;
  718. line-height: 26px;
  719. border-radius: 3px;
  720. tr {
  721. th {
  722. font-size: 16px;
  723. font-weight: bold;
  724. text-align: center;
  725. }
  726. }
  727. }
  728. tbody {
  729. tr {
  730. height: 25px;
  731. line-height: 25px;
  732. &:first-child {
  733. td {
  734. padding-top: 10px;
  735. }
  736. }
  737. td {
  738. color: #666;
  739. &:nth-child(1) {
  740. color: #f6682f;
  741. font-size: 12px;
  742. >div {
  743. width: 62px;
  744. span {
  745. font-size: 16px;
  746. }
  747. }
  748. }
  749. &:nth-child(2) {
  750. >div {
  751. width: 90px;
  752. }
  753. }
  754. &:nth-child(3) {
  755. >div {
  756. width: 87px;
  757. }
  758. }
  759. &:nth-child(4) {
  760. >div {
  761. width: 72px;
  762. }
  763. }
  764. >div {
  765. overflow: hidden;
  766. text-overflow: ellipsis;
  767. white-space: nowrap;
  768. padding: 0 8px;
  769. position: relative;
  770. height: 30px;
  771. i {
  772. font-style: normal;
  773. float: right;
  774. color: #8b8b8b;
  775. font-size: 14px;
  776. position: absolute;
  777. right: 0;
  778. }
  779. }
  780. }
  781. }
  782. }
  783. }
  784. }
  785. .apply-del-box{
  786. position: fixed;
  787. z-index: 1000;
  788. height: auto;
  789. opacity: 1;
  790. background-color: white;
  791. width: 310px;
  792. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  793. -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  794. -o-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  795. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  796. margin: -155px 0 0 -75px;
  797. top: 55%;
  798. left: 43%;
  799. .title{
  800. height: 24px;
  801. background-color: #007aff;
  802. text-align: right;
  803. padding-right: 15px;
  804. line-height: 24px;
  805. a{
  806. color: white;
  807. font-size: 12px;
  808. }
  809. }
  810. .content{
  811. width: 100%;
  812. text-align: center;
  813. margin: 0 auto;
  814. p{
  815. padding: 12px 31px;
  816. margin: 0;
  817. i{
  818. color: #5078cb;
  819. font-size: 16px;
  820. margin-right: 10px;
  821. }
  822. span {
  823. color: #007aff;
  824. }
  825. &:last-child {
  826. font-size: 12px;
  827. }
  828. }
  829. div{
  830. width: 100%;
  831. text-align: center;
  832. margin: 0 auto 20px;
  833. a{
  834. padding: 0 19px;
  835. height: 26px;
  836. line-height: 26px;
  837. display: inline-block;
  838. text-align: center;
  839. font-size: 14px;
  840. color: #fff;
  841. &:first-child{
  842. background: #c8c6c6;
  843. margin-right: 10px;
  844. }
  845. &:last-child{
  846. background: #007aff;
  847. }
  848. }
  849. }
  850. }
  851. }
  852. }
  853. .el-date-editor--date{
  854. width: 110px;
  855. &.error {
  856. input {
  857. border: 1px solid #f4645f !important;
  858. }
  859. }
  860. }
  861. .el-icon-date {
  862. display: none;
  863. }
  864. .el-input__inner {
  865. height: 20px;
  866. border-radius: 0;
  867. border: 1px solid #c9c9c9;
  868. }
  869. </style>