PublishApply.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877
  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. getMaterialKind: function (code, brand) {
  236. return this.$http.get('/productuser/match/getKind', {params: {cmpCode: code, brand: brand}})
  237. },
  238. startPublish: function (prodTitle) {
  239. let inquiry = {}
  240. let inquiryItem = {}
  241. if (this.user.data.enterprise) {
  242. inquiry.enUU = this.user.data.enterprise.uu
  243. }
  244. let date = new Date()
  245. let currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  246. inquiry.recorderUU = this.user.data.userUU
  247. inquiry.code = 'MALL' + date.getTime()
  248. inquiry.date = date
  249. inquiry.recorder = this.user.data.userName
  250. inquiry.endDate = this.applyObj.deadline
  251. inquiry.sourceapp = 'MALL'
  252. inquiry.amount = 1
  253. inquiryItem.userUU = this.user.data.userUU
  254. inquiryItem.source = 'MALL'
  255. inquiryItem.userName = this.user.data.userName
  256. inquiryItem.userTel = this.user.data.userTel
  257. inquiryItem.needquantity = this.applyObj.amount
  258. inquiryItem.inbrand = this.applyObj.brand
  259. inquiryItem.currency = currency
  260. inquiryItem.cmpCode = this.applyObj.code.trim().toUpperCase()
  261. inquiryItem.unitPrice = this.applyObj.unitPrice
  262. inquiryItem.produceDate = this.applyObj.produceDate
  263. inquiryItem.date = date
  264. inquiryItem.endDate = this.applyObj.deadline
  265. inquiryItem.encapsulation = this.applyObj.encapsulation
  266. inquiryItem.spec = this.applyObj.spec
  267. inquiryItem.prodTitle = prodTitle || this.applyObj.prodTitle || '其他'
  268. let inquiryItems = []
  269. inquiryItems.push(inquiryItem)
  270. inquiry.inquiryItems = inquiryItems
  271. inquiry.currency = this.applyObj.unitPrice ? this.applyObj.currency : null
  272. this.$http.post('/inquiry/buyer/save', inquiry)
  273. .then(response => {
  274. this.$message.success('发布成功')
  275. // this.showRemindBox = true
  276. this.emptyForm()
  277. // this.validObj.deadline = true
  278. this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
  279. }, error => {
  280. console.log(error)
  281. this.$message.error('发布失败')
  282. })
  283. },
  284. goPublish: function () {
  285. if (this.user.logged) {
  286. if (this.checkAll()) {
  287. if (!this.applyObj.prodTitle || this.applyObj.prodTitle.length === 0) {
  288. this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
  289. this.startPublish(response.data && response.data.length ? response.data : '其他')
  290. })
  291. } else {
  292. this.startPublish()
  293. }
  294. } else {
  295. if (!this.validObj.deadline) {
  296. this.$message.error('截止日期不能为空')
  297. } else if (!this.validObj.amount) {
  298. this.$message.error('请输入正确的数值')
  299. }
  300. }
  301. } else {
  302. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  303. }
  304. },
  305. getSimilarCode: function () {
  306. if (this.applyObj.code) {
  307. this.$http.get('/search/similarComponents', {params: {keyword: this.applyObj.code}})
  308. .then(response => {
  309. this.similarCode = response.data
  310. this.showSimilarCodeList = response.data.length > 0
  311. })
  312. } else {
  313. this.showSimilarCodeList = false
  314. }
  315. },
  316. getSimilarBrand: function () {
  317. if (this.applyObj.brand) {
  318. this.$http.get('/search/similarBrands', {params: {keyword: this.applyObj.brand}})
  319. .then(response => {
  320. this.similarBrand = response.data
  321. this.showSimilarBrandList = response.data.length > 0
  322. })
  323. } else {
  324. this.showSimilarBrandList = false
  325. }
  326. },
  327. checkCode: function () {
  328. let code = this.applyObj.code.trim()
  329. let nullStrFlag = checkNullStr(code)
  330. this.validObj.code = code && code !== '' && nullStrFlag
  331. if (!this.validObj.code) {
  332. if (!nullStrFlag) {
  333. this.$message.error('型号输入不合法')
  334. } else {
  335. this.$message.error('型号不能为空')
  336. }
  337. }
  338. return this.validObj.code
  339. },
  340. checkBrand: function () {
  341. let nullStrFlag = checkNullStr(this.applyObj.brand)
  342. this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== '' && nullStrFlag
  343. if (!this.validObj.brand) {
  344. if (!nullStrFlag) {
  345. this.$message.error('品牌输入不合法')
  346. } else {
  347. this.$message.error('品牌不能为空')
  348. }
  349. }
  350. return this.validObj.brand
  351. },
  352. checkUnitPrice: function () {
  353. this.validObj.unitPrice = this.applyObj.unitPrice === '' ? true : this.applyObj.unitPrice > 0 && this.applyObj.unitPrice < 100000000
  354. if (!this.validObj.unitPrice && this.applyObj.unitPrice <= 0) {
  355. this.$message.error('单价必须是大于0的数字')
  356. }
  357. return this.validObj.unitPrice
  358. },
  359. checkSpec: function () {
  360. let nullStrFlag = checkNullStr(this.applyObj.spec)
  361. this.validObj.spec = nullStrFlag
  362. if (!nullStrFlag) {
  363. this.$message.error('规格输入不合法')
  364. }
  365. return this.validObj.spec
  366. },
  367. checkAmount: function () {
  368. this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
  369. return this.validObj.amount
  370. },
  371. checkAll: function () {
  372. return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
  373. },
  374. checkDeadline: function () {
  375. this.validObj.deadline = Boolean(this.applyObj.deadline)
  376. return this.validObj.deadline
  377. },
  378. setDeadLineValid: function () {
  379. this.applyObj.deadline = formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
  380. this.validObj.deadline = true
  381. },
  382. onUnitPriceInput: function () {
  383. let price = this.applyObj.unitPrice
  384. if (price >= 10000) {
  385. this.applyObj.unitPrice = price.substring(0, 4)
  386. } else if (price.indexOf('.') > -1) {
  387. let arr = price.split('.')
  388. if (arr[0].length > 4) {
  389. this.applyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  390. } else if (arr[1].length > 6) {
  391. this.applyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  392. }
  393. }
  394. },
  395. onProduceDateChange: function () {
  396. if (this.applyObj.produceDate && getRealLen(this.applyObj.produceDate) > 12) {
  397. this.applyObj.produceDate = cutOutString(this.applyObj.produceDate, 12)
  398. }
  399. },
  400. onEncapsulationChange: function () {
  401. if (this.applyObj.encapsulation && getRealLen(this.applyObj.encapsulation) > 20) {
  402. this.applyObj.encapsulation = cutOutString(this.applyObj.encapsulation, 20)
  403. }
  404. },
  405. onProdTitleInput: function () {
  406. if (this.applyObj.prodTitle && getRealLen(this.applyObj.prodTitle) > 40) {
  407. this.applyObj.prodTitle = cutOutString(this.applyObj.prodTitle, 40)
  408. }
  409. },
  410. onSpecInput: function () {
  411. if (this.applyObj.spec && getRealLen(this.applyObj.spec) > 100) {
  412. this.applyObj.spec = cutOutString(this.applyObj.spec, 100)
  413. }
  414. },
  415. onCodeChange: function () {
  416. if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
  417. let chineseIndex = -1
  418. for (let i = 0; i < this.applyObj.code.length; i++) {
  419. if ((/[^\x00-\xff]/g).test(this.applyObj.code.charAt(i))) {
  420. chineseIndex = i
  421. break
  422. }
  423. }
  424. this.applyObj.code = cutOutString(this.applyObj.code, chineseIndex)
  425. } else if (this.applyObj.code && getRealLen(this.applyObj.code) > 100) {
  426. this.applyObj.code = cutOutString(this.applyObj.code, 100)
  427. } else {
  428. this.getSimilarCode()
  429. }
  430. },
  431. onBrandChange: function () {
  432. this.applyObj.brand = this.applyObj.brand.trim()
  433. if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
  434. let chineseIndex = -1
  435. for (let i = 0; i < this.applyObj.brand.length; i++) {
  436. if ((/[^\x00-\xff]/g).test(this.applyObj.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.applyObj.brand.charAt(i))) {
  437. chineseIndex = i
  438. break
  439. }
  440. }
  441. if (chineseIndex > -1) {
  442. this.applyObj.brand = this.applyObj.brand.substring(0, chineseIndex)
  443. }
  444. } else if (this.applyObj.brand && getRealLen(this.applyObj.brand) > 50) {
  445. this.applyObj.brand = cutOutString(this.applyObj.brand, 50)
  446. }
  447. this.getSimilarBrand()
  448. },
  449. onAmountInput: function () {
  450. if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
  451. let chineseIndex = -1
  452. for (let i = 0; i < this.applyObj.amount.length; i++) {
  453. if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
  454. chineseIndex = i
  455. break
  456. }
  457. }
  458. this.applyObj.amount = cutOutString(this.applyObj.amount, chineseIndex)
  459. } else if (this.applyObj.amount.length > 9) {
  460. this.applyObj.amount = cutOutString(this.applyObj.amount, 9)
  461. }
  462. },
  463. onSuccess: function (data) {
  464. if (!this.user.logged) {
  465. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  466. } else if (data.success) {
  467. window.location.href = '/applyPurchase/' + data.data
  468. } else {
  469. this.$message.error(data.message)
  470. }
  471. },
  472. onError: function () {
  473. if (!this.user.logged) {
  474. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  475. } else {
  476. this.$message.error('上传失败, 系统错误')
  477. }
  478. },
  479. downloadTemplate: function () {
  480. window.location.href = '/seek/release/template'
  481. },
  482. setCode: function (code) {
  483. this.applyObj.code = code
  484. this.showSimilarCodeList = false
  485. },
  486. setBrand: function (brand) {
  487. this.applyObj.brand = brand
  488. this.showSimilarBrandList = false
  489. }
  490. // upload: function (e) {
  491. // let file = e.target.files[0]
  492. // let param = new FormData()
  493. // param.append('file', file, file.name)
  494. // let config = {
  495. // headers: {'Content-Type': file.type}
  496. // }
  497. // this.$http.post('/seek/importBom', param, config).then(response => {
  498. // if (response.data.success) {
  499. // window.open('/applyPurchase/' + response.data.data)
  500. // } else {
  501. // this.$message.error('上传失败')
  502. // }
  503. // }, err => {
  504. // console.log(err)
  505. // this.$message.error('系统错误')
  506. // })
  507. // }
  508. }
  509. }
  510. </script>
  511. <style lang="scss">
  512. .publish-apply {
  513. background: url('/images/applyPurchase/banner.png') center center/cover no-repeat;
  514. height: 583px;
  515. padding-top: 290px;
  516. width: 1190px;
  517. margin: 0 auto;
  518. padding-left: 44px;
  519. >div {
  520. display: inline-block;
  521. border: 1px solid #3975f4;
  522. height: 267px;
  523. margin-right: 6px;
  524. vertical-align: middle;
  525. background: #fff;
  526. float: left;
  527. text-align: center;
  528. }
  529. .good-purchaser {
  530. width: 225px;
  531. .good-purchaser-title {
  532. height: 55px;
  533. line-height: 55px;
  534. background: #3975f4;
  535. margin: 0;
  536. }
  537. ul {
  538. padding: 0 22px 0 10px;
  539. li {
  540. line-height: 42px;
  541. span {
  542. float: right;
  543. display: inline-block;
  544. width: 152px;
  545. overflow: hidden;
  546. text-overflow: ellipsis;
  547. white-space: nowrap;
  548. text-align: left;
  549. }
  550. i {
  551. display: inline-block;
  552. float: left;
  553. width: 25px;
  554. color: #fff;
  555. font-size: 16px;
  556. font-style: normal;
  557. }
  558. }
  559. }
  560. }
  561. .publish-area {
  562. width: 549px;
  563. text-align: center;
  564. .publish-form-area {
  565. width: 243px;
  566. float: left;
  567. height: 100%;
  568. p {
  569. padding-top: 8px;
  570. font-size: 22px;
  571. color: #3975f4;
  572. margin-bottom: 4px;
  573. }
  574. >div {
  575. text-align: left;
  576. margin-left: 14px;
  577. .form-item {
  578. margin-bottom: 3px;
  579. position: relative;
  580. span {
  581. width: 80px;
  582. text-align: right;
  583. display: inline-block;
  584. i {
  585. position: relative;
  586. top: 2px;
  587. right: 3px;
  588. color: #e41515;
  589. }
  590. }
  591. ul {
  592. line-height: normal;
  593. position: absolute;
  594. top: 19px;
  595. left: 79px;
  596. background: #fff;
  597. border: 1px solid #b5b5b5;
  598. z-index: 1;
  599. max-height: 120px;
  600. overflow-y: auto;
  601. overflow-x: hidden;
  602. border-radius: 3px;
  603. width: 114px;
  604. font-size: 12px;
  605. li {
  606. height: 24px;
  607. line-height: 24px;
  608. cursor: pointer;
  609. overflow: hidden;
  610. text-overflow: ellipsis;
  611. white-space: nowrap;
  612. padding: 0 5px;
  613. &:hover {
  614. background: #ddd;
  615. }
  616. }
  617. }
  618. select {
  619. width: 32px;
  620. position: absolute;
  621. height: 20px;
  622. background: url('/images/applyPurchase/select.png')no-repeat right;
  623. background-position-x: 15px;
  624. padding: 0 0 0 3px;
  625. border-radius: 0;
  626. & + input {
  627. padding-left: 34px;
  628. }
  629. }
  630. .el-input {
  631. width: 111px;
  632. .el-input__inner {
  633. }
  634. }
  635. input {
  636. font-size: 12px;
  637. width: 111px;
  638. height: 18px;
  639. line-height: 18px;
  640. border-radius: 2px;
  641. padding: 0 3px;
  642. box-shadow: none;
  643. -webkit-box-shadow: none;
  644. -moz-box-shadow: none;
  645. &.error {
  646. border-color: #f4645f!important;
  647. }
  648. }
  649. }
  650. }
  651. >a {
  652. width: 90px;
  653. height: 25px;
  654. line-height: 25px;
  655. background: #3975f4;
  656. color: #fefefe;
  657. font-size: 16px;
  658. display: block;
  659. margin: 0 auto;
  660. border-radius: 3px;
  661. cursor: pointer;
  662. }
  663. }
  664. .publish-upload {
  665. background: url('/images/applyPurchase/publish-apply-bg.png')no-repeat;
  666. background-size: cover;
  667. width: 304px;
  668. height: 100%;
  669. padding-left: 22px;
  670. float: right;
  671. color: #fff;
  672. position: relative;
  673. h1 {
  674. font-size: 22px;
  675. margin: 11px 0 0 0;
  676. }
  677. h2 {
  678. font-size: 16px;
  679. margin: 10px 0 23px 0;
  680. }
  681. h3 {
  682. font-size: 16px;
  683. margin: 20px 0 13px 0;
  684. }
  685. label {
  686. position: relative;
  687. /*input {
  688. display: none;
  689. }*/
  690. > div {
  691. position: absolute;
  692. .el-upload {
  693. input {
  694. display: none;
  695. }
  696. .el-upload-dragger {
  697. width: 247px;
  698. height: 216px;
  699. position: absolute;
  700. bottom: -37px;
  701. right: -166px;
  702. opacity: 0;
  703. }
  704. }
  705. }
  706. }
  707. .download-line {
  708. cursor: pointer;
  709. color: #b47200;
  710. }
  711. .apply-logo {
  712. position: absolute;
  713. left: -20px;
  714. top: 86px;
  715. }
  716. }
  717. }
  718. .apply-rank {
  719. width: 317px;
  720. margin-right: 0;
  721. background: url('/images/applyPurchase/rank-title.png') no-repeat;
  722. background-color: #fff;
  723. background-size: 319px 74px;
  724. background-position: -3px -2px;
  725. table {
  726. margin: 76px auto 0;
  727. width: 98%;
  728. thead {
  729. background: #e0e0e0;
  730. height: 26px;
  731. line-height: 26px;
  732. border-radius: 3px;
  733. tr {
  734. th {
  735. font-size: 16px;
  736. font-weight: bold;
  737. text-align: center;
  738. }
  739. }
  740. }
  741. tbody {
  742. tr {
  743. height: 25px;
  744. line-height: 25px;
  745. &:first-child {
  746. td {
  747. padding-top: 10px;
  748. }
  749. }
  750. td {
  751. color: #666;
  752. &:nth-child(1) {
  753. color: #f6682f;
  754. font-size: 12px;
  755. >div {
  756. width: 62px;
  757. span {
  758. font-size: 16px;
  759. }
  760. }
  761. }
  762. &:nth-child(2) {
  763. >div {
  764. width: 160px;
  765. }
  766. }
  767. &:nth-child(3) {
  768. >div {
  769. width: 92px;
  770. }
  771. }
  772. >div {
  773. overflow: hidden;
  774. text-overflow: ellipsis;
  775. white-space: nowrap;
  776. padding: 0 8px;
  777. position: relative;
  778. height: 30px;
  779. i {
  780. font-style: normal;
  781. float: right;
  782. color: #8b8b8b;
  783. font-size: 14px;
  784. position: absolute;
  785. right: 0;
  786. }
  787. }
  788. }
  789. }
  790. }
  791. }
  792. }
  793. .apply-del-box{
  794. position: fixed;
  795. z-index: 1000;
  796. height: auto;
  797. opacity: 1;
  798. background-color: white;
  799. width: 310px;
  800. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  801. -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  802. -o-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  803. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  804. margin: -155px 0 0 -75px;
  805. top: 55%;
  806. left: 43%;
  807. .title{
  808. height: 24px;
  809. background-color: #007aff;
  810. text-align: right;
  811. padding-right: 15px;
  812. line-height: 24px;
  813. a{
  814. color: white;
  815. font-size: 12px;
  816. }
  817. }
  818. .content{
  819. width: 100%;
  820. text-align: center;
  821. margin: 0 auto;
  822. p{
  823. padding: 12px 31px;
  824. margin: 0;
  825. i{
  826. color: #5078cb;
  827. font-size: 16px;
  828. margin-right: 10px;
  829. }
  830. span {
  831. color: #007aff;
  832. }
  833. &:last-child {
  834. font-size: 12px;
  835. }
  836. }
  837. div{
  838. width: 100%;
  839. text-align: center;
  840. margin: 0 auto 20px;
  841. a{
  842. padding: 0 19px;
  843. height: 26px;
  844. line-height: 26px;
  845. display: inline-block;
  846. text-align: center;
  847. font-size: 14px;
  848. color: #fff;
  849. &:first-child{
  850. background: #c8c6c6;
  851. margin-right: 10px;
  852. }
  853. &:last-child{
  854. background: #007aff;
  855. }
  856. }
  857. }
  858. }
  859. }
  860. }
  861. .el-date-editor--date{
  862. width: 110px;
  863. &.error {
  864. input {
  865. border: 1px solid #f4645f !important;
  866. }
  867. }
  868. }
  869. .el-icon-date {
  870. display: none;
  871. }
  872. .el-input__inner {
  873. height: 20px;
  874. border-radius: 0;
  875. border: 1px solid #c9c9c9;
  876. }
  877. </style>