AttendancelDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <template>
  2. <div class="reply" ref = "replyModal">
  3. <a-modal
  4. title="考勤明细"
  5. width="100%"
  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-select v-model="formState.orgName" show-search :filterOption="filterOption" allowClear>
  21. <a-select-option value="">所有</a-select-option>
  22. <a-select-option value="正织">正织</a-select-option>
  23. <a-select-option value="森语">森语</a-select-option>
  24. <a-select-option value="马菲羊">马菲羊</a-select-option>
  25. </a-select>
  26. </a-form-model-item>
  27. </a-col>
  28. <a-col :md="8" :sm="8">
  29. <a-form-model-item label="姓名" >
  30. <j-search-select-tag v-model="formState.name" placeholder="请选择用户名称"
  31. dict="sys_user,realname,realname" @search="searchName" allowClear/>
  32. </a-form-model-item>
  33. </a-col>
  34. <a-col :md="8" :sm="8">
  35. <a-form-model-item label="" >
  36. <a-button type="primary" icon="search" @click="searchSonList">查询</a-button>
  37. </a-form-model-item>
  38. </a-col>
  39. </a-row>
  40. </a-form-model>
  41. <a-table
  42. bordered
  43. :columns="columns"
  44. :data-source="dataSource"
  45. :loading="loading"
  46. :scroll="{x: 3000 ,y:400}"
  47. :pagination="false"
  48. >
  49. </a-table>
  50. </div>
  51. </a-modal>
  52. </div>
  53. </template>
  54. <script>
  55. import moment from 'moment'
  56. import pick from 'lodash.pick'
  57. import { FormTypes } from '@/utils/JEditableTableUtil'
  58. import { putAction,getAction } from '@/api/manage'
  59. import JEllipsis from '@/components/jeecg/JEllipsis'
  60. import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
  61. export default {
  62. name: 'AttendancelDetail',
  63. components: {
  64. moment,
  65. JEllipsis,
  66. JSearchSelectTag
  67. },
  68. data() {
  69. let ellipsis = (v, l) => <j-ellipsis value={v} length={l} />
  70. return {
  71. formState:{},
  72. dataSource: [{}],
  73. visible:false,
  74. loading:false,
  75. columns: [
  76. {
  77. title: '序号',
  78. align:"center",
  79. width:'2%',
  80. dataIndex: 'index',
  81. customRender:function (t, r, index) {
  82. return parseInt(index)+1;
  83. }
  84. },
  85. {
  86. title: '编号',
  87. align: "center",
  88. dataIndex: 'code',
  89. ellipsis: true,
  90. customRender: (t) => ellipsis(t,7),
  91. width:'3%'
  92. },
  93. {
  94. title: '姓名',
  95. align: "center",
  96. dataIndex: 'name',
  97. ellipsis: true,
  98. customRender: (t) => ellipsis(t,4),
  99. width:'3%'
  100. },
  101. {
  102. title: '组织',
  103. align: "center",
  104. dataIndex: 'orgName',
  105. ellipsis: true,
  106. width:'3%'
  107. },
  108. {
  109. title: '工资卡号',
  110. align: "center",
  111. dataIndex: 'cardNo',
  112. ellipsis: true,
  113. customRender: (t) => ellipsis(t,19),
  114. width:'6%'
  115. },
  116. {
  117. title: '单双休',
  118. align: "center",
  119. dataIndex: 'restMode',
  120. customRender: (t) => ellipsis(t,3),
  121. width:'2.5%'
  122. },
  123. {
  124. title: '工时/天',
  125. align: "center",
  126. dataIndex: 'workingHours',
  127. customRender: (t) => ellipsis(t,3),
  128. width:'2.5%'
  129. },
  130. {
  131. title: '出勤天数',
  132. align: "center",
  133. dataIndex: 'attendanceDays',
  134. customRender: (t) => ellipsis(t,3),
  135. width:'2.5%'
  136. },
  137. {
  138. title: '话费补贴',
  139. align: "center",
  140. dataIndex: 'phoneBill',
  141. customRender: (t) => ellipsis(t,3),
  142. width:'2.5%'
  143. },
  144. {
  145. title: '午餐补贴',
  146. align: "center",
  147. dataIndex: 'lunch',
  148. customRender: (t) => ellipsis(t,3),
  149. width:'2.5%'
  150. },
  151. {
  152. title: '住房补贴',
  153. align: "center",
  154. dataIndex: 'housingSubsidies',
  155. customRender: (t) => ellipsis(t,3),
  156. width:'3%'
  157. },
  158. {
  159. title: '交通补贴',
  160. align: "center",
  161. dataIndex: 'transportation',
  162. customRender: (t) => ellipsis(t,3),
  163. width:'2.5%'
  164. },
  165. {
  166. title: '全勤奖',
  167. align: "center",
  168. dataIndex: 'fullAttendance',
  169. customRender: (t) => ellipsis(t,3),
  170. width:'2.5%'
  171. },
  172. {
  173. title: '养老保险',
  174. align: "center",
  175. dataIndex: 'endowmentInsurance',
  176. customRender: (t) => ellipsis(t,3),
  177. width:'2.5%'
  178. },
  179. {
  180. title: '失业保险',
  181. align: "center",
  182. dataIndex: 'unemploymentInsurance',
  183. customRender: (t) => ellipsis(t,3),
  184. width:'2.5%'
  185. },
  186. {
  187. title: '医疗保险',
  188. align: "center",
  189. dataIndex: 'medicalInsurance',
  190. customRender: (t) => ellipsis(t,3),
  191. width:'2.5%'
  192. },
  193. {
  194. title: '公积金',
  195. align: "center",
  196. dataIndex: 'accumulationFund',
  197. customRender: (t) => ellipsis(t,4),
  198. width:'3%'
  199. },
  200. {
  201. title: '工资抵扣',
  202. align: "center",
  203. dataIndex: 'deduction',
  204. customRender: (t) => ellipsis(t,4),
  205. width:'3%'
  206. },
  207. {
  208. title: '迟到次数',
  209. align: "center",
  210. dataIndex: 'latenessTimes',
  211. customRender: (t) => ellipsis(t,3),
  212. width:'2.5%'
  213. },
  214. {
  215. title: '迟到扣费',
  216. align: "center",
  217. dataIndex: 'latenessCost',
  218. ellipsis: true,
  219. customRender: (t) => ellipsis(t,4),
  220. width:'3%'
  221. },
  222. {
  223. title: '事假时间(分)',
  224. align: "center",
  225. dataIndex: 'personalLeave',
  226. customRender: (t) => ellipsis(t,4),
  227. width:'3%'
  228. },
  229. {
  230. title: '病假时间(分)',
  231. align: "center",
  232. dataIndex: 'sickLeave',
  233. customRender: (t) => ellipsis(t,4),
  234. width:'3%'
  235. },
  236. {
  237. title: '婚假时间(分)',
  238. align: "center",
  239. dataIndex: 'marriageLeave',
  240. customRender: (t) => ellipsis(t,4),
  241. width:'3%'
  242. },
  243. {
  244. title: '丧假时间(分)',
  245. align: "center",
  246. dataIndex: 'funeralLeave',
  247. customRender: (t) => ellipsis(t,4),
  248. width:'3%'
  249. },
  250. {
  251. title: '年假时间(天)',
  252. align: "center",
  253. dataIndex: 'yearLeave',
  254. customRender: (t) => ellipsis(t,5),
  255. width:'3%'
  256. },
  257. {
  258. title: '加班时间(分)',
  259. align: "center",
  260. dataIndex: 'workOvertime',
  261. customRender: (t) => ellipsis(t,3),
  262. width:'3%'
  263. }
  264. ]
  265. }
  266. },
  267. created(){
  268. },
  269. watch: {
  270. },
  271. methods: {
  272. filterOption(input, option) {
  273. return (
  274. option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  275. )
  276. },
  277. handleCancel(){
  278. this.visible = false
  279. this.formState()
  280. },
  281. detail(id){
  282. this.formState = {}
  283. this.formState.id = id
  284. this.getTableList()
  285. },
  286. getTableList(){
  287. this.loading = true
  288. getAction('/salary/salaryAttendance/querySalaryAttendanceDetailByMainId',this.formState).then(res=>{
  289. this.loading = false
  290. if(res.success){
  291. this.dataSource =res.result
  292. }else{
  293. this.$message.error(res.message);
  294. }
  295. })
  296. },
  297. searchSonList(){
  298. this.getTableList()
  299. }
  300. }
  301. }
  302. </script>
  303. <style scoped lang="less">
  304. /deep/ .nresume .ant-input{
  305. height: 100px !important;
  306. }
  307. /deep/ .ant-select{
  308. width: 100%;
  309. }
  310. .form-table-heard:before {
  311. content: '*';
  312. color: red;
  313. }
  314. /deep/ .ant-calendar-picker{
  315. width: 113px !important;
  316. }
  317. </style>