feat:统计
This commit is contained in:
parent
d195b260fa
commit
f95918bda3
|
|
@ -136,7 +136,7 @@ const routes = [
|
|||
},
|
||||
{
|
||||
"name": "power",
|
||||
"path": "/rm/power",
|
||||
"path": "/rm_enm/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
|
|
@ -841,7 +841,8 @@ const routes = [
|
|||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/priceset"
|
||||
},{
|
||||
},
|
||||
{
|
||||
"name": "feeset",
|
||||
"path": "/ungrouped/feeset",
|
||||
"meta": {
|
||||
|
|
@ -851,6 +852,26 @@ const routes = [
|
|||
},
|
||||
"component": "ungrouped/feeset"
|
||||
},
|
||||
{
|
||||
"name": "stflog",
|
||||
"path": "/ungrouped/stflog",
|
||||
"meta": {
|
||||
"title": "停机记录",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/stflog"
|
||||
},
|
||||
{
|
||||
"name": "costing",
|
||||
"path": "/ungrouped/costing",
|
||||
"meta": {
|
||||
"title": "成本计算",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/costing"
|
||||
},
|
||||
{
|
||||
"name": "goalSetting",
|
||||
"path": "/ungrouped/goalSetting",
|
||||
|
|
@ -867,7 +888,7 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "质量报表",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/quality"
|
||||
},
|
||||
|
|
@ -877,7 +898,7 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "能源统计",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/energy"
|
||||
},
|
||||
|
|
@ -887,10 +908,20 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "全厂电量统计",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/electric"
|
||||
}
|
||||
,{
|
||||
"name": "reportAll",
|
||||
"path": "/ungrouped/report",
|
||||
"meta": {
|
||||
"title": "全厂报表",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/report"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@
|
|||
// border-top: 1px solid var(--el-border-color-light);
|
||||
padding: 13px 15px;
|
||||
height: 51px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="用电功率">
|
||||
<el-input-number v-model="form.power_kw" placeholder="用电功率"/>
|
||||
<el-input-number v-model="form.power_kw" :precision="2" :min="0" controls-position="right" placeholder="用电功率"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
|
|||
|
|
@ -65,23 +65,6 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="所在集合" prop="mgroup">
|
||||
<el-select
|
||||
v-model="form.mgroup"
|
||||
placeholder="所在集合"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="计量物料">
|
||||
<el-select
|
||||
|
|
@ -104,6 +87,69 @@
|
|||
<el-switch v-model="form.is_auto"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" style="position: relative;">
|
||||
<el-form-item label="系数分配">
|
||||
<el-switch v-model="form.is_all"/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
v-if="form.is_all"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="position: absolute;right: 0;top:0"
|
||||
@click="addAllocate"
|
||||
></el-button>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="!form.is_all">
|
||||
<el-form-item label="所属工段" prop="mgroup">
|
||||
<el-select
|
||||
v-model="form.mgroup"
|
||||
placeholder="所属工段"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.is_all">
|
||||
<template v-for="(item,$index) in form.mgroups_allocate" :key="$index">
|
||||
<el-col :md="11" :sm="24">
|
||||
<el-form-item label="所属工段" prop="mgroup">
|
||||
<el-select
|
||||
v-model="item.mgroup"
|
||||
placeholder="所属工段"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="11" :sm="24">
|
||||
<el-form-item label="分配比例" prop="rate">
|
||||
<el-input-number precision="2" v-model="item.ratio" step="0.1" min="0" max="1" clearable controls-position="right"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="2" :sm="24" v-if="$index!==0">
|
||||
<el-button
|
||||
v-if="$index!==0"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="delAllocate($index)"
|
||||
></el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
|
|
@ -116,7 +162,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {genTree} from "@/utils/verificate";
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
|
|
@ -129,7 +174,10 @@ export default {
|
|||
show: "查看",
|
||||
},
|
||||
form: {
|
||||
is_auto:true
|
||||
is_auto:true,
|
||||
belong_dept:null,
|
||||
mgroup:'',
|
||||
mgroups_allocate:[{mgroup:'',ratio:0}],
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: '请输入测点名称'}],
|
||||
|
|
@ -183,6 +231,12 @@ export default {
|
|||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
addAllocate(){
|
||||
this.form.mgroups_allocate.push({mgroup:'',ratio:0});
|
||||
},
|
||||
delAllocate(index){
|
||||
this.form.mgroups_allocate.splice(index,1)
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
|
|
@ -194,6 +248,8 @@ export default {
|
|||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
})
|
||||
} else if (this.mode == "edit") {
|
||||
this.$API.enm.mpoint.update.req(this.form.id,this.form).then(res=>{
|
||||
|
|
@ -201,6 +257,8 @@ export default {
|
|||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -208,7 +266,13 @@ export default {
|
|||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
debugger;
|
||||
console.log(data)
|
||||
if(data.mgroups_allocate.length>1){
|
||||
this.form.is_all = true
|
||||
}
|
||||
Object.assign(this.form, data);
|
||||
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
|
|
|
|||
|
|
@ -222,6 +222,10 @@ export default {
|
|||
that.getList();
|
||||
that.getManCount();
|
||||
},60000)
|
||||
//this.$once vue3已弃用
|
||||
// this.$once('hook:beforeUnmount', () => {
|
||||
// clearInterval(aggTimer);
|
||||
// })
|
||||
},
|
||||
methods: {
|
||||
toTicket() {
|
||||
|
|
@ -387,13 +391,14 @@ export default {
|
|||
this.dutyAgg = res.details;
|
||||
},
|
||||
},
|
||||
unmounted(){
|
||||
clearInterval(this.aggTimer);
|
||||
// unmounted(){
|
||||
// clearInterval(this.aggTimer);
|
||||
// this.aggTimer = null;
|
||||
// },
|
||||
beforeUnmount() {
|
||||
clearInterval(this.aggTimer);
|
||||
this.aggTimer = null;
|
||||
// console.log(this.aggTimer)
|
||||
// console.log('00000')
|
||||
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-aside width="45%">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div style="margin-right: 20px">交接班日志</div>
|
||||
<el-date-picker
|
||||
|
|
@ -81,80 +79,82 @@
|
|||
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
|
||||
<el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button>
|
||||
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
|
||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">导出报表</el-button>
|
||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div style="margin-right: 20px">
|
||||
<span v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}{{ sflogItem.shift_name }}</span>
|
||||
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
|
||||
交接班记录</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
|
||||
<el-button type="danger" @click="close">
|
||||
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
<el-main class="nopadding">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;display: flex;justify-content: space-around;">
|
||||
<span>2023.06.21</span>
|
||||
<span>白班</span>
|
||||
<span>甲班</span>
|
||||
</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="numCell">产量(t)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">台时(t/h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">运转时间(h)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">运转率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">停机时长(h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">当期单位产品电耗(kW·h/t)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">辅料细度合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">辅料Fe₂O₃合格率(%)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">辅料水分合格率(%)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">干混生料CaO合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">干混生料Fe₂O₃合格率(%)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">干混生料细度合格率(%)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">干混生料水分合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">单位成本(元/吨)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell"></td>
|
||||
<td class="numCell"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">生产情况记录</td>
|
||||
<td class="numCell" colspan="5">时间、类别、原因、处置措施、处置人</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
|
||||
<span v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}{{ sflogItem.shift_name }}</span>
|
||||
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
|
||||
交接班记录
|
||||
</div>
|
||||
<h3 style="text-align: center;display: flex;justify-content: space-around;">
|
||||
<span>2023.06.21</span>
|
||||
<span>白班</span>
|
||||
<span>甲班</span>
|
||||
</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="numCell">产量(t)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">台时(t/h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">运转时间(h)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">运转率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">停机时长(h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">当期单位产品电耗(kW·h/t)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">辅料细度合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">辅料Fe₂O₃合格率(%)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">辅料水分合格率(%)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">干混生料CaO合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">干混生料Fe₂O₃合格率(%)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">干混生料细度合格率(%)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">干混生料水分合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">单位成本(元/吨)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell"></td>
|
||||
<td class="numCell"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">生产情况记录</td>
|
||||
<td class="numCell" colspan="5">时间、类别、原因、处置措施、处置人</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
|
|
@ -175,7 +175,6 @@
|
|||
@closed="dialog.save = false"
|
||||
></quastat-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import saveDialog from "./handover_form.vue";
|
||||
import quastatDialog from "./quastat_form.vue";
|
||||
|
|
@ -211,11 +210,14 @@ import otherDialog from "./other_form.vue";
|
|||
asynDialog:false,
|
||||
options:[],
|
||||
optionsShift:[],
|
||||
|
||||
limitedExport:false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
sflog_export(){
|
||||
this.limitedExport = true;
|
||||
},
|
||||
rowClick(row) {
|
||||
this.sflogId = row.id;
|
||||
this.sflogItem = row;
|
||||
|
|
@ -292,6 +294,14 @@ import otherDialog from "./other_form.vue";
|
|||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,104 +1,119 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[0]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[3]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[0]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[3]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
|
@ -120,6 +135,7 @@
|
|||
query:{
|
||||
time:''
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'反击式破',number:'NM001',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'立磨主电',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
|
|
@ -159,6 +175,11 @@
|
|||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -175,6 +196,7 @@
|
|||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,24 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">生产报告</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
|
@ -165,6 +180,7 @@
|
|||
[5,5,5,5,5,5,5,5],
|
||||
[6,6,6,6,6,6,6,6]
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
|
|
@ -196,6 +212,11 @@
|
|||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,16 +17,27 @@
|
|||
placeholder="对比月份"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
@ -125,6 +136,11 @@
|
|||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -16,17 +16,23 @@
|
|||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-link type="primary" icon="el-icon-plus" v-auth="'rparty.create'"></el-link>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
</div>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>月份</th>
|
||||
|
|
@ -113,6 +119,11 @@
|
|||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,413 @@
|
|||
<!-- 成本分析 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-select
|
||||
v-model="query.type"
|
||||
placeholder="查询类型"
|
||||
clearable
|
||||
@change="typeCange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.day"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日"
|
||||
v-if="query.type==0||query.type==1"
|
||||
/>
|
||||
<!-- 选择班次 -->
|
||||
<el-select
|
||||
v-if="query.type==0"
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.month"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="月份"
|
||||
v-if="query.type==2"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="getTableData"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="8">电石渣干粉核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>要素</th>
|
||||
<th>类别</th>
|
||||
<th>费用名称</th>
|
||||
<th>实际产量</th>
|
||||
<th>消耗量</th>
|
||||
<th>单价</th>
|
||||
<th>总成本</th>
|
||||
<th>单位成本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="3">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==3" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==5" rowspan="8">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==13" colspan="3">{{item[0]}}</td>
|
||||
<td class="numCell" v-if="index==1||index==7" rowspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==3||index==4" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==13" colspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" style="display: none;" v-else-if="index==2||index==8">{{item[1]}}</td>
|
||||
<td class="numCell" v-else>{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index!==13">{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index!==13">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==13">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index!==13">{{item[6]}}</td>
|
||||
<td class="numCell" style="display: none;" v-if="index==3||index==4||index==13">{{item[7]}}</td>
|
||||
<td class="numCell" v-else>{{item[7]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable2">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="8">生料核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>要素</th>
|
||||
<th>类别</th>
|
||||
<th>费用名称</th>
|
||||
<th>实际产量</th>
|
||||
<th>消耗量</th>
|
||||
<th>单价</th>
|
||||
<th>总成本</th>
|
||||
<th>单位成本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas2" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="6">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==6" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==8" rowspan="8">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==16" colspan="3">{{item[0]}}</td>
|
||||
|
||||
<td class="numCell" v-if="index==0" rowspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==4||index==10" rowspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==6||index==7" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==16" colspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" style="display: none;" v-else-if="index==1||index==2||index==3||index==5||index==11">{{item[1]}}</td>
|
||||
<td class="numCell" v-else>{{item[1]}}</td>
|
||||
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index!==16">{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index!==16">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==16">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index!==16">{{item[6]}}</td>
|
||||
<td class="numCell" style="display: none;" v-if="index==6||index==7||index==16">{{item[7]}}</td>
|
||||
<td class="numCell" v-else>{{item[7]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable3">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="8">熟料核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>要素</th>
|
||||
<th>类别</th>
|
||||
<th>费用名称</th>
|
||||
<th>实际产量</th>
|
||||
<th>消耗量</th>
|
||||
<th>单价</th>
|
||||
<th>总成本</th>
|
||||
<th>单位成本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="4">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==4" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==6" rowspan="8">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==14" colspan="3">{{item[0]}}</td>
|
||||
|
||||
<td class="numCell" v-if="index==2||index==8" rowspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==4||index==5" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==14" colspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" style="display: none;" v-else-if="index==3||index==9">{{item[1]}}</td>
|
||||
<td class="numCell" v-else>{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index!==14">{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index!==14">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==14">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index!==14">{{item[6]}}</td>
|
||||
<td class="numCell" style="display: none;" v-if="index==4||index==5||index==14">{{item[7]}}</td>
|
||||
<td class="numCell" v-else>{{item[7]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable4">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="8">水泥核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>要素</th>
|
||||
<th>类别</th>
|
||||
<th>费用名称</th>
|
||||
<th>实际产量</th>
|
||||
<th>消耗量</th>
|
||||
<th>单价</th>
|
||||
<th>总成本</th>
|
||||
<th>单位成本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas4" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="10">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==10" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==12" rowspan="8">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==20" colspan="3">{{item[0]}}</td>
|
||||
|
||||
<td class="numCell" v-if="index==1" rowspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==8||index==5" rowspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==10||index==11" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==20" colspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" style="display: none;" v-else-if="index==2||index==3||index==6||index==4||index==9">{{item[1]}}</td>
|
||||
<td class="numCell" v-else>{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index!==20">{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index!==20">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==20">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index!==20">{{item[6]}}</td>
|
||||
<td class="numCell" style="display: none;" v-if="index==10||index==11||index==20">{{item[7]}}</td>
|
||||
<td class="numCell" v-else>{{item[7]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
type:0,
|
||||
day:'',
|
||||
month:'',
|
||||
shift:'',
|
||||
},
|
||||
tableName:'班组成本计算',
|
||||
options:[
|
||||
{id:0,name:'班统计'},
|
||||
{id:1,name:'日统计'},
|
||||
{id:2,name:'月统计'},
|
||||
],
|
||||
tableHead:['车间','工段','能源分类','1号','2号','3号','4号','5号','6号','7号','8号'],
|
||||
tableDatas:[
|
||||
['直接材料','原材料','湿电石渣',1,2,3,4,5],
|
||||
['直接材料','电、水','动力电',1,2,3,4,5],
|
||||
['直接材料','电、水','工业水',1,2,3,4,5],
|
||||
|
||||
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
|
||||
['制造费用','倒运费用','倒运费用','/','/','/','/',5],
|
||||
['制造费用','材料出库','物料消耗','/','/','/','/',5],
|
||||
['制造费用','维修费用','检修','/','/','/','/',5],
|
||||
['制造费用','维修费用','外协施工费用','/','/','/','/',5],
|
||||
['制造费用','装卸费','装卸费 ','/','/','/','/',5],
|
||||
['制造费用','差旅费','差旅费','/','/','/','/',5],
|
||||
['制造费用','折旧','折旧','/','/','/','/',5],
|
||||
['制造费用','摊销','无形资产摊销','/','/','/','/',5],
|
||||
['成本合计','',''],
|
||||
],
|
||||
tableDatas2:[
|
||||
['直接材料','原材料','干粉',1,2,3,4,5],
|
||||
['直接材料','原材料','辅料',1,2,3,4,5],
|
||||
['直接材料','原材料','粉煤灰',1,2,3,4,5],
|
||||
['直接材料','原材料','电石厂除尘灰',1,2,3,4,5],
|
||||
['直接材料','电、水','动力电',1,2,3,4,5],
|
||||
['直接材料','电、水','工业水',1,2,3,4,5],
|
||||
|
||||
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
|
||||
['制造费用','倒运费用','倒运费用','/','/','/','/',5],
|
||||
['制造费用','材料出库','物料消耗','/','/','/','/',5],
|
||||
['制造费用','维修费用','检修','/','/','/','/',5],
|
||||
['制造费用','维修费用','外协施工费用','/','/','/','/',5],
|
||||
['制造费用','装卸费 ','装卸费 ','/','/','/','/',5],
|
||||
['制造费用','差旅费','差旅费','/','/','/','/',5],
|
||||
['制造费用','折旧','折旧','/','/','/','/',5],
|
||||
['制造费用','摊销','无形资产摊销','/','/','/','/',5],
|
||||
['成本合计','',''],
|
||||
],
|
||||
tableDatas3:[
|
||||
['直接材料','原材料','生料',1,2,3,4,5],
|
||||
['直接材料','辅助材料','原煤',1,2,3,4,5],
|
||||
['直接材料','电、水','动力电',1,2,3,4,5],
|
||||
['直接材料','电、水','工业水',1,2,3,4,5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['制造费用','倒运费用','倒运费用','/','/','/','/',5],
|
||||
['制造费用','材料出库','物料消耗','/','/','/','/',5],
|
||||
['制造费用','维修费用','检修','/','/','/','/',5],
|
||||
['制造费用','维修费用','外协施工费用','/','/','/','/',5],
|
||||
['制造费用','装卸费 ','装卸费 ','/','/','/','/',5],
|
||||
['制造费用','差旅费','差旅费','/','/','/','/',5],
|
||||
['制造费用','折旧','折旧','/','/','/','/',5],
|
||||
['制造费用','摊销','无形资产摊销','/','/','/','/',5],
|
||||
['成本合计','',''],
|
||||
],
|
||||
tableDatas4:[
|
||||
['直接材料','原材料','熟料',1,2,3,4,5],
|
||||
['直接材料','辅助材料','废石灰石粉',1,2,3,4,5],
|
||||
['直接材料','辅助材料','脱硫石膏',1,2,3,4,5],
|
||||
['直接材料','辅助材料','粉煤灰',1,2,3,4,5],
|
||||
['直接材料','辅助材料','矿粉',1,2,3,4,5],
|
||||
['直接材料','助剂','助磨剂',1,2,3,4,5],
|
||||
['直接材料','助剂','缓凝剂',1,2,3,4,5],
|
||||
['直接材料','包装','包装袋',1,2,3,4,5],
|
||||
['直接材料','电、水','动力电',1,2,3,4,5],
|
||||
['直接材料','电、水','工业水',1,2,3,4,5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['制造费用','倒运费用','倒运费用','/','/','/','/',5],
|
||||
['制造费用','材料出库','物料消耗','/','/','/','/',5],
|
||||
['制造费用','维修费用','检修','/','/','/','/',5],
|
||||
['制造费用','维修费用','外协施工费用','/','/','/','/',5],
|
||||
['制造费用','装卸费 ','装卸费 ','/','/','/','/',5],
|
||||
['制造费用','差旅费','差旅费','/','/','/','/',5],
|
||||
['制造费用','折旧','折旧','/','/','/','/',5],
|
||||
['制造费用','摊销','无形资产摊销','/','/','/','/',5],
|
||||
['成本合计','',''],
|
||||
],
|
||||
optionsShift:[],
|
||||
sourceData:{}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
var myDate = new Date();
|
||||
let month = myDate.getMonth()+1;
|
||||
if(month<10){
|
||||
month = '0'+month;
|
||||
}
|
||||
this.query.month = myDate.getFullYear()+'-'+month;
|
||||
// this.getData();
|
||||
this.getShift();
|
||||
|
||||
},
|
||||
methods: {
|
||||
getShift(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.optionsShift = res;
|
||||
})
|
||||
},
|
||||
typeCange(value){
|
||||
if(value==1){
|
||||
this.tableName = '班组成本计算'
|
||||
}else if(value==1){
|
||||
this.tableName = '日成本计算'
|
||||
}else{
|
||||
this.tableName = '月成本计算'
|
||||
}
|
||||
},
|
||||
getData(){
|
||||
let that = this;
|
||||
let params = {query:{}};
|
||||
let id = '';
|
||||
let arr = [];
|
||||
if(that.query.type==0){//班
|
||||
arr = that.query.month.split('-');
|
||||
params.query.year_s = Number(arr[0]);
|
||||
params.query.month_s = Number(arr[1]);
|
||||
id='energy_day'
|
||||
}else if(that.query.type==1){//日
|
||||
params.query.year_s = Number(that.query.year);
|
||||
id='energy_month'
|
||||
}else{//月
|
||||
params.query.year_s = Number(that.query.yearStart);
|
||||
id='energy_year'
|
||||
}
|
||||
},
|
||||
getTableData(){
|
||||
this.getData();
|
||||
},
|
||||
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
/* width: 1075px; */
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 70px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 80px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
#myTable,#myTable2,#myTable3,#myTable4{
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">{{ tableName }}</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
|
|
@ -282,7 +282,7 @@
|
|||
}else{
|
||||
innerArr[ind] = [];
|
||||
}
|
||||
debugger;
|
||||
// debugger;
|
||||
if(item[roomInd]=="原料车间"){
|
||||
if(item[mgroupInd]=="电石渣"){
|
||||
if(item[mpointInd]=="动力电"){
|
||||
|
|
@ -326,7 +326,7 @@
|
|||
}else{
|
||||
innerArr[ind][14] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[mgroupInd]=="包装"){
|
||||
}else if(item[mgroupInd]=="水泥包装"){
|
||||
if(item[mpointInd]=="动力电"){
|
||||
innerArr[ind][15] = Number(item[valueInd]).toFixed(2)
|
||||
}else{
|
||||
|
|
@ -413,6 +413,11 @@
|
|||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,108 @@
|
|||
<!-- 质量检验 -->
|
||||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div style="margin-right: 20px">质量检验</div>
|
||||
<el-date-picker
|
||||
v-model="query.start_time__gte"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="开始时间"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time__day"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="结束时间"
|
||||
/>
|
||||
<el-select
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.team"
|
||||
placeholder="班组"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-row gutter="6">
|
||||
<el-col :span="12"><el-card style="height: 300px;"></el-card></el-col>
|
||||
<el-col :span="12"><el-card style="height: 300px;"></el-card></el-col>
|
||||
<el-col :span="12"><el-card style="height: 300px;"></el-card></el-col>
|
||||
<el-col :span="12"><el-card style="height: 300px;"></el-card></el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "listSon",
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
mgroup:'3346520558031773696',
|
||||
},
|
||||
options:[],
|
||||
optionsShift:[],
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
this.getTeam();
|
||||
this.getShift();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.options = res;
|
||||
})
|
||||
},
|
||||
getShift(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.optionsShift = res;
|
||||
})
|
||||
},
|
||||
//质量检验
|
||||
sflog_check(row){
|
||||
this.dialog.check = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.checkDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
handleQuery(){
|
||||
this.$API.wpm.sflog.list.req(this.query).then(res=>{
|
||||
debugger;
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="roleAdd" v-auth="'role.create'"></el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="table_add" v-auth="'role.create'"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
</el-table-column> -->
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="roleEdit(scope.row)" v-auth="'team.update'" type="primary">编辑</el-button>
|
||||
<el-button link size="small" @click="table_edit(scope.row)" v-auth="'team.update'" type="primary">编辑</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="roleDel(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
|
|
@ -41,101 +41,32 @@
|
|||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-dialog :title="titleMap[type]" v-model="limitedVisible">
|
||||
<el-form :model="form" :rules="rules" ref="addForm" label-width="80px" style="padding: 0 10px;">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标识">
|
||||
<el-input v-model="form.code" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select
|
||||
v-model="form.type"
|
||||
placeholder="类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测项目">
|
||||
<el-select
|
||||
v-model="form.testitems"
|
||||
placeholder="检测项目"
|
||||
clearable
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位成本" prop="price_unit">
|
||||
<el-input-number
|
||||
v-model="form.sort"
|
||||
:precision="0"
|
||||
style="width: 100%;"
|
||||
clearable>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="limitedVisible=false" >取 消</el-button>
|
||||
<el-button v-if="type!=='show'" type="primary" :loading="isSaving" @click="submitHandle()">保 存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
</template>
|
||||
<script>
|
||||
const defaultForm = {
|
||||
id:"",
|
||||
name: "",
|
||||
code: "",
|
||||
type: "",
|
||||
sort:1,
|
||||
testitems: [],
|
||||
|
||||
};
|
||||
import saveDialog from "./material_form.vue";
|
||||
|
||||
export default {
|
||||
name: 'dept',
|
||||
name: 'material',
|
||||
components: {
|
||||
saveDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.mtm.material.list,
|
||||
search: {
|
||||
keyword: null
|
||||
},
|
||||
dialog: {
|
||||
save: false,
|
||||
},
|
||||
query: {},
|
||||
isSaving: false,
|
||||
limitedVisible : false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: '新增产品',
|
||||
edit: '编辑产品',
|
||||
show: '查看产品'
|
||||
},
|
||||
//表单数据
|
||||
form: defaultForm,
|
||||
//验证规则
|
||||
rules: {
|
||||
name: [{required: true, message: '请输入产品名称'}],
|
||||
},
|
||||
options:[],
|
||||
typeOptions:[
|
||||
{label:'电/水/气',value:0},
|
||||
{label:'成品',value:10},
|
||||
{label:'半成品',value:20},
|
||||
{label:'主要原料',value:30},
|
||||
{label:'辅助材料',value:40},
|
||||
{label:'加工工具',value:50},
|
||||
{label:'辅助工装',value:60},
|
||||
],
|
||||
types_:{
|
||||
0:'电/水/气',
|
||||
10:'成品',
|
||||
|
|
@ -147,53 +78,25 @@
|
|||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTestItem();//获取检测项目
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
console.log(this.form.belong_dept);
|
||||
},
|
||||
getTestItem(){
|
||||
this.$API.qm.getTestItem.get({page:0}).then(res=>{
|
||||
this.options = res;
|
||||
//添加
|
||||
table_add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
//添加产品
|
||||
roleAdd(){
|
||||
this.limitedVisible = true;
|
||||
this.type = "add";
|
||||
this.form = Object.assign({}, defaultForm);
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
submitHandle(){
|
||||
let that = this;
|
||||
this.$refs.addForm.validate( (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
let res;
|
||||
if(this.type==='add'){
|
||||
res = this.$API.mtm.material.create.req(that.form);
|
||||
}else{
|
||||
res = this.$API.mtm.material.update.req(that.form.id,that.form);
|
||||
}
|
||||
if(res.err_msg){
|
||||
this.$message.error(res.err_msg);
|
||||
}else{
|
||||
this.isSaveing = false;
|
||||
this.limitedVisible = false;
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//编辑产品
|
||||
roleEdit(row){
|
||||
this.type='edit';
|
||||
this.form = Object.assign(defaultForm, row);
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
|
||||
//删除产品
|
||||
async roleDel(row){
|
||||
var id = row.id;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
style="padding: 0 10px;"
|
||||
>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标识">
|
||||
<el-input v-model="form.code" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select
|
||||
v-model="form.type"
|
||||
placeholder="类型"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测项目">
|
||||
<el-select
|
||||
v-model="form.testitems"
|
||||
placeholder="检测项目"
|
||||
clearable
|
||||
multiple
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="单位成本" prop="price_unit">
|
||||
<el-input-number
|
||||
v-model="form.sort"
|
||||
:precision="0"
|
||||
style="width: 100%;"
|
||||
clearable>
|
||||
</el-input-number>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const defaultForm = {
|
||||
id:"",
|
||||
name: "",
|
||||
code: "",
|
||||
type: "",
|
||||
// sort:1,
|
||||
testitems: [],
|
||||
};
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: '新增产品',
|
||||
edit: '编辑产品',
|
||||
show: '查看产品'
|
||||
},
|
||||
//表单数据
|
||||
form: defaultForm,
|
||||
//验证规则
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入名称", trigger: "blur"}],
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
options:[],
|
||||
typeOptions:[
|
||||
{label:'电/水/气',value:0},
|
||||
{label:'成品',value:10},
|
||||
{label:'半成品',value:20},
|
||||
{label:'主要原料',value:30},
|
||||
{label:'辅助材料',value:40},
|
||||
{label:'加工工具',value:50},
|
||||
{label:'辅助工装',value:60},
|
||||
],
|
||||
setFiltersVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getTestItem();//获取部门
|
||||
},
|
||||
methods: {
|
||||
getTestItem(){
|
||||
this.$API.qm.getTestItem.get({page:0}).then(res=>{
|
||||
this.options = res;
|
||||
});
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
let that = this;
|
||||
that.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
if(that.type==='add'){
|
||||
that.$API.mtm.material.create.req(that.form).then(res=>{
|
||||
that.isSaveing = false;
|
||||
that.$emit("success", that.form, that.mode);
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
that.isSaveing = false;
|
||||
})
|
||||
}else{
|
||||
res = that.$API.mtm.material.update.req(that.form.id,that.form).then(res=>{
|
||||
that.isSaveing = false;
|
||||
that.$emit("success", that.form, that.mode);
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
that.isSaveing = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
|
@ -108,14 +108,14 @@
|
|||
methods: {
|
||||
//获取物料列表
|
||||
getMaterial(){
|
||||
this.$API.mtm.material.list.req({page:0,type:10}).then(res=>{
|
||||
let data = [];
|
||||
res.forEach(element => {
|
||||
if(element.type!==0){
|
||||
data.push(element)
|
||||
}
|
||||
});
|
||||
this.options = data;
|
||||
this.$API.mtm.material.list.req({page:0}).then(res=>{
|
||||
// let data = [];
|
||||
// res.forEach(element => {
|
||||
// if(element.type!==0){
|
||||
// data.push(element)
|
||||
// }
|
||||
// });
|
||||
this.options = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
|
|
|
|||
|
|
@ -0,0 +1,157 @@
|
|||
<!-- 全厂电量统计 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">全厂报表</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th colspan="2">项目</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell" v-if="index==0" rowspan="5">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==5" rowspan="9">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==14" rowspan="14">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==28" rowspan="5">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==33" rowspan="6">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
|
||||
<td class="numCell" style="width:150px">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index<39" colspan="3">{{item[3]}}</td>
|
||||
<td class="numCell" v-else>{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index>38">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index>38">{{item[5]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
year:'',
|
||||
month:'',
|
||||
days:'',
|
||||
},
|
||||
tableDatas:[
|
||||
[1,'主机设备台产','立磨台产(t/h)',''],
|
||||
[2,'主机设备台产','烘干破台产(t/h)'],
|
||||
[3,'主机设备台产','煤磨台产(t/h)'],
|
||||
[4,'主机设备台产','回转窑台产(t/h)'],
|
||||
[5,'主机设备台产','水泥磨台产(t/h)'],
|
||||
|
||||
[6,'能耗','熟料日综合电耗(kw.h/t)'],
|
||||
[7,'能耗','熟料日单位标煤耗(kgce/t)'],
|
||||
[8,'能耗','熟料日综合能耗(kgce/t)'],
|
||||
[9,'能耗','水泥日综合能耗(kgce/t)'],
|
||||
[10,'能耗','日电石渣分布电耗(kw.h/t)'],
|
||||
[11,'能耗','日生料分布电耗(kw.h/t)'],
|
||||
[12,'能耗','日熟料分布电耗(kw.h/t)'],
|
||||
[13,'能耗','日水泥粉磨分布电耗(kw.h/t)'],
|
||||
[14,'能耗','日水泥包装分布电耗(kw.h/t)'],
|
||||
|
||||
|
||||
[15,'产量','日电石渣产量(t)'],
|
||||
[16,'产量','月电石渣产量完成率(%)'],
|
||||
[17,'产量','日生料产量(t)'],
|
||||
[18,'产量','月生料产量完成率(%)'],
|
||||
[19,'产量','日熟料产量(t)'],
|
||||
[20,'产量','月熟料产量完成率(%)'],
|
||||
[21,'产量','日水泥产量(t)'],
|
||||
[22,'产量','月水泥产量完成率(%)'],
|
||||
[23,'产量','日熟料出厂量(t)'],
|
||||
[24,'产量','月熟料累计出厂量(t)'],
|
||||
[25,'产量','日散装水泥出厂量(t)'],
|
||||
[26,'产量','月散装水泥出厂量(t)'],
|
||||
[27,'产量','日袋装水泥出厂量(t)'],
|
||||
[28,'产量','月袋装水泥出厂量(t)'],
|
||||
|
||||
|
||||
|
||||
[29,'成本','日电石渣成本(元/吨)'],
|
||||
[30,'成本','日生料成本(元/吨)'],
|
||||
[31,'成本','日熟料成本(元/吨)'],
|
||||
[32,'成本','日水泥粉磨成本(元/吨)'],
|
||||
[33,'成本','日水泥包装成本(元/吨)'],
|
||||
|
||||
|
||||
[34,'耗电量','日电石渣耗电量(kw.h)'],
|
||||
[35,'耗电量','日生料耗电量(kw.h)'],
|
||||
[36,'耗电量','日熟料耗电量(kw.h)'],
|
||||
[37,'耗电量','日水泥粉磨耗电量(kw.h)'],
|
||||
[38,'耗电量','日水泥包装耗电量(kw.h)'],
|
||||
[39,'耗电量','日生活区耗电量(kw.h)'],
|
||||
|
||||
|
||||
['生产异常动态','工段','类别','原因','处置措施','处置人'],
|
||||
['生产异常动态','电石渣'],
|
||||
['生产异常动态','原料磨'],
|
||||
['生产异常动态','回转窑'],
|
||||
['生产异常动态','煤磨'],
|
||||
['生产异常动态','水泥磨'],
|
||||
],
|
||||
sourceData:{}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.test(0)
|
||||
// this.getData();
|
||||
},
|
||||
methods: {
|
||||
test(index){
|
||||
if(index!==8&&index==!22&&index==!26&&index==!37&&index==!38&&index!==48&&index!==49){
|
||||
console.log(index)
|
||||
}
|
||||
},
|
||||
getData(){
|
||||
this.$API.bi.dataset.exec.req('3349203178834325504',).then((res) => {
|
||||
let data0 = this.sourceData = res.data2.ds0;
|
||||
// debugger;
|
||||
console.log(this.sourceData)
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -16,11 +16,7 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="table_add" v-auth="'role.create'"></el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" hidePagination>
|
||||
|
|
@ -80,13 +76,13 @@
|
|||
this.options = res;
|
||||
})
|
||||
},
|
||||
//添加
|
||||
table_add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
// //添加
|
||||
// table_add() {
|
||||
// this.dialog.save = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.saveDialog.open("add");
|
||||
// });
|
||||
// },
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue