计件工资修改

yangwl
Yangwl 4 months ago
parent 4c4c84dbe1
commit 139fabc286

@ -8,11 +8,18 @@ export function listUnitPriceReport(query) {
params: query params: query
}); });
} }
// export function getReport(id) {
// return request({
// url: '/mes/unitPriceReport/' + id,
// method: 'get'
// });
// }
// 查询【计件工资】详细
export function getReport(id) { export function getReport(id) {
return request({ return request({
url: '/mes/unitPriceReport/' + id, url: '/mes/unitPriceReport/' + id,
method: 'get' method: 'get'
}); });
} }
// 修改计件工资统计 // 修改计件工资统计
export function updateUnitPriceReport(data) { export function updateUnitPriceReport(data) {

@ -50,7 +50,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="工单生产日期" label-width="100px">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
style="width: 240px" style="width: 240px"
@ -69,6 +69,28 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['unitPriceReport:report:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['unitPriceReport:report:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain plain
@ -81,57 +103,47 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="unitPriceList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="unitPriceList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />--> <el-table-column type="selection" width="55" align="center"/>
<el-table-column fixed="left" label="工单号" align="center" width="180" prop="workorderCode" /> <el-table-column fixed="left" label="工单号" align="center" width="180" prop="workorderCode" />
<el-table-column fixed="left" label="工单生产日期" width="110" align="center" prop="workOrderProductDate" />
<el-table-column fixed="left" label="SAP订单号" align="center" width="120" prop="workorderCodeSap" /> <el-table-column fixed="left" label="SAP订单号" align="center" width="120" prop="workorderCodeSap" />
<el-table-column label="物料码" align="center" width="110"> <el-table-column label="物料码" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.productCode.slice(-11) }} {{ scope.row.productCode.slice(-11) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料描述" align="center" width="250" prop="productName" /> <el-table-column label="产品描述" align="center" width="250" prop="productName" />
<el-table-column label="产线编码" align="center" prop="lineCode" /> <el-table-column label="产线编码" align="center" prop="lineCode" />
<el-table-column label="产线名称" align="center" width="250" prop="equipmentName" /> <el-table-column label="产线名称" align="center" width="250" prop="equipmentName" />
<el-table-column label="工号" width="110" align="center" prop="userName" />
<el-table-column label="操作者" width="110" align="center" prop="nickName" /> <el-table-column label="操作者" width="110" align="center" prop="nickName" />
<el-table-column label="职位" width="110" align="center" prop="post" />
<el-table-column label="子工序名称" width="110" align="center" prop="childprocessName" /> <el-table-column label="子工序名称" width="110" align="center" prop="childprocessName" />
<el-table-column label="当日工单报工总数" width="110" align="center" prop="orderQuantityP" />
<el-table-column label="规格" width="50" align="center" prop="umrez" />
<el-table-column label="全组数量" width="110" align="center" prop="orderQuantity" />
<el-table-column label="工序单价" width="110" align="center" prop="attr1" /> <el-table-column label="工序单价" width="110" align="center" prop="attr1" />
<el-table-column label="个人产量" width="100" align="center" prop="totalQuantity" />
<el-table-column label="计件薪酬(元)" width="110" align="center" prop="result" />
<el-table-column label="工时" width="110" align="center" prop="attr2" /> <el-table-column label="工时" width="110" align="center" prop="attr2" />
<el-table-column label="工时工资" width="100" align="center" prop="realWages" />
<el-table-column label="件数PC" width="100" align="center" prop="totalQuantity" /> <el-table-column label="扣款" width="110" align="center" prop="kk" />
<el-table-column label="薪酬(元)" width="110" align="center" prop="result" /> <el-table-column label="保底" width="110" align="center" prop="bd" />
<el-table-column label="创建时间" width="110" align="center" prop="createTime" /> <el-table-column label="转岗" width="110" align="center" prop="zg" />
<!-- <el-table-column label="人数" align="center" prop="headCount" />--> <el-table-column label="返工费用" width="110" align="center" prop="fg" />
<!--&lt;!&ndash; <el-table-column label="平均工资(元)" width="110" align="center" prop="avgResult" />&ndash;&gt;--> <el-table-column label="试产" width="110" align="center" prop="sc" />
<!-- <el-table-column label="实际工资(元)" width="110" align="center" prop="realWages" />--> <el-table-column label="试机" width="110" align="center" prop="sj" />
<!-- <el-table-column label="备注" align="center" prop="remark">--> <el-table-column label="特殊费用" width="110" align="center" prop="tsfy" />
<!-- <template slot-scope="scope">--> <el-table-column label="夜班补贴" width="110" align="center" prop="ybbt" />
<!-- <dict-tag :options="dict.type.unit_price" :value="scope.row.remark"/>--> <el-table-column label="协产补贴" width="110" align="center" prop="xcbt" />
<!-- </template>-->
<!-- </el-table-column>--> <el-table-column label="合计" width="110" align="center" prop="hj" />
<!--&lt;!&ndash; <el-table-column label="实际工资" align="center" prop="realWages">&ndash;&gt;--> <el-table-column label="时薪" width="100" align="center" prop="realWages" />
<!--&lt;!&ndash; <template slot-scope="scope">&ndash;&gt;--> <el-table-column prop="remark" label="备注" width="110">
<!--&lt;!&ndash; <el-input type="text" size="small" v-model="scope.row.realWages" @change="handleEdit(scope.$index,scope.row)"></el-input>&ndash;&gt;--> <template slot-scope="scope">
<!--&lt;!&ndash; </template>&ndash;&gt;--> <dict-tag :options="dict.type.unit_price" :value="scope.row.remark"/>
<!--&lt;!&ndash; </el-table-column>&ndash;&gt;--> </template>
<!--&lt;!&ndash; <el-table-column label="实际工资" align="center" prop="realWages" />&ndash;&gt;--> </el-table-column>
<!-- <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"p-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['unitPriceReport:report:edit']"-->
<!-- >工资修改</el-button>-->
<!--&lt;!&ndash; <el-button&ndash;&gt;-->
<!--&lt;!&ndash; size="mini"&ndash;&gt;-->
<!--&lt;!&ndash; type="text"&ndash;&gt;-->
<!--&lt;!&ndash; icon="el-icon-delete"&ndash;&gt;-->
<!--&lt;!&ndash; @click="handleDelete(scope.row)"&ndash;&gt;-->
<!--&lt;!&ndash; v-hasPermi="['system:unitPrice:remove']"&ndash;&gt;-->
<!--&lt;!&ndash; >删除</el-button>&ndash;&gt;-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table> </el-table>
@ -147,41 +159,103 @@
<!-- 添加或修改unitPrice对话框 --> <!-- 添加或修改unitPrice对话框 -->
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
<el-form ref="form" :model="form" label-width="100px"> <el-form ref="form" :model="form" label-width="100px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="实际工资" prop="attr2" > <el-form-item label="工序" prop="childprocessName">
<el-input v-model="form.attr2" /> <el-input v-model="form.childprocessName" style="width: 440px" readonly />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="工时" prop="attr2" >
<el-input v-model="form.attr2" >
<template #suffix>小时</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="产量" prop="attr1" >
<el-input v-model="form.attr1" >
<template #suffix>PC</template>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="子工序" prop="childprocessName"> <el-form-item label="扣款" prop="kk" >
<el-select <el-input v-model="form.kk" >
v-model="form.childprocessName" </el-input>
placeholder="子工序"
clearable
@change="handleChildprocessChange"
>
<el-option
v-for="dict in MesUnitPriceInfo"
:key="dict.childprocessName"
:label="dict.childprocessName"
:value="dict.childprocessCode"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="子工序编码" prop="childprocessCode" > <el-form-item label="保底" prop="bd" >
<el-input v-model="form.childprocessCode" :readonly="true" /> <el-input v-model="form.bd" >
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="转岗" prop="zg" >
<el-input v-model="form.zg" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="返工费用" prop="fg" >
<el-input v-model="form.fg" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12">
<el-form-item label="试产" prop="sc" >
<el-input v-model="form.sc" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="试机" prop="sj" >
<el-input v-model="form.sj" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="特殊费用" prop="tsfy" >
<el-input v-model="form.tsfy" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="夜班补贴" prop="ybbt" >
<el-input v-model="form.ybbt" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="协产补贴" prop="xcbt" >
<el-input v-model="form.xcbt" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注"> <el-form-item label="备注">
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>--> <!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>-->
@ -200,7 +274,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -270,8 +344,56 @@ export default {
timeout: null, timeout: null,
productCode:'', productCode:'',
tableData: [], tableData: [],
MesUnitPriceInfo: [] MesUnitPriceInfo: [],
//
// rules: {
// attr2: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// attr1: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// bd: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// zg: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// fg: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// sc: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// sj: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// tsfy: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// ybbt: [
// { required: true, message: "", trigger: "blur" },
// { validator: validateNumberOrDecimal, trigger: "blur" }
// ],
// }
}; };
//
// const validateNumberOrDecimal = (rule, value, callback) => {
// const regex = /^(\d+(\.\d{1,2})?)?$/;
// if (!regex.test(value)) {
// callback(new Error(''));
// } else {
// callback();
// }
// };
}, },
created() { created() {
this.getList(); this.getList();
@ -333,7 +455,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.picId) this.ids = selection.map(item => item.id)
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -343,17 +465,30 @@ export default {
this.open = true; this.open = true;
this.title = "添加计件薪酬信息"; this.title = "添加计件薪酬信息";
}, },
/** 修改按钮操作 */
// handleUpdate(row) {
// console.log(row)
// this.reset();
// const picId = row.id || this.ids
// getReport(picId).then(response => {
// this.form = response.data.MesUnitpriceReport;
// this.open = true;
// this.MesUnitPriceInfo=response.data.MesUnitPriceInfo;
// });
// },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
console.log(row)
this.reset(); this.reset();
const picId = row.id || this.ids const id = row.id || this.ids
getReport(picId).then(response => { console.log(id)
this.form = response.data.MesUnitpriceReport; getReport(id).then(response => {
this.form = response.data;
this.open = true; this.open = true;
this.MesUnitPriceInfo=response.data.MesUnitPriceInfo; this.title = "修改【产量/工时】";
}); });
}, },
handleChildprocessChange(value){ handleChildprocessChange(value){
console.log(value) console.log(value)
// //
@ -375,13 +510,6 @@ export default {
this.getList(); this.getList();
}); });
} }
// else {
// addUnitPrice(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// }
} }
}); });
}, },

Loading…
Cancel
Save