PublishApply.vue 30 KB

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