PublishApply.vue 27 KB

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