|
|
@ -82,13 +82,18 @@
|
|
|
|
<el-table-column label="人数" align="center" prop="headCount" />
|
|
|
|
<el-table-column label="人数" align="center" prop="headCount" />
|
|
|
|
<el-table-column label="平均工资(元)" width="110" align="center" prop="avgResult" />
|
|
|
|
<el-table-column label="平均工资(元)" width="110" align="center" prop="avgResult" />
|
|
|
|
<el-table-column label="实际工资(元)" width="110" align="center" prop="realWages" />
|
|
|
|
<el-table-column label="实际工资(元)" width="110" align="center" prop="realWages" />
|
|
|
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag :options="dict.type.unit_price" :value="scope.row.remark"/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<!-- <el-table-column label="实际工资" align="center" prop="realWages">-->
|
|
|
|
<!-- <el-table-column label="实际工资" align="center" prop="realWages">-->
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
<!-- <el-input type="text" size="small" v-model="scope.row.realWages" @change="handleEdit(scope.$index,scope.row)"></el-input>-->
|
|
|
|
<!-- <el-input type="text" size="small" v-model="scope.row.realWages" @change="handleEdit(scope.$index,scope.row)"></el-input>-->
|
|
|
|
<!-- </template>-->
|
|
|
|
<!-- </template>-->
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
<!-- <el-table-column label="实际工资" align="center" prop="realWages" />-->
|
|
|
|
<!-- <el-table-column label="实际工资" align="center" prop="realWages" />-->
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
@ -120,7 +125,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改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" :rules="rules" 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="attr1" >
|
|
|
|
<el-form-item label="实际工资" prop="attr1" >
|
|
|
@ -128,10 +133,50 @@
|
|
|
|
</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="childprocessName">
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="form.childprocessName"
|
|
|
|
|
|
|
|
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-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="子工序编码" prop="childprocessCode" >
|
|
|
|
|
|
|
|
<el-input v-model="form.childprocessCode" :readonly="true" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
<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>-->
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="form.remark"
|
|
|
|
|
|
|
|
placeholder="工单状态"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="dict in dict.type.unit_price"
|
|
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -143,7 +188,6 @@
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
// import { ElEditable } from 'element-plus';
|
|
|
|
// import { ElEditable } from 'element-plus';
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
@ -151,10 +195,7 @@ import { listUnitPriceReport,getReport,updateUnitPriceReport } from "@/api/mes/u
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "UnitPrice",
|
|
|
|
name: "UnitPrice",
|
|
|
|
// components: {
|
|
|
|
dicts: ['unit_price'],
|
|
|
|
// 'el-editable': ElEditable,
|
|
|
|
|
|
|
|
// // 其他组件
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
@ -206,6 +247,7 @@ export default {
|
|
|
|
timeout: null,
|
|
|
|
timeout: null,
|
|
|
|
productCode:'',
|
|
|
|
productCode:'',
|
|
|
|
tableData: [],
|
|
|
|
tableData: [],
|
|
|
|
|
|
|
|
MesUnitPriceInfo: []
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -284,15 +326,25 @@ export default {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
const picId = row.id || this.ids
|
|
|
|
const picId = row.id || this.ids
|
|
|
|
getReport(picId).then(response => {
|
|
|
|
getReport(picId).then(response => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data.MesUnitpriceReport;
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
if (response.data.attr1 === null || response.data.attr1 === undefined) {
|
|
|
|
if (response.data.attr1 === null || response.data.attr1 === undefined) {
|
|
|
|
this.form.attr1 = row.avgResult;
|
|
|
|
this.form.attr1 = row.avgResult;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.form.attr1 = response.data.attr1;
|
|
|
|
this.form.attr1 = response.data.attr1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.MesUnitPriceInfo=response.data.MesUnitPriceInfo;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
handleChildprocessChange(value){
|
|
|
|
|
|
|
|
console.log(value)
|
|
|
|
|
|
|
|
// 当子工序选择发生变化时,更新子工序编码
|
|
|
|
|
|
|
|
const selectedChildprocess = this.MesUnitPriceInfo.find(item => item.childprocessCode === value);
|
|
|
|
|
|
|
|
if (selectedChildprocess) {
|
|
|
|
|
|
|
|
this.form.childprocessName = selectedChildprocess.childprocessName;
|
|
|
|
|
|
|
|
this.form.childprocessCode = selectedChildprocess.childprocessCode;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|