QuotaRequisition.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <div>
  3. <Toptitle title="定额领料单"></Toptitle>
  4. <div style="height:85%;overflow:auto">
  5. <Form :label-width='80' style="display:flex;margin-top:15px">
  6. <FormItem label='项目编码' style="width:300px">
  7. <Select v-model="searchData.order_no" filterable multiple>
  8. <Option v-for="(item,index) in order" :key="index" :value="item" :label="item"/>
  9. </Select>
  10. </FormItem>
  11. <FormItem label='项目名称' style="width:300px">
  12. <Select v-model="searchData.residential_name" filterable multiple>
  13. <Option v-for="(item,index) in residential_name" :key="index" :value="item" :label="item"/>
  14. </Select>
  15. </FormItem>
  16. <FormItem label='项目简称' style="width:300px">
  17. <Select v-model="searchData.abbreviation" filterable multiple>
  18. <Option v-for="(item,index) in abbreviation" :key="index" :value="item" :label="item"/>
  19. </Select>
  20. </FormItem>
  21. <FormItem>
  22. <Button type="primary" @click="initData(searchData)">搜索</Button>
  23. </FormItem>
  24. </Form>
  25. <Table :data='tableData' :columns='tableColumns' border>
  26. <template slot="set" slot-scope="{row}">
  27. <a @click="goPageDetail(row)">详情</a>
  28. </template>
  29. </Table>
  30. </div>
  31. <div style="text-align:center">
  32. <Page :page-size-opts="[10, 20, 30, 40,100]"
  33. @on-page-size-change='changeSize'
  34. @on-change='changePage'
  35. :current='pageIndex'
  36. show-total
  37. :total="total"
  38. show-sizer
  39. :page-size='pageSize' />
  40. </div>
  41. </div>
  42. </template>
  43. <script>
  44. export default {
  45. data(){
  46. return{
  47. abbreviation:[],
  48. order:[],
  49. residential_name:[],
  50. proxyData:{},
  51. pageSize:10,
  52. pageIndex:1,
  53. total:0,
  54. tableData:[],
  55. tableColumns:[
  56. {title:'项目编码',align:'center',key:'order_no'},
  57. {title:'项目名称',align:'center',key:'residential_name'},
  58. {title:'项目简称',align:'center',key:'abbreviation'},
  59. {title:'操作',align:'center',key:'',slot:'set'}
  60. ],
  61. searchData:{
  62. order_no:'',
  63. residential_name:'',
  64. abbreviation:''
  65. }
  66. }
  67. },
  68. mounted(){
  69. this.initData();
  70. },
  71. methods:{
  72. changeSize(e){
  73. this.pageIndex = 1;
  74. this.pageSize = e;
  75. this.initData(this.proxyData)
  76. },
  77. changePage(e){
  78. this.pageIndex = e;
  79. this.initData(this.proxyData)
  80. },
  81. goPageDetail(row){
  82. this.$router.push({path:'/cms/BidSystem/QuotaRequisitionDetail',query:{order_no:row.order_no}});
  83. },
  84. initData(row){
  85. this.proxyData = row;
  86. this.axios.post('/api/finance_quota_list',{page_index:this.pageIndex,page_size:this.pageSize,...row}).then(res=>{
  87. this.tableData = res.data.data;
  88. this.total = res.data.total;
  89. this.abbreviation = res.data.abbreviation;
  90. this.order = res.data.order;
  91. this.residential_name = res.data.residential_name;
  92. })
  93. }
  94. }
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. </style>