薪资页面修改及接口联调

dev-scheduling
jinna 1 month ago
parent 85e1658265
commit b5135bed4a
  1. 9
      src/api/performanceManagement/dataReporting.js
  2. 11
      src/api/performanceManagement/payrollComputation.js
  3. 4
      src/views/personnelEfficiencyManagement/performanceManagement/components/prefDetail.vue
  4. 49
      src/views/personnelEfficiencyManagement/performanceManagement/components/reportingPerf.vue
  5. 1
      src/views/personnelEfficiencyManagement/performanceManagement/dataReporting.vue
  6. 285
      src/views/personnelEfficiencyManagement/salaryManagement/payrollComputation.vue

@ -107,4 +107,13 @@ export function downloadBsEfficiencyTaskTemplate(params) {
params,
responseType: 'blob'
})
}
// 文件删除
export function removeFile(params) {
return request({
url: '/api/blade-resource/oss/endpoint/remove-file',
method: 'post',
params
})
}

@ -0,0 +1,11 @@
// 薪资计算
import request from '@/axios';
// 查询列表
export const getList = (params) =>{
return request({
url:'/api/blade-desk/bsSalaryCalculation/page',
method:'get',
params
})
}

@ -70,7 +70,7 @@ export default {
tip: false,
simplePage: true,
searchShow: true,
searchMenuSpan: 12,
searchMenuSpan: 18,
searchIcon: true,
searchIndex: 3,
tree: false,
@ -88,7 +88,7 @@ export default {
editBtnIcon: ' ',
viewBtnText: '详情',
labelWidth: 120,
searchLabelWidth: 120,
searchLabelWidth: "auto",
menu: false,
menuWidth: 100,
dialogWidth: 1200,

@ -12,6 +12,8 @@
:upload-after="uploadAfter"
:upload-before="uploadBefore"
:upload-preview="uploadPreview"
:upload-delete="uploadDelete"
:upload-error="uploadError"
>
<template #readExcel>
<el-button type="primary" @click="readExcel" v-if="!isDetail">
@ -43,6 +45,7 @@ import {
readExcelBsEfficiencyTask,
reportBsEfficiencyTask,
subReportBsEfficiencyTask,
removeFile
} from '@/api/performanceManagement/dataReporting';
export default {
@ -70,6 +73,7 @@ export default {
propsHttp: {
res: 'data',
},
disabled: false, // []
dataType: 'object',
accept: '.xls,.xlsx',
tip: '请上传 .xls,.xlsx 标准格式文件,文件最大5M',
@ -84,6 +88,7 @@ export default {
tableColumn: [],
attachId: null,
formData: null,
isUploading:false,
};
},
watch: {
@ -95,6 +100,15 @@ export default {
},
},
methods: {
// []
setUploadDisabled(disabled) {
const uploadColumn = this.excelOption.column.find(item => item.prop === 'excelFile');
console.log('uploadColumn', uploadColumn);
if (uploadColumn) {
// this.$set(uploadColumn, 'disabled', disabled);
uploadColumn.disabled = disabled
}
},
tableRowClassName({ row }) {
if (row.isSysUser == '0' || row.isSysUser == 0) {
return 'warning-row';
@ -112,17 +126,50 @@ export default {
},
uploadBefore(file, done, loading, column) {
console.log('1111111111111111111')
this.isUploading = true;
this.setUploadDisabled(true);
this.formData = file;
done(file);
},
uploadAfter(res, done, loading, column) {
// action
this.attachId = res.attachId;
this.isUploading = false;
this.setUploadDisabled(false);
done();
},
uploadPreview(file, column, done) {
return;
},
//
uploadError(error, column) {
this.isUploading = false;
this.setUploadDisabled(false);
this.$message.error(this.attachId ? '最多只能上传一个文件' : '上传失败');
},
// uploadExceed(limit, files, fileList, column){
// console.log('limit', limit);
// this.$message.error('');
// return
// },
uploadDelete(file, column){
console.log('file-------------',file)
// removeFile({
// fileName:file.name
// }).then(res =>{
// if(res.data.code === 200){
this.isRead = false
this.attachId = null
this.formData = null
this.excelForm = { excelFile: [] }
this.tableColumn = []
this.tableData = []
// }else{
// this.$message.error(res.data.msg || '')
// }
// })
},
readExcel() {
if (!this.attachId) {
this.$message.warning('请先上传文件');
@ -141,7 +188,7 @@ export default {
})
.catch(error => {
console.error('读取文件失败:', error);
this.$message.error('文件读取接口异常');
// this.$message.error('');
});
},
submitForm() {

@ -285,6 +285,7 @@ export default {
{ label: '审批通过', value: 4, type: 'success' }, // 绿 -
{ label: '审批不通过', value: 5, type: 'danger' }, // - /
{ label: '已超期', value: 6, type: 'danger' }, // - /
{label:"任务失败",value:7,type:"danger"}
],
},
{

@ -19,27 +19,51 @@
@on-load="onLoad"
>
<template #totalArea-search="{ disabled, size }">
<el-input
style="width: 130px; margin-right: 5px"
v-model="search.areaMin"
></el-input
>-<el-input
v-model="search.areaMax"
style="width: 130px; margin-left: 5px"
></el-input>
<div style="display: flex;">
<el-input-number :controls="false"
style="width: 48%; margin-right: 5px"
v-model="search.minTotalArea"
></el-input-number
>-<el-input-number :controls="false"
v-model="search.maxTotalArea"
style="width: 48%; margin-left: 5px"
></el-input-number>
</div>
</template>
<template #singleBatchNo-search="{ disabled, size }">
<el-input
style="width: 130px; margin-right: 5px"
v-model="search.quaMin"
></el-input
>-<el-input
v-model="search.quaMax"
style="width: 130px; margin-left: 5px"
></el-input>
<div style="display: flex;">
<el-input-number :controls="false"
style="width: 48%; margin-right: 5px"
v-model="search.minSingleBatchNo"
></el-input-number
>-<el-input-number :controls="false"
v-model="search.maxSingleBatchNo"
style="width: 48%; margin-left: 5px"
></el-input-number>
</div>
</template>
<template #ppsName-search="{ disabled, size}">
<jhSelect
:value="search.ppsName"
placeholder="请搜索选择"
api-url="/api/blade-desk/bsProcessSet/list"
echo-api="/api/blade-desk/bsProcessSet/list"
echoParamsKey="ids"
echo-method="get"
api-method="get"
list-key="records"
total-key="total"
label-key="name"
value-key="id"
search-key="name"
:debounce-time="500"
@change="changePpsName"
multiple
/>
</template>
<template #menu-left>
<template #menu-right>
<el-button type="primary">导出</el-button>
</template>
</avue-crud>
@ -47,7 +71,12 @@
</template>
<script>
import {getList} from "@/api/performanceManagement/payrollComputation"
import jhSelect from '@/components/jh-select/index.vue';
export default {
components: {
jhSelect,
},
data() {
return {
loading: false,
@ -89,7 +118,7 @@ export default {
editBtnIcon: " ",
viewBtnText: "详情",
labelWidth: 120,
searchLabelWidth: 120,
searchLabelWidth: "auto",
menu: false,
menuWidth: 220,
dialogWidth: 1200,
@ -112,9 +141,11 @@ export default {
column: [
{
label: "选择日期",
label: "镀后入库时间",
prop: "date",
type: "date",
format:"YYYY-MM-DD",
valueFormat:"YYYY-MM-DD",
search: true,
searchRange: true,
startPlaceholder: "开始时间",
@ -122,33 +153,35 @@ export default {
hide: true,
width: 200,
sortable: true,
searchOrder: 8,
overHidden: true,
rules: [
{
required: true,
message: "请输入选择日期",
message: "请输入镀后入库时间",
trigger: "blur",
},
],
searchRules: [
{
required: true,
message: "请输入选择日期",
message: "请输入镀后入库时间",
trigger: "blur",
},
],
},
{
label: "订单号",
label: "车间订单号",
prop: "woCode",
search: false,
width: 200,
search: true,
width: 160,
searchOrder: 7,
sortable: true,
overHidden: true,
rules: [
{
required: true,
message: "请输入订单号",
message: "请输入车间订单号",
trigger: "blur",
},
],
@ -172,7 +205,7 @@ export default {
label: "零件名称",
prop: "partName",
search: false,
width: 200,
width: 160,
sortable: true,
overHidden: true,
rules: [
@ -183,11 +216,18 @@ export default {
},
],
},
{
label: "流程卡号",
search:true,
prop: "cardNo",
searchOrder: 6,
hide:true,
},
{
label: "批次号",
prop: "batchNo",
search: false,
width: 200,
width: 160,
sortable: true,
overHidden: true,
rules: [
@ -202,7 +242,7 @@ export default {
label: "使用部门",
prop: "useDept",
search: false,
width: 200,
width: 150,
sortable: true,
overHidden: true,
rules: [
@ -216,8 +256,8 @@ export default {
{
label: "产品型号",
prop: "productType",
search: true,
width: 200,
search: false,
width: 150,
sortable: true,
overHidden: true,
rules: [
@ -232,7 +272,8 @@ export default {
label: "镀种",
prop: "plate",
search: true,
width: 200,
width: 120,
searchIndex:2,
sortable: true,
overHidden: true,
rules: [
@ -245,10 +286,12 @@ export default {
},
{
label: "作业中心",
prop: "wcIds",
prop: "wcId",
type: "select",
search: true,
width: 200,
width: 160,
hide:true,
searchOrder: 5,
sortable: true,
overHidden: true,
rules: [
@ -258,16 +301,27 @@ export default {
trigger: "blur",
},
],
dicData: [
{ label: "化学镀镍作业中心", value: "001" },
{ label: "镀后库作业中心", value: "002" },
],
filterable:true,
multiple: true,
dicUrl:"/api/blade-desk/BA/WorkCenter/listForSelect",
props:{
label:"wcName",
value:"id"
}
},
{
label: "作业中心",
prop: "wcName",
width: 160,
sortable: true,
overHidden: true,
search:false,
},
{
label: "班组",
prop: "team",
search: false,
width: 200,
width: 160,
sortable: true,
overHidden: true,
rules: [
@ -283,9 +337,10 @@ export default {
prop: "ppsName",
type: "select",
search: true,
width: 200,
width: 160,
sortable: true,
overHidden: true,
searchOrder: 4,
rules: [
{
required: true,
@ -293,11 +348,19 @@ export default {
trigger: "blur",
},
],
dicData: [
{ label: "上挂", value: "001" },
{ label: "镀前自检", value: "002" },
{ label: "上挂", value: "003" },
],
// multiple:true,
// remote:true,
// dicUrl:"/api/blade-desk/bsProcessSet/list?current=1&size=100&name={{key}}",
// props:{
// label: "name",
// value: "id",
// res: "data.records",
// }
// dicData: [
// { label: "", value: "001" },
// { label: "", value: "002" },
// { label: "", value: "003" },
// ],
},
// {
// label: "",
@ -324,7 +387,7 @@ export default {
label: "定额工时",
prop: "hourQuota",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -339,7 +402,7 @@ export default {
label: "准备工时",
prop: "hourPrepar",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -354,7 +417,7 @@ export default {
label: "工时额订单位",
prop: "hqUnit",
search: false,
width: 200,
width: 130,
sortable: true,
overHidden: true,
rules: [
@ -369,7 +432,7 @@ export default {
label: "报工数",
prop: "workQty",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -384,7 +447,7 @@ export default {
label: "总工时",
prop: "hourTotal",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -399,7 +462,7 @@ export default {
label: "责任人",
prop: "worker",
search: false,
width: 200,
width: 100,
sortable: true,
overHidden: true,
rules: [
@ -414,7 +477,7 @@ export default {
label: "厚度",
prop: "plateThickness",
search: false,
width: 200,
width: 100,
sortable: true,
overHidden: true,
rules: [
@ -425,28 +488,37 @@ export default {
},
],
},
{
label: "产品系列",
prop: "productType",
search: false,
width: 200,
sortable: true,
overHidden: true,
rules: [
{
required: true,
message: "请输入产品系列",
trigger: "blur",
},
],
},
// {
// label: "",
// prop: "productType",
// search: false,
// width: 200,
// sortable: true,
// overHidden: true,
// rules: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
// },
{
label: "生产标识",
prop: "prodIdent",
type: "select",
search: true,
width: 200,
width: 100,
sortable: true,
overHidden: true,
searchOrder: 3,
dicUrl:"/api/blade-scheduling/qualityGrade/getGrades",
props:{
label:"qualityGrade",
value:"id"
},
filterable: true,
multiple: true,
rules: [
{
required: true,
@ -459,8 +531,9 @@ export default {
label: "单批数量",
prop: "singleBatchNo",
search: true,
width: 200,
width: 120,
sortable: true,
searchOrder: 1,
overHidden: true,
rules: [
{
@ -474,7 +547,7 @@ export default {
label: "入库数量",
prop: "putQuantity",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -489,7 +562,7 @@ export default {
label: "报废数量",
prop: "scrapQty",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -504,7 +577,7 @@ export default {
label: "消耗数量",
prop: "lossQty",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -519,7 +592,7 @@ export default {
label: "试验数量",
prop: "testQty",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -534,7 +607,7 @@ export default {
label: "单件面积(dm²)",
prop: "poArea",
search: false,
width: 200,
width: 150,
sortable: true,
overHidden: true,
rules: [
@ -549,7 +622,8 @@ export default {
label: "总面积(dm²)",
prop: "totalArea",
search: true,
width: 200,
width: 150,
searchOrder: 0,
sortable: true,
overHidden: true,
rules: [
@ -564,7 +638,7 @@ export default {
label: "镀后入库时间",
prop: "putStoreTime",
search: false,
width: 200,
width: 150,
sortable: true,
overHidden: true,
rules: [
@ -577,9 +651,9 @@ export default {
},
{
label: "基础金额",
prop: "basicMoney",
prop: "baseAmount",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -592,9 +666,9 @@ export default {
},
{
label: "补贴金额",
prop: "subsidyMoney",
prop: "subsidyAmount",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -607,9 +681,9 @@ export default {
},
{
label: "总金额",
prop: "totalMoney",
prop: "totalAmount",
search: false,
width: 200,
width: 120,
sortable: true,
overHidden: true,
rules: [
@ -626,6 +700,13 @@ export default {
},
mounted() {},
methods: {
//
changePpsName(val, item) {
console.log("val", val)
console.log("item", item)
this.search.ppsName = val
// this.formModel.teacherName = item.realName;
},
selectionChange(val) {
this.selectionList = val;
},
@ -660,8 +741,46 @@ export default {
this.$refs.crud.toggleSelection();
},
onLoad() {
this.data = [];
this.page = this.data.total;
console.log('quwey==============',this.query)
console.log('search==============',this.search)
let params = {
...this.query,
startDate:this.query.date && this.query.date.length != 0 && this.query.date[0],
endDate:this.query.date && this.query.date.length != 0 && this.query.date[1],
wcIds:this.query.wcId && this.query.wcId.length != 0 && this.query.wcId.join(','),
prodIdents:this.query.prodIdent && this.query.prodIdent.length != 0 && this.query.prodIdent.join(','),
ppsIds:this.search.ppsName && this.search.ppsName.length != 0 ? this.search.ppsName.join(',') : undefined,
minTotalArea:this.search.minTotalArea && this.search.minTotalArea,
maxTotalArea:this.search.maxTotalArea && this.search.maxTotalArea,
minSingleBatchNo:this.search.minSingleBatchNo && this.search.minSingleBatchNo,
maxSingleBatchNo:this.search.maxSingleBatchNo && this.search.maxSingleBatchNo,
}
if(params.date) delete params.date
if(params.wcId) delete params.wcId
if(params.prodIdent) delete params.prodIdent
if(params.ppsName) delete params.ppsName
if(params.minTotalArea && params.maxTotalArea && params.minTotalArea > params.maxTotalArea){
this.$message.error('最小面积不能大于最大面积')
return
}
if(params.minSingleBatchNo && params.maxSingleBatchNo && params.minSingleBatchNo > params.maxSingleBatchNo){
this.$message.error('最小单批数量不能大于最大单批数量')
return
}
console.log('params===========',params)
if( !params.startDate || !params.endDate){
return
}
getList({
current:this.page.currentPage,
size:this.page.pageSize,
...params
}).then(res =>{
// console.log('re')
this.data = res.data.data.records
this.page.total = res.data.data.total
})
},
},
};

Loading…
Cancel
Save