PublishApply.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  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">
  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">
  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. 单价预算:
  39. </span>
  40. <select v-model="applyObj.currency">
  41. <option value="RMB">¥</option>
  42. <option value="USD">$</option>
  43. </select>
  44. <input type="number" class="form-control" :class="{'error': !validObj.unitPrice}" v-model="applyObj.unitPrice" @blur="checkUnitPrice" @input="onUnitPriceInput" />
  45. </div>
  46. <div class="form-item">
  47. <span>
  48. 封装:
  49. </span>
  50. <input type="text" class="form-control" maxlength="20" v-model="applyObj.encapsulation" @input="onEncapsulationChange" />
  51. </div>
  52. <div class="form-item">
  53. <span>
  54. 生产日期:
  55. </span>
  56. <input type="text" class="form-control" v-model="applyObj.produceDate" @input="onProduceDateChange" />
  57. </div>
  58. <div class="form-item">
  59. <span>
  60. 采购数量:
  61. </span>
  62. <input type="text" class="form-control" :class="{'error': !validObj.amount}" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput" />
  63. </div>
  64. <div class="form-item">
  65. <span>
  66. <i>*</i>截止日期:
  67. </span>
  68. <!--<input type="text" class="form-control" readonly :class="{'error': !validObj.deadline}" v-model="applyObj.deadline" @blur="checkDeadline" />-->
  69. <el-date-picker
  70. v-model="applyObj.deadline"
  71. type="date"
  72. :picker-options="pickerOptions"
  73. :class="{'error': !validObj.deadline}"
  74. @change="setDeadLineValid"
  75. :editable="false"
  76. :clearable="true"
  77. size="mini">
  78. </el-date-picker>
  79. </div>
  80. </div>
  81. <a @click="goPublish()">发布求购</a>
  82. </div>
  83. <div class="publish-upload">
  84. <h1>批量发布</h1>
  85. <h2>3秒一键配单采购</h2>
  86. <label>
  87. <img src="/images/applyPurchase/upload.png" alt="" />
  88. <!--<input type="file" accept="*.xls, *.xlsx" @change="upload">-->
  89. <el-upload
  90. drag
  91. action="/seek/importBom"
  92. accept="*.xls, *.xlsx"
  93. :show-file-list="false"
  94. :on-success="onSuccess"
  95. :on-error="onError">
  96. </el-upload>
  97. </label>
  98. <h3>把Excel格式的BOM拖放到框中</h3>
  99. <img @click="downloadTemplate()" class="download-line" src="/images/applyPurchase/download.png" alt="">
  100. <img class="apply-logo" src="/images/applyPurchase/publish-apply.png" alt="">
  101. </div>
  102. </div>
  103. <div class="apply-rank">
  104. <table>
  105. <thead>
  106. <tr>
  107. <th width="62">排名</th>
  108. <th width="124">求购型号</th>
  109. <th width="57">数量</th>
  110. <th width="72">求购次数</th>
  111. </tr>
  112. </thead>
  113. <tbody>
  114. <tr v-for="(rank, index) in purchaseRank">
  115. <td><div>NO.<span>{{index + 1}}</span><i>|</i></div></td>
  116. <td :title="rank.spCode"><div><span>{{rank.spCode}}</span><i>|</i></div></td>
  117. <td :title="rank.spAmount"><div><span>{{rank.spAmount}}</span><i>|</i></div></td>
  118. <td :title="rank.uuAmount"><div>{{rank.uuAmount}}</div></td>
  119. </tr>
  120. </tbody>
  121. </table>
  122. </div>
  123. <!--提示框-->
  124. <div class="apply-del-box" v-if="showRemindBox">
  125. <div class="title">
  126. <a @click="showRemindBox = false"><i class="fa fa-close fa-lg"></i></a>
  127. </div>
  128. <div class="content">
  129. <!--<p style="line-height: 20px;margin-top: 10px;padding:0 10px">非常抱歉,目前暂无此品牌!<br>若直接前往“品牌申请”,我们将为您先开通寄售功能,待申请通过后再提交开店申请。</p>-->
  130. <!--<p style="line-height: 20px;">前往<a @click="goBrandApply()" target="_blank" style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>-->
  131. <p><img src="/images/applyPurchase/check.png" alt="">发布成功</p>
  132. <p>其中 <span>100</span>个求购型号有现货在售,您可前往“<span>买家中心-我的求购</span>”查询并直接购买</p>
  133. <div>
  134. <a @click="showRemindBox = false">我知道了</a>
  135. <a href="/user#/seekPurchase">前往我的求购</a>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </template>
  141. <script>
  142. let getRealLen = function (str) {
  143. let len = 0
  144. for (let i = 0; i < str.length; i++) {
  145. if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
  146. len += 2
  147. } else {
  148. len++
  149. }
  150. }
  151. return len
  152. }
  153. let cutOutString = function (str, length) {
  154. for (let i = 1; i <= str.length; i++) {
  155. if (getRealLen(str.substr(0, i)) > length) {
  156. str = str.substr(0, i - 1)
  157. break
  158. }
  159. }
  160. return str
  161. }
  162. export default {
  163. data () {
  164. return {
  165. applyObj: {
  166. code: '',
  167. brand: '',
  168. unitPrice: '',
  169. currency: 'RMB',
  170. encapsulation: '',
  171. produceDate: '',
  172. amount: '',
  173. deadline: ''
  174. },
  175. validObj: {
  176. code: true,
  177. brand: true,
  178. unitPrice: true,
  179. // encapsulation: true,
  180. // produceDate: true,
  181. amount: true,
  182. deadline: 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. mounted () {
  209. document.getElementsByClassName('el-upload-dragger')[0].onclick = function (event) {
  210. event.stopPropagation()
  211. }
  212. let _this = this
  213. document.body.onclick = function () {
  214. _this.showSimilarCodeList = false
  215. _this.showSimilarBrandList = false
  216. }
  217. },
  218. methods: {
  219. emptyForm: function () {
  220. for (let attr in this.applyObj) {
  221. this.applyObj[attr] = attr === 'currency' ? 'RMB' : ''
  222. }
  223. },
  224. getRankBg: function (index) {
  225. return index === 0 ? 1 : index < 3 ? 2 : 3
  226. },
  227. goPublish: function () {
  228. if (this.user.logged) {
  229. if (this.checkAll()) {
  230. this.$http.post('/seek/saveOneSeekPurchase', this.applyObj)
  231. .then(response => {
  232. this.$message.success('发布成功')
  233. // this.showRemindBox = true
  234. this.emptyForm()
  235. // this.validObj.deadline = true
  236. this.$store.dispatch('applyPurchase/loadPurchaseManList', {page: 1, count: 10})
  237. }, error => {
  238. console.log(error)
  239. this.$message.error('发布失败')
  240. })
  241. } else {
  242. if (!this.validObj.code) {
  243. this.$message.error('型号不能为空')
  244. } else if (!this.validObj.brand) {
  245. this.$message.error('品牌不能为空')
  246. } else if (!this.validObj.deadline) {
  247. this.$message.error('截止日期不能为空')
  248. } else if (!this.validObj.amount || !this.validObj.unitPrice) {
  249. this.$message.error('请输入正确的数值')
  250. }
  251. // this.$message.error('请填写正确的信息')
  252. }
  253. } else {
  254. this.$router.push('/auth/login?returnUrl=' + window.location.href)
  255. }
  256. },
  257. getSimilarCode: function () {
  258. this.$http.get('/search/similarComponents', {params: {keyword: this.applyObj.code}})
  259. .then(response => {
  260. this.similarCode = response.data
  261. this.showSimilarCodeList = response.data.length > 0
  262. })
  263. },
  264. getSimilarBrand: function () {
  265. this.$http.get('/search/similarBrands', {params: {keyword: this.applyObj.brand}})
  266. .then(response => {
  267. this.similarBrand = response.data
  268. this.showSimilarBrandList = response.data.length > 0
  269. })
  270. },
  271. checkCode: function () {
  272. this.validObj.code = this.applyObj.code && this.applyObj.code !== ''
  273. if (!this.validObj.code) {
  274. this.$message.error('型号不能为空')
  275. }
  276. return this.validObj.code
  277. },
  278. checkBrand: function () {
  279. this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== ''
  280. if (!this.validObj.brand) {
  281. this.$message.error('品牌不能为空')
  282. }
  283. return this.validObj.brand
  284. },
  285. checkUnitPrice: function () {
  286. this.validObj.unitPrice = this.applyObj.unitPrice === '' ? true : this.applyObj.unitPrice > 0 && this.applyObj.unitPrice < 100000000
  287. if (this.applyObj.unitPrice < 0) {
  288. this.$message.error('请输入正确的数值')
  289. }
  290. return this.validObj.unitPrice
  291. },
  292. checkAmount: function () {
  293. this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 100000000
  294. return this.validObj.amount
  295. },
  296. checkAll: function () {
  297. return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount()
  298. },
  299. checkDeadline: function () {
  300. this.validObj.deadline = Boolean(this.applyObj.deadline)
  301. return this.validObj.deadline
  302. },
  303. setDeadLineValid: function () {
  304. this.validObj.deadline = true
  305. },
  306. onUnitPriceInput: function () {
  307. let price = this.applyObj.unitPrice
  308. if (price >= 10000) {
  309. this.applyObj.unitPrice = price.substring(0, 4)
  310. } else if (price.indexOf('.') > -1) {
  311. let arr = price.split('.')
  312. if (arr[0].length > 4) {
  313. this.applyObj.unitPrice = Number(arr[0].substring(0, 4) + '.' + arr[1])
  314. } else if (arr[1].length > 6) {
  315. this.applyObj.unitPrice = Number(arr[0] + '.' + arr[1].substring(0, 6))
  316. }
  317. }
  318. },
  319. onProduceDateChange: function () {
  320. if (this.applyObj.produceDate && getRealLen(this.applyObj.produceDate) > 12) {
  321. this.applyObj.produceDate = cutOutString(this.applyObj.produceDate, 12)
  322. }
  323. },
  324. onEncapsulationChange: function () {
  325. if (this.applyObj.encapsulation && getRealLen(this.applyObj.encapsulation) > 20) {
  326. this.applyObj.encapsulation = cutOutString(this.applyObj.encapsulation, 20)
  327. }
  328. },
  329. onCodeChange: function () {
  330. this.applyObj.code = this.applyObj.code.trim()
  331. if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
  332. let chineseIndex = -1
  333. for (let i = 0; i < this.applyObj.code.length; i++) {
  334. if ((/[^\x00-\xff]/g).test(this.applyObj.code.charAt(i))) {
  335. chineseIndex = i
  336. break
  337. }
  338. }
  339. this.applyObj.code = cutOutString(this.applyObj.code, chineseIndex)
  340. } else if (this.applyObj.code && getRealLen(this.applyObj.code) > 100) {
  341. this.applyObj.code = cutOutString(this.applyObj.code, 100)
  342. } else {
  343. this.getSimilarCode()
  344. }
  345. },
  346. onBrandChange: function () {
  347. this.applyObj.brand = this.applyObj.brand.trim()
  348. if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
  349. let chineseIndex = -1
  350. for (let i = 0; i < this.applyObj.brand.length; i++) {
  351. if ((/[^\x00-\xff]/g).test(this.applyObj.brand.charAt(i))) {
  352. chineseIndex = i
  353. break
  354. }
  355. }
  356. this.applyObj.brand = cutOutString(this.applyObj.brand, chineseIndex)
  357. } else if (this.applyObj.brand && getRealLen(this.applyObj.brand) > 50) {
  358. this.applyObj.brand = cutOutString(this.applyObj.brand, 50)
  359. } else {
  360. this.getSimilarBrand()
  361. }
  362. },
  363. onAmountInput: function () {
  364. if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
  365. let chineseIndex = -1
  366. for (let i = 0; i < this.applyObj.amount.length; i++) {
  367. if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
  368. chineseIndex = i
  369. break
  370. }
  371. }
  372. this.applyObj.amount = cutOutString(this.applyObj.amount, chineseIndex)
  373. } else if (this.applyObj.amount.length > 8) {
  374. this.applyObj.amount = cutOutString(this.applyObj.amount, 8)
  375. }
  376. },
  377. onSuccess: function (data) {
  378. if (data.success) {
  379. window.open('/applyPurchase/' + data.data)
  380. } else {
  381. this.$message.error(data.message)
  382. }
  383. },
  384. onError: function () {
  385. this.$message.error('上传失败, 系统错误')
  386. },
  387. downloadTemplate: function () {
  388. window.location.href = '/seek/release/template'
  389. },
  390. setCode: function (code) {
  391. this.applyObj.code = code
  392. this.showSimilarCodeList = false
  393. },
  394. setBrand: function (brand) {
  395. this.applyObj.brand = brand
  396. this.showSimilarBrandList = false
  397. }
  398. // upload: function (e) {
  399. // let file = e.target.files[0]
  400. // let param = new FormData()
  401. // param.append('file', file, file.name)
  402. // let config = {
  403. // headers: {'Content-Type': file.type}
  404. // }
  405. // this.$http.post('/seek/importBom', param, config).then(response => {
  406. // if (response.data.success) {
  407. // window.open('/applyPurchase/' + response.data.data)
  408. // } else {
  409. // this.$message.error('上传失败')
  410. // }
  411. // }, err => {
  412. // console.log(err)
  413. // this.$message.error('系统错误')
  414. // })
  415. // }
  416. }
  417. }
  418. </script>
  419. <style lang="scss">
  420. .publish-apply {
  421. background: url('/images/applyPurchase/banner.png') center center/cover no-repeat;
  422. height: 583px;
  423. padding-top: 290px;
  424. width: 1190px;
  425. margin: 0 auto;
  426. padding-left: 44px;
  427. >div {
  428. display: inline-block;
  429. border: 1px solid #3975f4;
  430. height: 267px;
  431. margin-right: 6px;
  432. vertical-align: middle;
  433. background: #fff;
  434. float: left;
  435. text-align: center;
  436. }
  437. .good-purchaser {
  438. width: 225px;
  439. .good-purchaser-title {
  440. height: 55px;
  441. line-height: 55px;
  442. background: #3975f4;
  443. margin: 0;
  444. }
  445. ul {
  446. padding: 0 22px 0 10px;
  447. li {
  448. line-height: 42px;
  449. span {
  450. float: right;
  451. display: inline-block;
  452. width: 152px;
  453. overflow: hidden;
  454. text-overflow: ellipsis;
  455. white-space: nowrap;
  456. text-align: left;
  457. }
  458. i {
  459. display: inline-block;
  460. float: left;
  461. width: 25px;
  462. color: #fff;
  463. font-size: 16px;
  464. font-style: normal;
  465. }
  466. }
  467. }
  468. }
  469. .publish-area {
  470. width: 549px;
  471. text-align: center;
  472. .publish-form-area {
  473. width: 243px;
  474. float: left;
  475. height: 100%;
  476. p {
  477. padding-top: 18px;
  478. font-size: 26px;
  479. color: #3975f4;
  480. margin-bottom: 7px;
  481. }
  482. >div {
  483. text-align: left;
  484. margin-left: 14px;
  485. .form-item {
  486. margin-bottom: 5px;
  487. position: relative;
  488. span {
  489. width: 80px;
  490. text-align: right;
  491. display: inline-block;
  492. i {
  493. position: relative;
  494. top: 2px;
  495. right: 3px;
  496. color: #e41515;
  497. }
  498. }
  499. ul {
  500. line-height: normal;
  501. position: absolute;
  502. top: 19px;
  503. left: 79px;
  504. background: #fff;
  505. border: 1px solid #b5b5b5;
  506. z-index: 1;
  507. max-height: 120px;
  508. overflow-y: auto;
  509. overflow-x: hidden;
  510. border-radius: 3px;
  511. width: 114px;
  512. font-size: 12px;
  513. li {
  514. height: 24px;
  515. line-height: 24px;
  516. cursor: pointer;
  517. overflow: hidden;
  518. text-overflow: ellipsis;
  519. white-space: nowrap;
  520. padding: 0 5px;
  521. &:hover {
  522. background: #ddd;
  523. }
  524. }
  525. }
  526. select {
  527. width: 32px;
  528. position: absolute;
  529. height: 20px;
  530. background: url('/images/applyPurchase/select.png')no-repeat right;
  531. background-position-x: 15px;
  532. padding: 0 0 0 3px;
  533. & + input {
  534. padding-left: 34px;
  535. }
  536. }
  537. .el-input {
  538. width: 111px;
  539. .el-input__inner {
  540. }
  541. }
  542. input {
  543. font-size: 12px;
  544. width: 111px;
  545. height: 20px;
  546. line-height: 20px;
  547. border-radius: 2px;
  548. padding: 0 3px;
  549. box-shadow: none;
  550. -webkit-box-shadow: none;
  551. -moz-box-shadow: none;
  552. &.error {
  553. border-color: #f4645f!important;
  554. }
  555. }
  556. }
  557. }
  558. >a {
  559. width: 90px;
  560. height: 25px;
  561. line-height: 25px;
  562. background: #3975f4;
  563. color: #fefefe;
  564. font-size: 16px;
  565. display: block;
  566. margin: 0 auto;
  567. border-radius: 3px;
  568. cursor: pointer;
  569. }
  570. }
  571. .publish-upload {
  572. background: url('/images/applyPurchase/publish-apply-bg.png')no-repeat;
  573. background-size: cover;
  574. width: 304px;
  575. height: 100%;
  576. padding-left: 22px;
  577. float: right;
  578. color: #fff;
  579. position: relative;
  580. h1 {
  581. font-size: 26px;
  582. margin: 22px 0 0 0;
  583. }
  584. h2 {
  585. font-size: 16px;
  586. margin: 10px 0 23px 0;
  587. }
  588. h3 {
  589. font-size: 16px;
  590. margin: 20px 0 13px 0;
  591. }
  592. label {
  593. position: relative;
  594. /*input {
  595. display: none;
  596. }*/
  597. > div {
  598. position: absolute;
  599. .el-upload {
  600. input {
  601. display: none;
  602. }
  603. .el-upload-dragger {
  604. width: 66px;
  605. height: 66px;
  606. position: absolute;
  607. bottom: 17px;
  608. right: -66px;
  609. opacity: 0;
  610. }
  611. }
  612. }
  613. }
  614. .download-line {
  615. cursor: pointer;
  616. }
  617. .apply-logo {
  618. position: absolute;
  619. left: -20px;
  620. top: 86px;
  621. }
  622. }
  623. }
  624. .apply-rank {
  625. width: 317px;
  626. margin-right: 0;
  627. background: url('/images/applyPurchase/rank-title.png') no-repeat;
  628. background-color: #fff;
  629. background-size: 319px 74px;
  630. background-position: -3px -2px;
  631. table {
  632. margin: 76px auto 0;
  633. width: 98%;
  634. thead {
  635. background: #e0e0e0;
  636. height: 26px;
  637. line-height: 26px;
  638. border-radius: 3px;
  639. tr {
  640. th {
  641. font-size: 16px;
  642. font-weight: bold;
  643. text-align: center;
  644. }
  645. }
  646. }
  647. tbody {
  648. tr {
  649. height: 25px;
  650. line-height: 25px;
  651. &:first-child {
  652. td {
  653. padding-top: 10px;
  654. }
  655. }
  656. td {
  657. color: #666;
  658. &:nth-child(1) {
  659. color: #f6682f;
  660. font-size: 12px;
  661. >div {
  662. width: 62px;
  663. span {
  664. font-size: 16px;
  665. }
  666. }
  667. }
  668. &:nth-child(2) {
  669. >div {
  670. width: 122px;
  671. }
  672. }
  673. &:nth-child(3) {
  674. >div {
  675. width: 55px;
  676. }
  677. }
  678. &:nth-child(4) {
  679. >div {
  680. width: 72px;
  681. }
  682. }
  683. >div {
  684. overflow: hidden;
  685. text-overflow: ellipsis;
  686. white-space: nowrap;
  687. padding: 0 8px;
  688. position: relative;
  689. height: 30px;
  690. i {
  691. font-style: normal;
  692. float: right;
  693. color: #8b8b8b;
  694. font-size: 14px;
  695. position: absolute;
  696. right: 0;
  697. }
  698. }
  699. }
  700. }
  701. }
  702. }
  703. }
  704. .apply-del-box{
  705. position: fixed;
  706. z-index: 1000;
  707. height: auto;
  708. opacity: 1;
  709. background-color: white;
  710. width: 310px;
  711. -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  712. -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  713. -o-box-shadow: 0 5px 15px rgba(0,0,0,.5);
  714. box-shadow: 0 5px 15px rgba(0,0,0,.5);
  715. margin: -155px 0 0 -75px;
  716. top: 55%;
  717. left: 43%;
  718. .title{
  719. height: 24px;
  720. background-color: #007aff;
  721. text-align: right;
  722. padding-right: 15px;
  723. line-height: 24px;
  724. a{
  725. color: white;
  726. font-size: 12px;
  727. }
  728. }
  729. .content{
  730. width: 100%;
  731. text-align: center;
  732. margin: 0 auto;
  733. p{
  734. padding: 12px 31px;
  735. margin: 0;
  736. i{
  737. color: #5078cb;
  738. font-size: 16px;
  739. margin-right: 10px;
  740. }
  741. span {
  742. color: #007aff;
  743. }
  744. &:last-child {
  745. font-size: 12px;
  746. }
  747. }
  748. div{
  749. width: 100%;
  750. text-align: center;
  751. margin: 0 auto 20px;
  752. a{
  753. padding: 0 19px;
  754. height: 26px;
  755. line-height: 26px;
  756. display: inline-block;
  757. text-align: center;
  758. font-size: 14px;
  759. color: #fff;
  760. &:first-child{
  761. background: #c8c6c6;
  762. margin-right: 10px;
  763. }
  764. &:last-child{
  765. background: #007aff;
  766. }
  767. }
  768. }
  769. }
  770. }
  771. }
  772. .el-date-editor--date{
  773. width: 110px;
  774. &.error {
  775. input {
  776. border: 1px solid #f4645f !important;
  777. }
  778. }
  779. }
  780. .el-icon-date {
  781. display: none;
  782. }
  783. .el-input__inner {
  784. height: 20px;
  785. border-radius: 0;
  786. border: 1px solid #c9c9c9;
  787. }
  788. </style>