| | |
| | | import request from "@/common/untils/request.js" |
| | | // 应发工资报表 |
| | | export function salaryReportForms(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/forms/salaryReportForms", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 考勤管理列表 |
| | | export function getAttendanceList(data) { |
| | |
| | | } |
| | | " |
| | | ></el-input-number> |
| | | |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-else-if="item.inputInteger" |
| | | label=" " |
| | | :prop="'tableData.' + scope.$index + '.' + item.prop" |
| | | :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]" |
| | | > |
| | | <el-input |
| | | v-model.number="scope.row[item.prop]" |
| | | maxlength="50" |
| | | size="mini" |
| | | :disabled="!isOperate" |
| | | :controls="false" |
| | | style="width: 100%; margin-right: 5px" |
| | | @change=" |
| | | (val) => { |
| | | commonInputChange(val, item.prop, scope.row, scope) |
| | | } |
| | | " |
| | | ></el-input> |
| | | </el-form-item> |
| | | <span v-else> |
| | | <template> |
| | |
| | | " |
| | | ></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-else-if="item.inputInteger" |
| | | label=" " |
| | | :prop="'tableData.' + scope.$index + '.' + item.prop" |
| | | :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]" |
| | | > |
| | | <el-input |
| | | v-model.number="scope.row[item.prop]" |
| | | maxlength="50" |
| | | size="mini" |
| | | :disabled="!isOperate" |
| | | :controls="false" |
| | | style="width: 100%; margin-right: 5px" |
| | | @change=" |
| | | (val) => { |
| | | commonInputChange(val, item.prop, scope.row, scope) |
| | | } |
| | | " |
| | | ></el-input> |
| | | </el-form-item> |
| | | <span v-else style="text-align: right">{{ scope.row[item.prop] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="入职时间:" prop="employmentTime"> |
| | | <el-date-picker v-model="form.employmentTime" style="width:100%;" type="date" placeholder="选择日期" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | shopList:[],//车间 |
| | | groupNumberList:[],//组别 |
| | | workTypeList:[], //工种 |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() > new Date().getTime(); |
| | | }, |
| | | }, |
| | | rules: { |
| | | id: [ |
| | | { |
| | |
| | | > |
| | | </el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="保底工资:" prop="guaranteedWages"> |
| | | <el-form-item label="保底工资:" prop="guaranteedWages" |
| | | :rules="[ |
| | | { |
| | | required:form.isGuaranteed?true: false, |
| | | message: '请输入', |
| | | trigger: 'blur', |
| | | }, |
| | | { |
| | | validator: this.validatorNum, |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | <el-input |
| | | v-model.number="form.guaranteedWages" |
| | | maxlength="20" |
| | |
| | | required: true, |
| | | message: "请输入", |
| | | trigger: ["blur", "change"], |
| | | }, |
| | | ], |
| | | guaranteedWages: [ |
| | | { |
| | | required: false, |
| | | message: "请输入", |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | | validator: this.validatorNum, |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let form = JSON.parse(JSON.stringify(this.form)); |
| | | form.guaranteedWages=form.guaranteedWages?form.guaranteedWages:0 |
| | | saveWorkTypeInfo(form).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import AttendanceStatisticsDetails from "@/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails" |
| | | import NewDate from "@/api/date"; |
| | | const { getCurrentMonth } = NewDate; |
| | | const { getPreviousMonth } = NewDate; |
| | | export default { |
| | | name: "attendanceStatistics", |
| | | props: { |
| | |
| | | }, |
| | | }, |
| | | object:{ |
| | | date:getCurrentMonth() |
| | | date:getPreviousMonth() |
| | | }, |
| | | editRow:{ |
| | | |
| | |
| | | <template> |
| | | <div class="container"> |
| | | <div class="filter-card"> |
| | | <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="请输入工人姓名/工号/车间名称" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick" >新增</el-button> |
| | | <!-- <el-button size="small" type="primary" @click="exportClick">导入</el-button> --> |
| | |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | {{scope.row.peopleYield!=0?scope.row.peopleYield:''}} |
| | | {{scope.row.peopleYield!=0?scope.row.peopleYield.toFixed(2):''}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | } |
| | | this.getPeopleYield(row) |
| | | row.oneYield=Number(string); |
| | | return string; |
| | | return string.toFixed(2); |
| | | }, |
| | | getPeopleYield(row){ |
| | | let string=0 |
| | |
| | | } |
| | | } |
| | | row['allYield'+val]=Number(string); |
| | | return string; |
| | | return string.toFixed(2); |
| | | }, |
| | | changeForm(form,val,data){ |
| | | if(val){ |
| | |
| | | return { |
| | | ...item, |
| | | number: item.finenessRegister.number, |
| | | name: item.finenessRegister.name, |
| | | name: item.finenessRegister.workshopName, |
| | | workshopGroup: item.finenessRegister.workshopGroup, |
| | | finishDate: item.finenessRegister.finishDate, |
| | | spec:item.finenessRegister.spec, |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | this.pagerOptions.totalCount = res.total |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | |
| | | :header-cell-style="{ background: '#f1f3f8',color: '#000009', 'font-size': '12px', 'font-family': 'PingFangSC' }" |
| | | border |
| | | > |
| | | <el-table-column label="车号" prop="ID" width="100"> |
| | | <el-table-column label="车号" prop="position" width="90"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="下差纤度" |
| | |
| | | { |
| | | label: "数量", |
| | | prop: "quantity", |
| | | inputNumber: true, |
| | | inputInteger: true, |
| | | isRequird: true, |
| | | }, // 重要级别 |
| | | { |
| | |
| | | .form-box-t { |
| | | width: 100%; |
| | | height: 60px; |
| | | overflow: hidden; |
| | | overflow-x: auto; |
| | | |
| | | .form-item { |
| | | width: calc(16% - 5px); |
| | | max-width: calc(16% - 5px); |
| | | min-width:210px; |
| | | margin-right: 10px; |
| | | float: left; |
| | | |
| | | &:nth-of-type(6n) { |
| | | margin-right: 0; |
| | | } |
| | | &:last-child{ |
| | | float:right; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | @searchClick="onFilterSearch" |
| | | > |
| | | <template slot="leftButton"> |
| | | <div class="margin_right_20px" style="width:200px;"> |
| | | <!-- <el-date-picker v-model="object.date" style="width:100%" |
| | | @change="onFilterSearch" |
| | | <div class="margin_right_20px" > |
| | | <el-date-picker v-model="object.date" |
| | | style="width:200px;" |
| | | class="margin_right_20px" |
| | | @change="onFilterSearch(object.date,'date')" |
| | | :clearable="false" type="month" placeholder="选择日期" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM"> |
| | | </el-date-picker> --> |
| | | </el-date-picker> |
| | | <el-button size="small" type="primary" @click="exportBtnClick">导出</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAttendanceStatistic } from "@/api/reportManage/report.js" |
| | | import { salaryReportForms } from "@/api/reportManage/report.js" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import NewDate from "@/api/date"; |
| | | const { getCurrentMonth } = NewDate; |
| | |
| | | tableColumn: [ |
| | | { label: "姓名", prop: "workerName", min: 120, default: true }, |
| | | { label: "人员id", prop: "workerId", min: 190,default: true}, |
| | | { label: "手机号", prop: "client_level" }, |
| | | { label: "手机号", prop: "phone" }, |
| | | { label: "工种", prop: "workType", min: 100, }, |
| | | { label: "备注", prop: "actualAttendanceDays", min: 110 }, |
| | | { label: "应发工资", prop: "issueSalary", min: 110 }, |
| | | { label: "备注", prop: "remark", min: 110 }, |
| | | ], |
| | | showCol: [ |
| | | "手机号", |
| | | "工种", |
| | | "应发工资", |
| | | "备注", |
| | | ] |
| | | } |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getAttendanceStatistic({ |
| | | await salaryReportForms({ |
| | | keyword: this.keyword, |
| | | month:this.object.date, |
| | | page: this.pagerOptions.currPage, |
| | |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | if (res.data && res.data.length > 0) { |
| | | let tableColumn1= [ |
| | | { label: "姓名", prop: "workerName", min: 120,default: true,fixed:'left' }, |
| | | { label: "人员ID", prop: "workerId", min: 120,default: true,fixed:'left'}, |
| | |
| | | { label: "备注", prop: "actualAttendanceDays", min: 110 }, |
| | | ] |
| | | let tableColumn2=[] |
| | | let headerList=res.data.list.length>0?res.data.list[0]:[] |
| | | if(headerList.details&&headerList.details.length>0){ |
| | | for(let i in headerList.details){ |
| | | let headerList=res.data.details?res.data.details:[] |
| | | if(headerList&&headerList.length>0){ |
| | | for(let i in headerList){ |
| | | tableColumn2.push({ |
| | | label:headerList.details[i].date+'', |
| | | prop:'headerDate'+headerList.details[i].date, |
| | | label:headerList[i].salaryType+'', |
| | | prop:'header&'+headerList[i].salaryType+'&'+headerList[i].salaryTypeId, |
| | | min:150, |
| | | default:true, |
| | | isEditTd:true, |
| | |
| | | let tableColumn=tableColumn1.concat(tableColumn2).concat(tableColumn3) |
| | | this.tableColumn=tableColumn; |
| | | this.setTable() |
| | | const list = res.data.list.map((item) => { |
| | | const list = res.data.map((item) => { |
| | | let headerItem={} |
| | | let details=item.details?item.details:[] |
| | | for(let i in details){ |
| | | headerItem['headerDate'+details[i].date]=details[i].status |
| | | headerItem['header&'+details[i].salaryType+'&'+details[i].salaryTypeId]=details[i].amount |
| | | } |
| | | return { |
| | | ...item, |
| | |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.keyword = searchText ?? "" |
| | | onFilterSearch(searchText,val) { |
| | | if(val!='date'){ |
| | | this.keyword = searchText ?? "" |
| | | } |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | |
| | | }, |
| | | watch: { |
| | | 'editConfig.visible'(newVal) { |
| | | 'editDiaConfig.visible'(newVal) { |
| | | if (newVal) { |
| | | this.$nextTick(()=>{ |
| | | this.$refs["ruleForm"].resetFields(); |
| | | // this.$nextTick(()=>{ |
| | | this.editConfig=this.editDiaConfig |
| | | }) |
| | | this.$refs["ruleForm"].resetFields(); |
| | | // }) |
| | | } |
| | | }, |
| | | }, |