searchCustoms.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <div>
  3. <div class="headline">
  4. <span>关务汇总单</span>
  5. <div class="search_time">
  6. <el-input style="width:400px" placeholder="请输入品牌/型号/商品名称进行查询" v-model="key" @keyup.native.enter='searchSheet'>
  7. <el-button slot="append" @click.native="searchSheet">搜索</el-button>
  8. </el-input>
  9. </div>
  10. </div>
  11. <ctable :data="tableData"
  12. :headArr="headArr"
  13. :StyleWidth="StyleWidth"
  14. :controlArray="controlArray"
  15. :totalElements="totalElements"
  16. @handleCurrentChange="handleCurrentChange"
  17. :currentPage="currentPage"
  18. >
  19. </ctable>
  20. </div>
  21. </template>
  22. <script>
  23. import { Ctable } from '@/components/base/table'
  24. import { CtableClass } from '@/utils/CtableClass'
  25. export default {
  26. name: 'SearchSever',
  27. data () {
  28. return {
  29. key: '',
  30. currentPage: 1,
  31. count: 10
  32. }
  33. },
  34. computed: {
  35. headArr() {
  36. return ['序号', '单号', '时间', '来源单号', '操作']
  37. },
  38. StyleWidth() {
  39. return [70, 210, 280, 340, 264]
  40. },
  41. controlArray() {
  42. return [
  43. ['报关单', '/facilitator/customerHouseServiceSheet/down?id='],
  44. ['合同', 'http://print.ubtob.com/report/print?userName=CUSTOMS&profile=test&reportName=CONTRACT&whereCondition=where id='],
  45. ['发票', 'http://print.ubtob.com/report/print?userName=CUSTOMS&profile=test&reportName=INVOICE&whereCondition=where id=']
  46. ]
  47. },
  48. sheetList () {
  49. return this.$store.state.customerHouse.list.data.content
  50. },
  51. totalElements() {
  52. return this.$store.state.customerHouse.list.data.content.totalElements
  53. },
  54. tableData() {
  55. return CtableClass(this.sheetList.content, ['序号', 'sheetNoSuffix', ['时间戳', 'createTime'], 'sourceSheet', ['报关单', 'id']])
  56. },
  57. },
  58. methods: {
  59. // 分页调整数据
  60. handleCurrentChange (page) {
  61. this.currentPage = page
  62. this.$store.dispatch('loadCustomsInfo', {count: this.count, page: this.currentPage, keyword: this.key})
  63. },
  64. // 数据详情跳转
  65. detailsInfo (type) {
  66. this.$router.push('/severPage/elements/' + type.id)
  67. },
  68. // 搜索内容
  69. searchSheet () {
  70. this.handleCurrentChange(1)
  71. }
  72. },
  73. components: {
  74. Ctable
  75. }
  76. }
  77. </script>
  78. <style type="text/scss" lang="scss">
  79. .search-history{
  80. .search{
  81. margin-bottom:50px;
  82. position:relative;
  83. .el-input{
  84. max-width:50%;
  85. }
  86. .add{
  87. position:absolute;
  88. right:60px;
  89. }
  90. }
  91. }
  92. .block {
  93. padding-top:20px;
  94. text-align: right;
  95. }
  96. .dialog{
  97. .el-input{
  98. width:100%;
  99. }
  100. }
  101. .el-pagination {
  102. .el-pagination__jump .el-input{
  103. width: 60px !important;
  104. }
  105. }
  106. .el-input{
  107. .el-input-group__append{
  108. width:100px;
  109. color:#fff;
  110. background: #1890ff;
  111. text-align: center;
  112. }
  113. }
  114. .el-table{
  115. thead{
  116. color:#686c75;
  117. font-weight: bold;
  118. th{
  119. background: #f6f6f6;
  120. }
  121. }
  122. }
  123. </style>