PublishApply.vue 29 KB

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