PersonalMaterial.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  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. computed: {
  122. user () {
  123. return this.$store.state.option.user
  124. }
  125. },
  126. methods: {
  127. goLastPage: function () {
  128. window.history.back(-1)
  129. },
  130. onSearchEnterprise: function () {
  131. if (this.keyword) {
  132. this.$http.get('/basic/enterprise/findByName/' + encodeURIComponent(this.keyword)).then(response => {
  133. console.log(response.data)
  134. if (response.data) {
  135. this.enInfo = response.data
  136. this.showSearchResultStatus = 1
  137. } else {
  138. this.enName = this.keyword
  139. this.showSearchResultStatus = 2
  140. }
  141. })
  142. }
  143. },
  144. bindEnterprise: function () {
  145. this.$http.get('/basic/enterprise/applyUserSpace', {params: {phone: this.enInfo.contactTel, enName: this.enInfo.name, businessCode: this.enInfo.businessCode}})
  146. .then(response => {
  147. if (response.data.data === 'success') {
  148. this.showRemindBox = true
  149. this.startInterval()
  150. } else {
  151. this.$message.error(response.data.data)
  152. }
  153. }, err => {
  154. console.log(err)
  155. this.$message.error('系统错误')
  156. })
  157. },
  158. startInterval: function () {
  159. this.timer = 5
  160. let _this = this
  161. let interval = setInterval(() => {
  162. _this.timer --
  163. if (_this.timer === 0) {
  164. clearInterval(interval)
  165. this.showRemindBox = false
  166. }
  167. }, 1000)
  168. },
  169. setShowApplyRecord: function (flag) {
  170. if (flag) {
  171. this.$http.get('/basic/enterprise/findApplyInfo', {params: {phone: this.user.data.userTel}})
  172. .then(response => {
  173. })
  174. }
  175. this.showApplyRecord = flag
  176. }
  177. }
  178. }
  179. </script>
  180. <style lang="scss" scoped>
  181. .personal-material {
  182. width: 1190px;
  183. margin: 0 auto;
  184. p {
  185. margin: 0;
  186. }
  187. a {
  188. color: #5078cb;
  189. }
  190. > a {
  191. line-height: 71px;
  192. position: relative;
  193. right: 105px;
  194. }
  195. .personal-material-header {
  196. height: 111px;
  197. line-height: 111px;
  198. border: 1px solid #ebeaea;
  199. position: relative;
  200. margin-bottom: 19px;
  201. p {
  202. color: #5078cb;
  203. font-size: 22px;
  204. text-align: center;
  205. i {
  206. margin-right: 20px;
  207. }
  208. }
  209. a {
  210. position: absolute;
  211. right: 11px;
  212. bottom: 14px;
  213. display: inline-block;
  214. line-height: normal;
  215. }
  216. }
  217. .personal-material-content {
  218. height: 593px;
  219. border: 1px solid #ebeaea;
  220. margin-bottom: 147px;
  221. padding: 0 95px;
  222. > div {
  223. padding: 0 50px;
  224. border-radius: 3px;
  225. > p {
  226. height: 81px;
  227. line-height: 81px;
  228. font-size: 16px;
  229. font-weight: bold;
  230. img {
  231. margin-right: 4px;
  232. }
  233. }
  234. }
  235. .is-open-store {
  236. padding-bottom: 29px;
  237. border-bottom: 1px solid #d5d5d5;
  238. > div {
  239. min-height: 140px;
  240. border: 1px solid #5078cb;
  241. > p {
  242. font-weight: bold;
  243. font-size: 18px;
  244. margin: 26px 0;
  245. text-align: center;
  246. }
  247. .search-content {
  248. text-align: center;
  249. input {
  250. width: 290px;
  251. display: inline-block;
  252. height: 30px;
  253. border: {
  254. top-left-radius: 3px;
  255. bottom-left-radius: 3px;
  256. top-right-radius: 0;
  257. bottom-right-radius: 0;
  258. }
  259. border-top-left-radius: 3px;
  260. border-bottom-left-radius: 3px;
  261. border: 1px solid #cdcdcd;
  262. margin-left: 10px;
  263. }
  264. span {
  265. display: inline-block;
  266. width: 87px;
  267. height: 30px;
  268. line-height: 31px;
  269. text-align: center;
  270. color: #fff;
  271. background: #5078cb;
  272. margin-left: -1px;
  273. border-top-right-radius: 3px;
  274. border-bottom-right-radius: 3px;
  275. cursor: pointer;
  276. }
  277. }
  278. .result-content {
  279. padding: 0 0 0 221px;
  280. p {
  281. height: 41px;
  282. line-height: 41px;
  283. font-size: 16px;
  284. font-weight: bold;
  285. margin: 24px 0 0 0;
  286. width: 376px;
  287. border-bottom: 1px solid #e6e5e4;
  288. padding-left: 8px;
  289. }
  290. .result-text {
  291. padding-left: 8px;
  292. span {
  293. &:first-child {
  294. display: inline-block;
  295. width: 111px;
  296. color: #666;
  297. }
  298. }
  299. &:first-of-type {
  300. margin: 15px 0 21px 0;
  301. }
  302. }
  303. > a {
  304. display: inline-block;
  305. width: 201px;
  306. height: 40px;
  307. line-height: 40px;
  308. text-align: center;
  309. border-radius: 3px;
  310. background: #5078cb;
  311. color: #fff;
  312. margin: 37px 0 16px 130px;
  313. }
  314. .result-remind {
  315. margin: 0 0 18px 146px;
  316. color: #666;
  317. }
  318. }
  319. .no-result-content {
  320. font-size: 16px;
  321. margin: 26px 0 38px 220px;
  322. text-align: left;
  323. span {
  324. color: #f00707;
  325. font-weight: normal;
  326. }
  327. }
  328. }
  329. }
  330. .not-open-store {
  331. > div {
  332. height: 171px;
  333. border: 1px solid #ff8522;
  334. .fl {
  335. list-style: inside;
  336. color: #ff8522;
  337. height: 130px;
  338. width: 391px;
  339. margin-top: 25px;
  340. border-right: 1px dashed #fce3cf;
  341. img {
  342. margin: 11px 0 0 16px;
  343. }
  344. ul {
  345. list-style: inside;
  346. color: #ff8522;
  347. float: right;
  348. margin: 19px 61px 0 0;
  349. li {
  350. margin-bottom: 20px;
  351. white-space: nowrap;
  352. &:nth-child(2) {
  353. margin-left: 10px;
  354. }
  355. &:nth-child(3) {
  356. margin-left: 29px;
  357. }
  358. }
  359. }
  360. }
  361. .fr {
  362. width: 504px;
  363. img {
  364. margin: 45px 0 0 62px;
  365. }
  366. div {
  367. float: right;
  368. margin-right: 140px;
  369. margin-top: 44px;
  370. text-align: center;
  371. p {
  372. margin-bottom: 29px;
  373. }
  374. a {
  375. display: inline-block;
  376. width: 124px;
  377. height: 32px;
  378. color: #fff;
  379. font-size: 16px;
  380. text-align: center;
  381. line-height: 32px;
  382. background: #ff8522;
  383. border-radius: 3px;
  384. cursor: pointer;
  385. }
  386. }
  387. }
  388. }
  389. }
  390. }
  391. .com-del-box {
  392. text-align: center;
  393. -webkit-box-shadow: none;
  394. -moz-box-shadow: none;
  395. box-shadow: none;
  396. border-radius: 3px;
  397. > p {
  398. margin-top: 20px;
  399. margin-bottom: 10px;
  400. color: #5078cb;
  401. img {
  402. position: relative;
  403. bottom: 2px;
  404. margin-right: 8px;
  405. }
  406. }
  407. .result {
  408. color: #333;
  409. margin-bottom: 24px;
  410. }
  411. .remind {
  412. font-size: 12px;
  413. color: #666;
  414. span {
  415. color: #f40d0d;
  416. }
  417. }
  418. }
  419. .apply-record {
  420. position: fixed;
  421. top: 23%;
  422. left: 31%;
  423. z-index: 10;
  424. width: 577px;
  425. height: 239px;
  426. background: #fff;
  427. .title {
  428. height: 40px;
  429. line-height: 40px;
  430. text-align: center;
  431. font-size: 16px;
  432. color: #333;
  433. img {
  434. float: right;
  435. margin: 10px 11px 0 0;
  436. cursor: pointer;
  437. }
  438. }
  439. }
  440. .record-wrap {
  441. padding: 0 18px;
  442. .record-title {
  443. height: 28px;
  444. line-height: 28px;
  445. background: #8eb0f5;
  446. border: 1px solid #e8e8e8;
  447. color: #fff;
  448. }
  449. ul {
  450. max-height: 150px;
  451. overflow-y: auto;
  452. overflow-x: hidden;
  453. li {
  454. border-bottom: 1px solid #e8e8e8;
  455. height: 30px;
  456. &:nth-child(even) {
  457. background: #edf2fd;
  458. }
  459. &:nth-child(odd) {
  460. background: #f7f9fe;
  461. }
  462. span {
  463. line-height: 26px;
  464. position: relative;
  465. top: 2px;
  466. &.green-text {
  467. color: #379b1d;
  468. }
  469. &.red-text {
  470. color: #f51c24;
  471. }
  472. }
  473. }
  474. }
  475. span {
  476. overflow: hidden;
  477. text-overflow: ellipsis;
  478. white-space: nowrap;
  479. display: inline-block;
  480. text-align: center;
  481. &:nth-child(1) {
  482. width: 220px;
  483. padding: 0 10px 0 22px;
  484. }
  485. &:nth-child(2) {
  486. width: 68px;
  487. }
  488. &:nth-child(3) {
  489. width: 165px;
  490. }
  491. &:nth-child(4) {
  492. width: 82px;
  493. }
  494. }
  495. }
  496. }
  497. </style>