AnnualLeave.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <div class="reply" ref = "replyModal">
  3. <a-modal
  4. title="年休明细"
  5. width="85%"
  6. :visible="visible"
  7. :confirmLoading="loading"
  8. :getContainer ='()=>$refs.replyModal'
  9. @cancel="handleCancel"
  10. destroyOnClose
  11. >
  12. <template #footer>
  13. <a-button @click="handleCancel" style="margin-left: 8px;">取消</a-button>
  14. </template>
  15. <div class="table-page-search-wrapper">
  16. <a-form-model layout="inline" ref="form" :model="formState" >
  17. <a-row :gutter="24">
  18. <a-col :md="8" :sm="8">
  19. <a-form-model-item label="组织" prop="name">
  20. <a-input v-model="formState.orgName" />
  21. </a-form-model-item>
  22. </a-col>
  23. <a-col :md="8" :sm="8">
  24. <a-form-model-item label="姓名" >
  25. <a-input placeholder="请输入" v-model="formState.name" />
  26. </a-form-model-item>
  27. </a-col>
  28. <a-col :md="8" :sm="8">
  29. <a-form-model-item label="" >
  30. <a-button type="primary" icon="search" @click="searchSonList">查询</a-button>
  31. </a-form-model-item>
  32. </a-col>
  33. </a-row>
  34. </a-form-model>
  35. <a-table
  36. bordered
  37. :columns="columns"
  38. :data-source="dataSource"
  39. :loading="loading"
  40. :scroll="{x: 1200 ,y:300}"
  41. :pagination="false"
  42. >
  43. </a-table>
  44. </div>
  45. </a-modal>
  46. </div>
  47. </template>
  48. <script>
  49. import moment from 'moment'
  50. import pick from 'lodash.pick'
  51. import { FormTypes } from '@/utils/JEditableTableUtil'
  52. import { putAction,getAction } from '@/api/manage'
  53. export default {
  54. name: 'AnnualLeave',
  55. components: {
  56. moment,
  57. },
  58. data() {
  59. return {
  60. formState:{},
  61. dataSource: [],
  62. visible:false,
  63. loading:false,
  64. columns: [
  65. {
  66. title: '编号',
  67. align: "center",
  68. dataIndex: 'code',
  69. ellipsis: true,
  70. width:'14%'
  71. },
  72. {
  73. title: '姓名',
  74. align: "center",
  75. dataIndex: 'name',
  76. ellipsis: true,
  77. width:'14%'
  78. },
  79. {
  80. title: '组织',
  81. align: "center",
  82. dataIndex: 'orgName',
  83. ellipsis: true,
  84. width:'14%'
  85. },
  86. {
  87. title: '工资卡号',
  88. align: "center",
  89. dataIndex: 'cardNo',
  90. ellipsis: true,
  91. width:'15%',
  92. },
  93. {
  94. title: '年假天数',
  95. align: "center",
  96. dataIndex: 'annualLeave',
  97. ellipsis: true,
  98. width:'14%'
  99. },
  100. {
  101. title: '已请天数',
  102. align: "center",
  103. dataIndex: 'used',
  104. ellipsis: true,
  105. width:'14%'
  106. },
  107. {
  108. title: '剩余天数',
  109. align: "center",
  110. dataIndex: 'surplus',
  111. ellipsis: true,
  112. width:'14%'
  113. },
  114. ]
  115. }
  116. },
  117. created(){
  118. },
  119. watch: {
  120. },
  121. methods: {
  122. handleCancel(){
  123. this.visible = false
  124. this.formState = {}
  125. this.dataSource = []
  126. },
  127. detail(id){
  128. this.formState = {}
  129. this.formState.id = id
  130. this.getTableList()
  131. },
  132. getTableList(){
  133. this.loading = true
  134. getAction('/salary/salaryAttendance/querySalaryAttendanceHolidayByMainId',this.formState).then(res=>{
  135. this.loading = false
  136. if(res.success){
  137. this.dataSource =res.result
  138. }else{
  139. this.$message.error(res.message);
  140. }
  141. })
  142. },
  143. searchSonList(){
  144. this.getTableList()
  145. }
  146. }
  147. }
  148. </script>
  149. <style scoped lang="less">
  150. /deep/ .nresume .ant-input{
  151. height: 100px !important;
  152. }
  153. /deep/ .ant-select{
  154. width: 100%;
  155. }
  156. .form-table-heard:before {
  157. content: '*';
  158. color: red;
  159. }
  160. /deep/ .ant-calendar-picker{
  161. width: 113px !important;
  162. }
  163. </style>