'20240305'

This commit is contained in:
xd 2024-03-05 16:30:56 +08:00
parent 8e7f6f72f7
commit bccde8e7f6
3 changed files with 33 additions and 24 deletions

View File

@ -69,19 +69,20 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table width="100%" v-loading="loading" :data="factoryList" @selection-change="handleSelectionChange">
<el-table width="100%" v-loading="loading" :data="factoryList" :row-class-name="rowFactoryIndex" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="index" width="80"/>
<el-table-column label="id" align="center" prop="factoryId" v-if="false"/>
<el-table-column label="编码" width="100" align="center" prop="factoryNo" />
<el-table-column label="名称" width="100" align="center" prop="factoryName" />
<el-table-column label="人工成本占比" width="150" align="center" prop="factoryRgRatio" />
<el-table-column label="五金费用占比" width="150" align="center" prop="factoryWjRatio" />
<el-table-column label="辅料费用占比" width="150" align="center" prop="factoryFlRatio" />
<el-table-column label="电费占比" width="150" align="center" prop="factoryDfRatio" />
<el-table-column label="天然气费用占比" width="150" align="center" prop="factoryTrqRatio" />
<el-table-column label="运输费用占比" width="150" align="center" prop="factoryYsRatio" />
<el-table-column label="总占比" align="center" prop="factoryTotalRatio" />
<el-table-column label="盘具费用占比" width="150" align="center" prop="factoryPjRatio" />
<el-table-column label="人工成本占比(%)" width="150" align="center" prop="factoryRgRatio" />
<el-table-column label="五金费用占比(%)" width="150" align="center" prop="factoryWjRatio" />
<el-table-column label="辅料费用占比(%)" width="150" align="center" prop="factoryFlRatio" />
<el-table-column label="电费占比(%)" width="150" align="center" prop="factoryDfRatio" />
<el-table-column label="天然气费用占比(%)" width="150" align="center" prop="factoryTrqRatio" />
<el-table-column label="运输费用占比(%)" width="150" align="center" prop="factoryYsRatio" />
<el-table-column label="总占比(%)" width="150" align="center" prop="factoryTotalRatio" />
<el-table-column label="盘具费用占比(%)" width="150" align="center" prop="factoryPjRatio" />
<el-table-column fixed="right" label="操作" align="center" width="150">
<template slot-scope="scope">
<el-button
@ -115,60 +116,60 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="编码" prop="factoryNo" label-width="120px">
<el-form-item label="编码" prop="factoryNo" label-width="150px">
<el-input v-model="form.factoryNo" placeholder="请输入编码" :disabled="isDis"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="名称" prop="factoryName" label-width="120px">
<el-form-item label="名称" prop="factoryName" label-width="150px">
<el-input v-model="form.factoryName" placeholder="请输入名称" :disabled="isDis" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="人工成本占比" prop="factoryRgRatio" label-width="120px">
<el-form-item label="人工成本占比(%)" prop="factoryRgRatio" label-width="150px">
<el-input v-model="form.factoryRgRatio" placeholder="请输入人工成本占比" @input="wat()"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="五金费用占比" prop="factoryWjRatio" label-width="120px">
<el-form-item label="五金费用占比(%)" prop="factoryWjRatio" label-width="150px">
<el-input v-model="form.factoryWjRatio" placeholder="请输入五金费用占比" @input="wat()"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="辅料费用占比" prop="factoryFlRatio" label-width="120px">
<el-form-item label="辅料费用占比(%)" prop="factoryFlRatio" label-width="150px">
<el-input v-model="form.factoryFlRatio" placeholder="请输入辅料费用占比" @input="wat()"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电费占比" prop="factoryDfRatio" label-width="120px">
<el-form-item label="电费占比(%)" prop="factoryDfRatio" label-width="150px">
<el-input v-model="form.factoryDfRatio" placeholder="请输入电费占比" @input="wat()"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="天然气费用占比" prop="factoryTrqRatio" label-width="120px">
<el-form-item label="天然气费用占比(%)" prop="factoryTrqRatio" label-width="150px">
<el-input v-model="form.factoryTrqRatio" placeholder="请输入天然气费用占比" @input="wat()"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="运输费用占比" prop="factoryYsRatio" label-width="120px">
<el-form-item label="运输费用占比(%)" prop="factoryYsRatio" label-width="150px">
<el-input v-model="form.factoryYsRatio" placeholder="请输入运输费用占比" @input="wat()"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="盘具费用占比" prop="factoryPjRatio" label-width="120px">
<el-form-item label="盘具费用占比(%)" prop="factoryPjRatio" label-width="150px">
<el-input v-model="form.factoryPjRatio" placeholder="请输入盘具费用占比" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="总占比" prop="factoryYsRatio" label-width="120px">
<el-form-item label="总占比(%)" prop="factoryYsRatio" label-width="150px">
<el-input v-model="form.factoryTotalRatio" :disabled="true"/>
</el-form-item>
</el-col>
@ -318,7 +319,6 @@ export default {
},
created() {
this.getList();
this.getMaterialType();
},
methods: {
/** 查询车间管理列表 */
@ -389,6 +389,7 @@ export default {
this.open = true;
this.title = "添加车间管理";
this.isDis = false;
this.getMaterialType();
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -400,6 +401,7 @@ export default {
this.open = true;
this.title = "修改车间管理";
this.isDis = true;
this.getMaterialType();
});
},
/** 提交按钮 */
@ -484,6 +486,10 @@ export default {
var YsRatio = this.form.factoryYsRatio?parseFloat(this.form.factoryYsRatio):0;
this.form.factoryTotalRatio = (RgRatio+WjRatio+FlRatio+DfRatio+TrqRatio+YsRatio).toFixed(3)
},
/** 序号 */
rowFactoryIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
}
}
};

View File

@ -290,8 +290,6 @@ export default {
},
created() {
this.getList();
this.getClMaterials();
this.getMaterialType();
},
computed:{
@ -326,13 +324,13 @@ export default {
getMaterialType(){
listMaterialType(this.queryParams).then(response => {
this.cTypeList = response.cTypeList;
/*
let obj = {};
this.cTypeList.forEach(item => {
let key = item.typeNo;
obj[key] = item.typeName;
})
this.cTypeMap = obj;
this.cTypeMap = obj;*/
});
},
@ -374,6 +372,8 @@ export default {
this.reset();
this.open = true;
this.title = "添加物料管理";
this.getClMaterials();
this.getMaterialType();
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -384,6 +384,8 @@ export default {
this.cMaterialCostList = response.data.cmaterialCostList;
this.open = true;
this.title = "修改物料管理";
this.getClMaterials();
this.getMaterialType();
this.sumPriceTotal()
});
},

View File

@ -71,6 +71,7 @@
<el-table v-loading="loading" :data="materialTypeList" :row-class-name="rowCMaterialTypeIndex" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="index" width="80"/>
<el-table-column label="id" align="center" prop="typeId" v-if="false"/>
<el-table-column label="编码" align="center" prop="typeNo" />
<el-table-column label="名称" align="center" prop="typeName" />