BasicSalary.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="组织">
  9. <a-select v-model="queryParam.orgName">
  10. <a-select-option value="">所有</a-select-option>
  11. <a-select-option value="Apparel Group">Apparel Group</a-select-option>
  12. <a-select-option value="宁波森语">宁波森语</a-select-option>
  13. <a-select-option value="马菲羊">马菲羊</a-select-option>
  14. </a-select>
  15. </a-form-item>
  16. </a-col>
  17. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18. <a-form-item label="部门">
  19. <j-search-select-tag v-model="queryParam.sysOrgCode" placeholder="请选择部门"
  20. dict="sys_depart,depart_name,depart_name,org_type='3' or org_code='TBD' order by org_code"/>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  24. <a-form-item label="姓名">
  25. <a-input placeholder="请输入" v-model="queryParam.name" />
  26. </a-form-item>
  27. </a-col>
  28. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  29. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  30. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  31. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  32. </span>
  33. </a-col>
  34. </a-row>
  35. </a-form>
  36. </div>
  37. <!-- 操作按钮区域 -->
  38. <a-table
  39. ref="table"
  40. size="middle"
  41. bordered
  42. rowKey="userId"
  43. :columns="columns"
  44. :dataSource="dataSource"
  45. :pagination="ipagination"
  46. :scroll="{x: 1000}"
  47. :loading="loading"
  48. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  49. @change="handleTableChange">
  50. <span slot="basicSalary" slot-scope="text, record">
  51. <a>{{record.beforeAdjustment}}</a>
  52. <!-- <a >333333</a> -->
  53. </span>
  54. </a-table>
  55. </div>
  56. <!-- table区域-end -->
  57. <!-- 表单区域 -->
  58. <ChangeBasicSalary ref="ChangeBasicSalary" @ok="getTableList"></ChangeBasicSalary>
  59. </a-card>
  60. </template>
  61. <script>
  62. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  63. import { getAction } from '@/api/manage'
  64. import moment from 'moment'
  65. import ChangeBasicSalary from './modules/ChangeBasicSalary.vue'
  66. import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
  67. export default {
  68. name: "BasicSalary",
  69. mixins: [JeecgListMixin],
  70. components: {
  71. moment,
  72. ChangeBasicSalary,
  73. JSearchSelectTag
  74. },
  75. data () {
  76. return {
  77. description: '基本薪资',
  78. DateTime:[],
  79. selectedRowKeys:[],
  80. selectedRows:[],
  81. // 表头
  82. columns: [
  83. {
  84. title: '序号',
  85. width: 80,
  86. align:"center",
  87. dataIndex: 'index',
  88. customRender:function (t, r, index) {
  89. return parseInt(index)+1;
  90. }
  91. },
  92. {
  93. title: '编号',
  94. align:"center",
  95. dataIndex: 'code'
  96. },
  97. {
  98. title: '部门',
  99. align:"center",
  100. dataIndex: 'sysOrgCode'
  101. },
  102. {
  103. title: '姓名',
  104. align:"center",
  105. dataIndex: 'name'
  106. },
  107. {
  108. title: '组织',
  109. align:"center",
  110. dataIndex: 'orgName'
  111. },
  112. {
  113. title: '工资卡号',
  114. align:"center",
  115. dataIndex: 'cardNo'
  116. },
  117. {
  118. title: '基本薪资',
  119. align:"center",
  120. dataIndex: 'beforeAdjustment',
  121. scopedSlots: { customRender: 'basicSalary' } ,
  122. customCell: this.handleBasicSalary,
  123. },
  124. {
  125. title: '最后变更时间',
  126. align:"center",
  127. dataIndex: 'updateTime'
  128. },
  129. ],
  130. queryParam:{},
  131. dataSource:[{}],
  132. ipagination:{},
  133. // 请求参数
  134. // url: {
  135. // },
  136. }
  137. },
  138. computed: {},
  139. created () {
  140. this.getTableList()
  141. },
  142. methods: {
  143. getTableList(){
  144. getAction('/salary/salaryChangeRecord/querySalaryList',this.queryParam).then(res=>{
  145. if(res.success){
  146. this.dataSource =res.result.records
  147. this.ipagination = {
  148. total: res.result.total,
  149. current: res.result.current,
  150. pageSize: res.result.size
  151. }
  152. }else{
  153. this.$message.error(res.message);
  154. }
  155. })
  156. },
  157. handleBasicSalary(record){
  158. return {
  159. on: {
  160. dblclick: event => {
  161. this.$refs.ChangeBasicSalary.visible = true
  162. this.$refs.ChangeBasicSalary.getData(record)
  163. }
  164. }
  165. }
  166. },
  167. searchQuery(){
  168. this.queryParam.pageNo = 1
  169. this.getTableList()
  170. },
  171. searchReset(){
  172. this.queryParam={}
  173. this.getTableList()
  174. },
  175. onSelectChange(selectedRowKeys, selectionRows) {
  176. this.selectedRowKeys = selectedRowKeys;
  177. this.selectedRows = selectionRows;
  178. },
  179. handleTableChange(pagination, filters, sorter) {
  180. this.queryParam.pageNo = pagination.current
  181. this.queryParam.pageSize = pagination.pageSize
  182. this.getTableList()
  183. },
  184. }
  185. }
  186. </script>
  187. <style scoped>
  188. @import '~@assets/less/common.less'
  189. </style>