PublishApply.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  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.prodTitle" @input="onProdTitleInput"/>
  67. </div>
  68. <div class="form-item">
  69. <span>
  70. 规格:
  71. </span>
  72. <input type="text" class="form-control" :class="{'error': !validObj.spec}" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput"/>
  73. </div>
  74. <div class="form-item">
  75. <span>
  76. 封装:
  77. </span>
  78. <input type="text" class="form-control" v-model="applyObj.encapsulation" @input="onEncapsulationChange" />
  79. </div>
  80. <div class="form-item">
  81. <span>
  82. 采购数量:
  83. </span>
  84. <input type="text" class="form-control" :class="{'error': !validObj.amount}" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput" />
  85. </div>
  86. <div class="form-item">
  87. <span>
  88. 生产日期:
  89. </span>
  90. <input type="text" class="form-control" v-model="applyObj.produceDate" @input="onProduceDateChange" />
  91. </div>
  92. </div>
  93. <a @click="goPublish()">发布求购</a>
  94. </div>
  95. <div class="publish-upload">
  96. <h1>批量求购</h1>
  97. <h2>3秒一键配单采购</h2>
  98. <label>
  99. <img src="/images/applyPurchase/upload.png" alt="" />
  100. <!--<input type="file" accept="*.xls, *.xlsx" @change="upload">-->
  101. <el-upload
  102. drag
  103. action="/seek/importBom"
  104. accept="*.xls, *.xlsx"
  105. :show-file-list="false"
  106. :on-success="onSuccess"
  107. :on-error="onError">
  108. </el-upload>
  109. </label>
  110. <h3>把Excel格式的BOM拖放到框中</h3>
  111. <img @click="downloadTemplate()" class="download-line" src="/images/applyPurchase/download.png" alt="">
  112. <img class="apply-logo" src="/images/applyPurchase/publish-apply.png" alt="">
  113. </div>
  114. </div>
  115. <div class="apply-rank">
  116. <table>
  117. <thead>
  118. <tr>
  119. <th width="62">排名</th>
  120. <th width="160">型号</th>
  121. <th width="92">求购次数</th>
  122. </tr>
  123. </thead>
  124. <tbody>
  125. <tr v-for="(rank, index) in purchaseRank">
  126. <td><div>NO.<span>{{index + 1}}</span><i>|</i></div></td>
  127. <td>
  128. <div>
  129. <span v-if="rank.id_cmpcode" :title="rank.id_cmpcode">{{rank.id_cmpcode}}</span>
  130. <span v-if="!rank.id_cmpcode">-</span>
  131. <i>|</i>
  132. </div>
  133. </td>
  134. <td><div>{{rank.seekAmount || 0}}</div></td>
  135. </tr>
  136. </tbody>
  137. </table>
  138. </div>
  139. <!--提示框-->
  140. <div class="apply-del-box" v-if="showRemindBox">
  141. <div class="title">
  142. <a @click="showRemindBox = false"><i class="fa fa-close fa-lg"></i></a>
  143. </div>
  144. <div class="content">
  145. <!--<p style="line-height: 20px;margin-top: 10px;padding:0 10px">非常抱歉,目前暂无此品牌!<br>若直接前往“品牌申请”,我们将为您先开通寄售功能,待申请通过后再提交开店申请。</p>-->
  146. <!--<p style="line-height: 20px;">前往<a @click="goBrandApply()" target="_blank" style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>-->
  147. <p><img src="/images/applyPurchase/check.png" alt="">发布成功</p>
  148. <p>其中 <span>100</span>个求购型号有现货在售,您可前往“<span>买家中心-我的求购</span>”查询并直接购买</p>
  149. <div>
  150. <a @click="showRemindBox = false">我知道了</a>
  151. <a href="/user#/seekPurchase">前往我的求购</a>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. </template>
  157. <script>
  158. import { getRealLen, cutOutString, formatDate, checkNullStr } from '~utils/baseUtils'
  159. export default {
  160. data () {
  161. return {
  162. applyObj: {
  163. code: '',
  164. brand: '',
  165. unitPrice: '',
  166. currency: 'RMB',
  167. prodTitle: '',
  168. spec: '',
  169. encapsulation: '',
  170. produceDate: '',
  171. amount: '',
  172. deadline: ''
  173. },
  174. validObj: {
  175. code: true,
  176. brand: true,
  177. unitPrice: true,
  178. // encapsulation: true,
  179. // produceDate: true,
  180. amount: true,
  181. deadline: true,
  182. spec: true
  183. },
  184. pickerOptions: {
  185. disabledDate (time) {
  186. // 大于等于今天 小于三个月后
  187. return time.getTime() < Date.now() - 1000 * 60 * 60 * 24 || time.getTime() > Date.now() + 1000 * 60 * 60 * 24 * 30 * 3
  188. }
  189. },
  190. showRemindBox: false,
  191. showSimilarCodeList: false,
  192. showSimilarBrandList: false,
  193. similarCode: [],
  194. similarBrand: []
  195. }
  196. },
  197. computed: {
  198. goodPurchaseMan () {
  199. return this.$store.state.applyPurchase.goodPurchaseMan.goodPurchaseMan.data
  200. },
  201. purchaseRank () {
  202. return this.$store.state.applyPurchase.purchaseApplyRank.purchaseApplyRank.data
  203. },
  204. user () {
  205. return this.$store.state.option.user
  206. }
  207. },
  208. filters: {
  209. enterpriseFilter (str) {
  210. return str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str
  211. },
  212. userNameFilter (str) {
  213. return str.substring(0, 1) + '**'
  214. }
  215. },
  216. mounted () {
  217. document.getElementsByClassName('el-upload-dragger')[0].onclick = function (event) {
  218. event.stopPropagation()
  219. }
  220. let _this = this
  221. document.body.onclick = function () {
  222. _this.showSimilarCodeList = false
  223. _this.showSimilarBrandList = false
  224. }
  225. },
  226. methods: {
  227. emptyForm: function () {
  228. for (let attr in this.applyObj) {
  229. this.applyObj[attr] = attr === 'currency' ? 'RMB' : ''
  230. }
  231. },
  232. getRankBg: function (index) {
  233. return index === 0 ? 1 : index < 3 ? 2 : 3
  234. },
  235. goPublish: function () {
  236. if (this.user.logged) {
  237. if (this.checkAll()) {
  238. let inquiry = {}
  239. let inquiryItem = {}
  240. if (this.user.data.enterprise) {
  241. inquiry.enUU = this.user.data.enterprise.uu
  242. }
  243. let date = new Date()
  244. let currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  245. inquiry.recorderUU = this.user.data.userUU
  246. inquiry.code = 'MALL' + date.getTime()
  247. inquiry.date = date
  248. inquiry.recorder = this.user.data.userName
  249. inquiry.endDate = this.applyObj.deadline
  250. inquiry.sourceapp = 'MALL'
  251. inquiry.amount = 1
  252. inquiryItem.userUU = this.user.data.userUU
  253. inquiryItem.source = 'MALL'
  254. inquiryItem.userName = this.user.data.userName
  255. inquiryItem.userTel = this.user.data.userTel
  256. inquiryItem.needquantity = this.applyObj.amount
  257. inquiryItem.inbrand = this.applyObj.brand
  258. inquiryItem.currency = currency
  259. inquiryItem.cmpCode = this.applyObj.code.trim().toUpperCase()
  260. inquiryItem.unitPrice = this.applyObj.unitPrice
  261. inquiryItem.produceDate = this.applyObj.produceDate
  262. inquiryItem.date = date
  263. inquiryItem.endDate = this.applyObj.deadline
  264. inquiryItem.encapsulation = this.applyObj.encapsulation
  265. inquiryItem.spec = this.applyObj.spec
  266. inquiryItem.prodTitle = this.applyObj.prodTitle
  267. let inquiryItems = []
  268. inquiryItems.push(inquiryItem)
  269. inquiry.inquiryItems = inquiryItems
  270. inquiry.currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  271. this.$http.post('/inquiry/buyer/save', inquiry)
  272. .then(response => {
  273. this.$message.success('发布成功')
  274. // this.showRemindBox = true
  275. this.emptyForm()
  276. // this.validObj.deadline = true
  277. this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
  278. }, error => {
  279. console.log(error)
  280. this.$message.error('发布失败')
  281. })
  282. } else {
  283. if (!this.validObj.deadline) {
  284. this.$message.error('截止日期不能为空')
  285. } else if (!this.validObj.amount) {
  286. this.$message.error('请输入正确的数值')
  287. }
  288. }
  289. } else {
  290. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  291. }
  292. },
  293. getSimilarCode: function () {
  294. if (this.applyObj.code) {
  295. this.$http.get('/search/similarComponents', {params: {keyword: this.applyObj.code}})
  296. .then(response => {
  297. this.similarCode = response.data
  298. this.showSimilarCodeList = response.data.length > 0
  299. })
  300. } else {
  301. this.showSimilarCodeList = false
  302. }
  303. },
  304. getSimilarBrand: function () {
  305. if (this.applyObj.brand) {
  306. this.$http.get('/search/similarBrands', {params: {keyword: this.applyObj.brand}})
  307. .then(response => {
  308. this.similarBrand = response.data
  309. this.showSimilarBrandList = response.data.length > 0
  310. })
  311. } else {
  312. this.showSimilarBrandList = false
  313. }
  314. },
  315. checkCode: function () {
  316. let code = this.applyObj.code.trim()
  317. let nullStrFlag = checkNullStr(code)
  318. this.validObj.code = code && code !== '' && nullStrFlag
  319. if (!this.validObj.code) {
  320. if (!nullStrFlag) {
  321. this.$message.error('型号输入不合法')
  322. } else {
  323. this.$message.error('型号不能为空')
  324. }
  325. }
  326. return this.validObj.code
  327. },
  328. checkBrand: function () {
  329. let nullStrFlag = checkNullStr(this.applyObj.brand)
  330. this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== '' && nullStrFlag
  331. if (!this.validObj.brand) {
  332. if (!nullStrFlag) {
  333. this.$message.error('品牌输入不合法')
  334. } else {
  335. this.$message.error('品牌不能为空')
  336. }
  337. }
  338. return this.validObj.brand
  339. },
  340. checkUnitPrice: function () {
  341. this.validObj.unitPrice = this.applyObj.unitPrice === '' ? true : this.applyObj.unitPrice > 0 && this.applyObj.unitPrice < 100000000
  342. if (!this.validObj.unitPrice && this.applyObj.unitPrice <= 0) {
  343. this.$message.error('单价必须是大于0的数字')
  344. }
  345. return this.validObj.unitPrice
  346. },
  347. checkSpec: function () {
  348. let nullStrFlag = checkNullStr(this.applyObj.spec)
  349. this.validObj.spec = nullStrFlag
  350. if (!nullStrFlag) {
  351. this.$message.error('规格输入不合法')
  352. }
  353. return this.validObj.spec
  354. },
  355. checkAmount: function () {
  356. this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
  357. return this.validObj.amount
  358. },
  359. checkAll: function () {
  360. return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
  361. },
  362. checkDeadline: function () {
  363. this.validObj.deadline = Boolean(this.applyObj.deadline)
  364. return this.validObj.deadline
  365. },
  366. setDeadLineValid: function () {
  367. this.applyObj.deadline = formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
  368. this.validObj.deadline = true
  369. },
  370. onUnitPriceInput: function () {
  371. let price = this.applyObj.unitPrice
  372. if (price >= 10000) {
  373. this.applyObj.unitPrice = price.substring(0, 4)
  374. } else if (price.indexOf('.') > -1) {
  375. let arr = price.split('.')
  376. if (arr[0].length > 4) {
  377. this.applyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  378. } else if (arr[1].length > 6) {
  379. this.applyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  380. }
  381. }
  382. },
  383. onProduceDateChange: function () {
  384. if (this.applyObj.produceDate && getRealLen(this.applyObj.produceDate) > 12) {
  385. this.applyObj.produceDate = cutOutString(this.applyObj.produceDate, 12)
  386. }
  387. },
  388. onEncapsulationChange: function () {
  389. if (this.applyObj.encapsulation && getRealLen(this.applyObj.encapsulation) > 20) {
  390. this.applyObj.encapsulation = cutOutString(this.applyObj.encapsulation, 20)
  391. }
  392. },
  393. onProdTitleInput: function () {
  394. if (this.applyObj.prodTitle && getRealLen(this.applyObj.prodTitle) > 40) {
  395. this.applyObj.prodTitle = cutOutString(this.applyObj.prodTitle, 40)
  396. }
  397. },
  398. onSpecInput: function () {
  399. if (this.applyObj.spec && getRealLen(this.applyObj.spec) > 100) {
  400. this.applyObj.spec = cutOutString(this.applyObj.spec, 100)
  401. }
  402. },
  403. onCodeChange: function () {
  404. if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
  405. let chineseIndex = -1
  406. for (let i = 0; i < this.applyObj.code.length; i++) {
  407. if ((/[^\x00-\xff]/g).test(this.applyObj.code.charAt(i))) {
  408. chineseIndex = i
  409. break
  410. }
  411. }
  412. this.applyObj.code = cutOutString(this.applyObj.code, chineseIndex)
  413. } else if (this.applyObj.code && getRealLen(this.applyObj.code) > 100) {
  414. this.applyObj.code = cutOutString(this.applyObj.code, 100)
  415. } else {
  416. this.getSimilarCode()
  417. }
  418. },
  419. onBrandChange: function () {
  420. this.applyObj.brand = this.applyObj.brand.trim()
  421. if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
  422. let chineseIndex = -1
  423. for (let i = 0; i < this.applyObj.brand.length; i++) {
  424. if ((/[^\x00-\xff]/g).test(this.applyObj.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.applyObj.brand.charAt(i))) {
  425. chineseIndex = i
  426. break
  427. }
  428. }
  429. if (chineseIndex > -1) {
  430. this.applyObj.brand = this.applyObj.brand.substring(0, chineseIndex)
  431. }
  432. } else if (this.applyObj.brand && getRealLen(this.applyObj.brand) > 50) {
  433. this.applyObj.brand = cutOutString(this.applyObj.brand, 50)
  434. }
  435. this.getSimilarBrand()
  436. },
  437. onAmountInput: function () {
  438. if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
  439. let chineseIndex = -1
  440. for (let i = 0; i < this.applyObj.amount.length; i++) {
  441. if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
  442. chineseIndex = i
  443. break
  444. }
  445. }
  446. this.applyObj.amount = cutOutString(this.applyObj.amount, chineseIndex)
  447. } else if (this.applyObj.amount.length > 9) {
  448. this.applyObj.amount = cutOutString(this.applyObj.amount, 9)
  449. }
  450. },
  451. onSuccess: function (data) {
  452. if (!this.user.logged) {
  453. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  454. } else if (data.success) {
  455. window.location.href = '/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: 8px;
  558. font-size: 22px;
  559. color: #3975f4;
  560. margin-bottom: 4px;
  561. }
  562. >div {
  563. text-align: left;
  564. margin-left: 14px;
  565. .form-item {
  566. margin-bottom: 3px;
  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: 18px;
  627. line-height: 18px;
  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: 22px;
  663. margin: 11px 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. color: #b47200;
  698. }
  699. .apply-logo {
  700. position: absolute;
  701. left: -20px;
  702. top: 86px;
  703. }
  704. }
  705. }
  706. .apply-rank {
  707. width: 317px;
  708. margin-right: 0;
  709. background: url('/images/applyPurchase/rank-title.png') no-repeat;
  710. background-color: #fff;
  711. background-size: 319px 74px;
  712. background-position: -3px -2px;
  713. table {
  714. margin: 76px auto 0;
  715. width: 98%;
  716. thead {
  717. background: #e0e0e0;
  718. height: 26px;
  719. line-height: 26px;
  720. border-radius: 3px;
  721. tr {
  722. th {
  723. font-size: 16px;
  724. font-weight: bold;
  725. text-align: center;
  726. }
  727. }
  728. }
  729. tbody {
  730. tr {
  731. height: 25px;
  732. line-height: 25px;
  733. &:first-child {
  734. td {
  735. padding-top: 10px;
  736. }
  737. }
  738. td {
  739. color: #666;
  740. &:nth-child(1) {
  741. color: #f6682f;
  742. font-size: 12px;
  743. >div {
  744. width: 62px;
  745. span {
  746. font-size: 16px;
  747. }
  748. }
  749. }
  750. &:nth-child(2) {
  751. >div {
  752. width: 160px;
  753. }
  754. }
  755. &:nth-child(3) {
  756. >div {
  757. width: 92px;
  758. }
  759. }
  760. >div {
  761. overflow: hidden;
  762. text-overflow: ellipsis;
  763. white-space: nowrap;
  764. padding: 0 8px;
  765. position: relative;
  766. height: 30px;
  767. i {
  768. font-style: normal;
  769. float: right;
  770. color: #8b8b8b;
  771. font-size: 14px;
  772. position: absolute;
  773. right: 0;
  774. }
  775. }
  776. }
  777. }
  778. }
  779. }
  780. }
  781. .apply-del-box{
  782. position: fixed;
  783. z-index: 1000;
  784. height: auto;
  785. opacity: 1;
  786. background-color: white;
  787. width: 310px;
  788. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  789. -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  790. -o-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  791. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  792. margin: -155px 0 0 -75px;
  793. top: 55%;
  794. left: 43%;
  795. .title{
  796. height: 24px;
  797. background-color: #007aff;
  798. text-align: right;
  799. padding-right: 15px;
  800. line-height: 24px;
  801. a{
  802. color: white;
  803. font-size: 12px;
  804. }
  805. }
  806. .content{
  807. width: 100%;
  808. text-align: center;
  809. margin: 0 auto;
  810. p{
  811. padding: 12px 31px;
  812. margin: 0;
  813. i{
  814. color: #5078cb;
  815. font-size: 16px;
  816. margin-right: 10px;
  817. }
  818. span {
  819. color: #007aff;
  820. }
  821. &:last-child {
  822. font-size: 12px;
  823. }
  824. }
  825. div{
  826. width: 100%;
  827. text-align: center;
  828. margin: 0 auto 20px;
  829. a{
  830. padding: 0 19px;
  831. height: 26px;
  832. line-height: 26px;
  833. display: inline-block;
  834. text-align: center;
  835. font-size: 14px;
  836. color: #fff;
  837. &:first-child{
  838. background: #c8c6c6;
  839. margin-right: 10px;
  840. }
  841. &:last-child{
  842. background: #007aff;
  843. }
  844. }
  845. }
  846. }
  847. }
  848. }
  849. .el-date-editor--date{
  850. width: 110px;
  851. &.error {
  852. input {
  853. border: 1px solid #f4645f !important;
  854. }
  855. }
  856. }
  857. .el-icon-date {
  858. display: none;
  859. }
  860. .el-input__inner {
  861. height: 20px;
  862. border-radius: 0;
  863. border: 1px solid #c9c9c9;
  864. }
  865. </style>