contract.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <div>
  3. <el-dialog title="请选择合同模板" :visible.sync="Show" width="80%">
  4. <div class="align-items-center mb-20">
  5. <el-input
  6. class="input-w-200 mr-10"
  7. placeholder="请输入查询关键词"
  8. prefix-icon="el-icon-search"
  9. v-model="fromData.search">
  10. </el-input>
  11. <el-button type="primary" icon="el-icon-search" @click="searchFun()">查询</el-button>
  12. </div>
  13. <el-table class="mb-20" :data="list" stripe>
  14. <el-table-column property="id" label="ID" width="150"></el-table-column>
  15. <el-table-column property="name" label="合同模板名称" width=""></el-table-column>
  16. <el-table-column property="sign_party" label="合同签署区信息" width="">
  17. <template slot-scope="scope">
  18. <div class="fs-16" v-for="(item,i) in scope.row.sign_party" :key="i">{{item}},</div>
  19. </template>
  20. </el-table-column>
  21. <el-table-column property="texts" label="合同可替换信息" width="">
  22. <template slot-scope="scope">
  23. <div class="fs-16" v-for="(item,i) in scope.row.texts" :key="i">{{item}},</div>
  24. </template>
  25. </el-table-column>
  26. <el-table-column fixed='right' prop="" label="选择">
  27. <template slot-scope="scope">
  28. <el-button type="primary" @click="select(scope.row)">选择</el-button>
  29. </template>
  30. </el-table-column>
  31. </el-table>
  32. <div class="mb-30 flex-justify-end">
  33. <el-pagination
  34. background
  35. @current-change="handleCurrentChange"
  36. :current-page.sync="fromData.page"
  37. :page-size="10"
  38. layout="prev, pager, next"
  39. :total="total">
  40. </el-pagination>
  41. </div>
  42. </el-dialog>
  43. </div>
  44. </template>
  45. <script>
  46. import {signContract} from '@/api/signContract.js'
  47. export default {
  48. name:"Contract-list",
  49. data(){
  50. return{
  51. list:[],
  52. Show:false,
  53. fromData:{
  54. search:'',
  55. page:1,
  56. },
  57. total:0,
  58. }
  59. },
  60. methods:{
  61. getList(){
  62. signContract(this.fromData).then((res)=>{
  63. if(res.code == 1){
  64. this.Show = true;
  65. this.list = res.data.items;
  66. }else{
  67. this.Show = false;
  68. this.$message.error(res.msg);
  69. }
  70. })
  71. },
  72. handleCurrentChange(val){
  73. this.fromData.page = val;
  74. this.getList();
  75. },
  76. searchFun(){
  77. this.fromData.page = 1;
  78. this.getList();
  79. },
  80. select(item){
  81. this.$emit('setInfo',item)
  82. this.$message.success('选择成功');
  83. this.Show = false;
  84. },
  85. },
  86. }
  87. </script>
  88. <style scoped lang="scss">
  89. </style>