service.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <div class="service">
  3. <div class="container">
  4. <div class="top clearfix">
  5. <div class="title">
  6. <p>Platform service</p>
  7. <h2>平台服务</h2>
  8. </div>
  9. </div>
  10. <ul class="content clearfix list-unstyled">
  11. <li v-for="(data, index) in serviceData" >
  12. <div>
  13. <img :src="data.imgUrl">
  14. </div>
  15. <div>
  16. <h2>{{data.chinaName}}</h2>
  17. <p>{{data.englishName}}</p>
  18. </div>
  19. </li>
  20. </ul>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import Page from '~components/common/page/pageComponent.vue'
  26. export default {
  27. name: 'PlatformService',
  28. data () {
  29. return {
  30. serviceData: [{
  31. imgUrl: '/images/btbBusiness/customer0.png',
  32. englishName: 'customer service',
  33. chinaName: '客户服务'
  34. }, {
  35. imgUrl: '/images/btbBusiness/procurement0.png',
  36. englishName: 'Procurement management',
  37. chinaName: '采购管理'
  38. }, {
  39. imgUrl: '/images/btbBusiness/sales0.png',
  40. englishName: 'Sales management',
  41. chinaName: '销售管理'
  42. }, {
  43. imgUrl: '/images/btbBusiness/subcontract0.png',
  44. englishName: 'subcontract',
  45. chinaName: '委外加工'
  46. }, {
  47. imgUrl: '/images/btbBusiness/quality0.png',
  48. englishName: 'Quality Control',
  49. chinaName: '品质管理'
  50. }, {
  51. imgUrl: '/images/btbBusiness/financial0.png',
  52. englishName: 'Financial docking',
  53. chinaName: '财务对接'
  54. }]
  55. }
  56. },
  57. components: {
  58. Page
  59. },
  60. computed: {
  61. isInFrame () {
  62. if (this.$route.query.type === 'erp') {
  63. return true
  64. }
  65. },
  66. list () {
  67. return this.$store.state.supplier.merchant.merchant.data
  68. },
  69. all () {
  70. let count = this.$store.state.supplier.merchant.merchantAll.data
  71. let supplierCount = count.content ? count.totalElements + '' : '00000'
  72. return this.formatNumber(supplierCount, 5)
  73. }
  74. },
  75. methods: {
  76. // 供应商数字格式转换
  77. formatNumber (num, key) {
  78. let count = ('00000' + num).substr(-key)
  79. let _arr = []
  80. for (var i = 0; i < count.length; i++) {
  81. _arr.push(count[i])
  82. }
  83. return _arr
  84. },
  85. addResource (id) {
  86. if (this.isInFrame) {
  87. this.$http.get(`/basic/enterprise /${id}/info`)
  88. .then(res => {
  89. if (res.data) {
  90. window.open(this.$route.query.localPath + this.$route.query.erpPath + '?b2bdata=' + encodeURIComponent(JSON.stringify(res.data)))
  91. }
  92. })
  93. .catch(err => {
  94. console.log(err)
  95. })
  96. } else {
  97. this.isVaildSupplier(id)
  98. }
  99. },
  100. jumpResource (id) {
  101. if (!this.hasJump) {
  102. this.isVaildSupplier(id)
  103. }
  104. },
  105. // 判断是否有有效物料信息
  106. isVaildSupplier (id) {
  107. this.$http.get('vendor/introduction/product/count', {params: {vendUU: id}})
  108. .then(res => {
  109. if (res.data.count !== 0) {
  110. this.$router.push('supplier/' + id)
  111. } else {
  112. this.hasDialog = true
  113. }
  114. }, err => {
  115. console.log(err)
  116. })
  117. },
  118. goodsSearch (type) {
  119. this.pageParams.page = 1
  120. this.$store.dispatch('supplier/loadVendorList', {page: this.pageParams.page, size: this.pageParams.count, keyword: type})
  121. },
  122. handleCurrentChange (type) {
  123. this.pageParams.page = type
  124. this.$store.dispatch('supplier/loadVendorList', {page: type, size: this.pageParams.count, keyword: this.searchCode})
  125. }
  126. }
  127. }
  128. </script>
  129. <style type="text/scss" lang="scss">
  130. .service{
  131. height: 450px;
  132. .container{
  133. width: 1190px;
  134. margin: 0 auto;
  135. .top{
  136. padding-top:30px;
  137. margin-bottom:50px;
  138. .title{
  139. margin: 0 auto;
  140. text-align: center;
  141. width:215px;
  142. border-bottom:1px solid #ff7070;
  143. p{
  144. margin:0;
  145. font-family: FZLTXHK;
  146. font-size: 14px;
  147. color: #666;
  148. }
  149. h2{
  150. font-size: 32px;
  151. margin:0;
  152. line-height: 46px;
  153. color: #333;
  154. }
  155. &::before{
  156. content: '';
  157. display:block;
  158. position:relative;
  159. left:55px;
  160. top:61px;
  161. width:105px;
  162. height:1px;
  163. background: #00caff;
  164. }
  165. &::after{
  166. content: '';
  167. display:block;
  168. position:relative;
  169. left:55px;
  170. top:4px;
  171. width:105px;
  172. height:1px;
  173. background: #4391f7;
  174. }
  175. }
  176. }
  177. .content{
  178. width: 1096px;
  179. margin: 0 auto;
  180. li{
  181. float: left;
  182. width: 225px;
  183. margin: 0px 170px 0px 2px;
  184. &:nth-child(2), &:nth-child(5) {
  185. width: 295px;
  186. }
  187. &:nth-child(3), &:nth-child(6) {
  188. margin-right: 0;
  189. }
  190. &:nth-child(4), &:nth-child(5), &:nth-child(6) {
  191. margin-top: 82px;
  192. }
  193. div{
  194. float: left;
  195. h2{
  196. margin: 0;
  197. position: relative;
  198. top: 10px;
  199. left: 20px;
  200. color: #666;
  201. font-size: 20px;
  202. }
  203. p{
  204. margin: 0px;
  205. position: relative;
  206. top: 12px;
  207. left: 20px;
  208. font-size: 10px;
  209. }
  210. }
  211. }
  212. }
  213. }
  214. }
  215. </style>