PersonalMaterial.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. <template>
  2. <div class="personal-material">
  3. <a @click="goLastPage">&lt;返回上一层</a>
  4. <div class="personal-material-header">
  5. <p><i class="fa fa-exclamation-circle"></i>抱歉,您的账户未绑定企业,暂无卖家权限!</p>
  6. <a @click="setShowApplyRecord(true)">查看申请记录</a>
  7. </div>
  8. <div class="personal-material-content">
  9. <div class="is-open-store">
  10. <p><img src="/images/material/arrow-right-blue.png" alt="">所属企业已开店</p>
  11. <div>
  12. <p>绑定企业</p>
  13. <div class="search-content">企业全称:<input type="text" class="form-control" v-model="keyword" placeholder="请输入企业全称" @keyup.13="onSearchEnterprise"><span @click="onSearchEnterprise">检测</span></div>
  14. <div class="result-content" v-if="showSearchResultStatus == 1">
  15. <p v-text="enInfo.name"></p>
  16. <div class="result-text">
  17. <span>管理员</span>
  18. <span v-text="enInfo.adminName"></span>
  19. </div>
  20. <div class="result-text">
  21. <span>营业执照号</span>
  22. <span v-text="enInfo.businessCode"></span>
  23. </div>
  24. <a href="javascript:void(0)" @click="bindEnterprise">申请绑定</a>
  25. <div class="result-remind">管理员审核通过后成功绑定</div>
  26. </div>
  27. <p class="no-result-content" v-if="showSearchResultStatus == 2">
  28. {{enName}} <span>(未开店)</span>
  29. </p>
  30. </div>
  31. </div>
  32. <div class="not-open-store">
  33. <p><img src="/images/material/arrow-right-yellow.png" alt="">所属企业未开店</p>
  34. <div>
  35. <div class="fl">
  36. <img src="/images/material/car.png" alt="">
  37. <ul>
  38. <li>免费入驻 不赚差价</li>
  39. <li>库存寄售 极速上架</li>
  40. <li>定量广告 限时免费</li>
  41. </ul>
  42. </div>
  43. <div class="fr">
  44. <img src="/images/material/house.png" alt="">
  45. <div>
  46. <p>请点击下方按钮开设新的店铺</p>
  47. <a href="/register-saler">开设新店铺</a>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="modal-wrap" v-show="showRemindBox || showApplyRecord"></div>
  54. <div class="com-del-box" v-if="showRemindBox">
  55. <div class="title">
  56. <i @click="showRemindBox = false"></i>
  57. </div>
  58. <p><img src="/images/material/check.png" alt="">绑定申请提交成功!</p>
  59. <div class="result">审批结果将以短信通知,请保持手机通畅。</div>
  60. <div class="remind">弹窗将在 <span v-text="timer + '秒'"></span> 后自动关闭</div>
  61. </div>
  62. <div class="apply-record" v-if="showApplyRecord">
  63. <div class="title">申请记录 <img src="/images/material/apply-close.png" alt="" @click="setShowApplyRecord(false)"></div>
  64. <div class="record-wrap">
  65. <div class="record-title">
  66. <span>企业名称</span>
  67. <span>管理员</span>
  68. <span>申请时间</span>
  69. <span>状态</span>
  70. </div>
  71. <ul>
  72. <li>
  73. <span>深圳市哟软商城科技有限公司</span>
  74. <span>哈哈哈</span>
  75. <span>2018-12-12 11:11:11</span>
  76. <span class="green-text">待审核</span>
  77. </li>
  78. <li>
  79. <span>深圳市哟软商城科技有限公司</span>
  80. <span>哈哈哈</span>
  81. <span>2018-12-12 11:11:11</span>
  82. <span class="red-text">未通过</span>
  83. </li>
  84. <li>
  85. <span>深圳市哟软商城科技有限公司</span>
  86. <span>哈哈哈</span>
  87. <span>2018-12-12 11:11:11</span>
  88. <span>已通过</span>
  89. </li>
  90. <li>
  91. <span>深圳市哟软商城科技有限公司</span>
  92. <span>哈哈哈</span>
  93. <span>2018-12-12 11:11:11</span>
  94. <span>已通过</span>
  95. </li>
  96. <li>
  97. <span>深圳市哟软商城科技有限公司</span>
  98. <span>哈哈哈</span>
  99. <span>2018-12-12 11:11:11</span>
  100. <span>已通过</span>
  101. </li>
  102. </ul>
  103. </div>
  104. </div>
  105. </div>
  106. </template>
  107. <script>
  108. export default {
  109. data () {
  110. return {
  111. showApplyRecord: false,
  112. showRemindBox: false,
  113. // 0=>初始状态,1=>有搜索结果,2=>搜索结果为空
  114. showSearchResultStatus: 0,
  115. keyword: '',
  116. enName: '',
  117. enInfo: {},
  118. timer: 5
  119. }
  120. },
  121. methods: {
  122. goLastPage: function () {
  123. window.history.back(-1)
  124. },
  125. onSearchEnterprise: function () {
  126. if (this.keyword) {
  127. this.$http.get('/basic/enterprise/findByName/' + encodeURIComponent(this.keyword)).then(response => {
  128. console.log(response.data)
  129. if (response.data) {
  130. this.enInfo = response.data
  131. this.showSearchResultStatus = 1
  132. } else {
  133. this.enName = this.keyword
  134. this.showSearchResultStatus = 2
  135. }
  136. })
  137. }
  138. },
  139. bindEnterprise: function () {
  140. this.$http.get('/basic/enterprise/applyUserSpace', {params: {phone: this.enInfo.contactTel, enName: this.enInfo.name, businessCode: this.enInfo.businessCode}})
  141. .then(response => {
  142. if (response.data.data === 'success') {
  143. this.showRemindBox = true
  144. this.startInterval()
  145. } else {
  146. this.$message.error(response.data.data)
  147. }
  148. }, err => {
  149. console.log(err)
  150. this.$message.error('系统错误')
  151. })
  152. },
  153. startInterval: function () {
  154. this.timer = 5
  155. let _this = this
  156. let interval = setInterval(() => {
  157. _this.timer --
  158. if (_this.timer === 0) {
  159. clearInterval(interval)
  160. this.showRemindBox = false
  161. }
  162. }, 1000)
  163. },
  164. setShowApplyRecord: function (flag) {
  165. if (flag) {
  166. }
  167. this.showApplyRecord = flag
  168. }
  169. }
  170. }
  171. </script>
  172. <style lang="scss" scoped>
  173. .personal-material {
  174. width: 1190px;
  175. margin: 0 auto;
  176. p {
  177. margin: 0;
  178. }
  179. a {
  180. color: #5078cb;
  181. }
  182. > a {
  183. line-height: 71px;
  184. position: relative;
  185. right: 105px;
  186. }
  187. .personal-material-header {
  188. height: 111px;
  189. line-height: 111px;
  190. border: 1px solid #ebeaea;
  191. position: relative;
  192. margin-bottom: 19px;
  193. p {
  194. color: #5078cb;
  195. font-size: 22px;
  196. text-align: center;
  197. i {
  198. margin-right: 20px;
  199. }
  200. }
  201. a {
  202. position: absolute;
  203. right: 11px;
  204. bottom: 14px;
  205. display: inline-block;
  206. line-height: normal;
  207. }
  208. }
  209. .personal-material-content {
  210. height: 593px;
  211. border: 1px solid #ebeaea;
  212. margin-bottom: 147px;
  213. padding: 0 95px;
  214. > div {
  215. padding: 0 50px;
  216. border-radius: 3px;
  217. > p {
  218. height: 81px;
  219. line-height: 81px;
  220. font-size: 16px;
  221. font-weight: bold;
  222. img {
  223. margin-right: 4px;
  224. }
  225. }
  226. }
  227. .is-open-store {
  228. padding-bottom: 29px;
  229. border-bottom: 1px solid #d5d5d5;
  230. > div {
  231. min-height: 140px;
  232. border: 1px solid #5078cb;
  233. > p {
  234. font-weight: bold;
  235. font-size: 18px;
  236. margin: 26px 0;
  237. text-align: center;
  238. }
  239. .search-content {
  240. text-align: center;
  241. input {
  242. width: 290px;
  243. display: inline-block;
  244. height: 30px;
  245. border: {
  246. top-left-radius: 3px;
  247. bottom-left-radius: 3px;
  248. top-right-radius: 0;
  249. bottom-right-radius: 0;
  250. }
  251. border-top-left-radius: 3px;
  252. border-bottom-left-radius: 3px;
  253. border: 1px solid #cdcdcd;
  254. margin-left: 10px;
  255. }
  256. span {
  257. display: inline-block;
  258. width: 87px;
  259. height: 30px;
  260. line-height: 31px;
  261. text-align: center;
  262. color: #fff;
  263. background: #5078cb;
  264. margin-left: -1px;
  265. border-top-right-radius: 3px;
  266. border-bottom-right-radius: 3px;
  267. cursor: pointer;
  268. }
  269. }
  270. .result-content {
  271. padding: 0 0 0 221px;
  272. p {
  273. height: 41px;
  274. line-height: 41px;
  275. font-size: 16px;
  276. font-weight: bold;
  277. margin: 24px 0 0 0;
  278. width: 376px;
  279. border-bottom: 1px solid #e6e5e4;
  280. padding-left: 8px;
  281. }
  282. .result-text {
  283. padding-left: 8px;
  284. span {
  285. &:first-child {
  286. display: inline-block;
  287. width: 111px;
  288. color: #666;
  289. }
  290. }
  291. &:first-of-type {
  292. margin: 15px 0 21px 0;
  293. }
  294. }
  295. > a {
  296. display: inline-block;
  297. width: 201px;
  298. height: 40px;
  299. line-height: 40px;
  300. text-align: center;
  301. border-radius: 3px;
  302. background: #5078cb;
  303. color: #fff;
  304. margin: 37px 0 16px 130px;
  305. }
  306. .result-remind {
  307. margin: 0 0 18px 146px;
  308. color: #666;
  309. }
  310. }
  311. .no-result-content {
  312. font-size: 16px;
  313. margin: 26px 0 38px 220px;
  314. text-align: left;
  315. span {
  316. color: #f00707;
  317. font-weight: normal;
  318. }
  319. }
  320. }
  321. }
  322. .not-open-store {
  323. > div {
  324. height: 171px;
  325. border: 1px solid #ff8522;
  326. .fl {
  327. list-style: inside;
  328. color: #ff8522;
  329. height: 130px;
  330. width: 391px;
  331. margin-top: 25px;
  332. border-right: 1px dashed #fce3cf;
  333. img {
  334. margin: 11px 0 0 16px;
  335. }
  336. ul {
  337. list-style: inside;
  338. color: #ff8522;
  339. float: right;
  340. margin: 19px 61px 0 36px;
  341. li {
  342. margin-bottom: 20px;
  343. &:nth-child(2) {
  344. margin-left: 10px;
  345. }
  346. &:nth-child(3) {
  347. margin-left: 29px;
  348. }
  349. }
  350. }
  351. }
  352. .fr {
  353. width: 504px;
  354. img {
  355. margin: 45px 0 0 62px;
  356. }
  357. div {
  358. float: right;
  359. margin-right: 140px;
  360. margin-top: 44px;
  361. text-align: center;
  362. p {
  363. margin-bottom: 29px;
  364. }
  365. a {
  366. display: inline-block;
  367. width: 124px;
  368. height: 32px;
  369. color: #fff;
  370. font-size: 16px;
  371. text-align: center;
  372. line-height: 32px;
  373. background: #ff8522;
  374. border-radius: 3px;
  375. cursor: pointer;
  376. }
  377. }
  378. }
  379. }
  380. }
  381. }
  382. .com-del-box {
  383. text-align: center;
  384. -webkit-box-shadow: none;
  385. -moz-box-shadow: none;
  386. box-shadow: none;
  387. border-radius: 3px;
  388. > p {
  389. margin-top: 20px;
  390. margin-bottom: 10px;
  391. color: #5078cb;
  392. img {
  393. position: relative;
  394. bottom: 2px;
  395. margin-right: 8px;
  396. }
  397. }
  398. .result {
  399. color: #333;
  400. margin-bottom: 24px;
  401. }
  402. .remind {
  403. font-size: 12px;
  404. color: #666;
  405. span {
  406. color: #f40d0d;
  407. }
  408. }
  409. }
  410. .apply-record {
  411. position: fixed;
  412. top: 23%;
  413. left: 31%;
  414. z-index: 10;
  415. width: 577px;
  416. height: 239px;
  417. background: #fff;
  418. .title {
  419. height: 40px;
  420. line-height: 40px;
  421. text-align: center;
  422. font-size: 16px;
  423. color: #333;
  424. img {
  425. float: right;
  426. margin: 10px 11px 0 0;
  427. cursor: pointer;
  428. }
  429. }
  430. }
  431. .record-wrap {
  432. padding: 0 18px;
  433. .record-title {
  434. height: 28px;
  435. line-height: 28px;
  436. background: #8eb0f5;
  437. border: 1px solid #e8e8e8;
  438. color: #fff;
  439. }
  440. ul {
  441. max-height: 150px;
  442. overflow-y: auto;
  443. overflow-x: hidden;
  444. li {
  445. border-bottom: 1px solid #e8e8e8;
  446. height: 30px;
  447. &:nth-child(even) {
  448. background: #edf2fd;
  449. }
  450. &:nth-child(odd) {
  451. background: #f7f9fe;
  452. }
  453. span {
  454. line-height: 26px;
  455. position: relative;
  456. top: 2px;
  457. &.green-text {
  458. color: #379b1d;
  459. }
  460. &.red-text {
  461. color: #f51c24;
  462. }
  463. }
  464. }
  465. }
  466. span {
  467. overflow: hidden;
  468. text-overflow: ellipsis;
  469. white-space: nowrap;
  470. display: inline-block;
  471. text-align: center;
  472. &:nth-child(1) {
  473. width: 220px;
  474. padding: 0 10px 0 22px;
  475. }
  476. &:nth-child(2) {
  477. width: 68px;
  478. }
  479. &:nth-child(3) {
  480. width: 165px;
  481. }
  482. &:nth-child(4) {
  483. width: 82px;
  484. }
  485. }
  486. }
  487. }
  488. </style>