更新
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-22 11:12:58
|
||||
* @LastEditTime: 2024-09-05 15:33:16
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -11,6 +11,7 @@
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-position="top"
|
||||
label-width="80px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
@@ -18,70 +19,7 @@
|
||||
<el-input
|
||||
style="width: 100%"
|
||||
v-model="dataForm.bindObjectName"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厚度" prop="thick">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 100%"
|
||||
v-model="dataForm.thick"
|
||||
clearable
|
||||
placeholder="请输入厚度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="在线速度" prop="speed">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 100%"
|
||||
v-model="dataForm.speed"
|
||||
clearable
|
||||
placeholder="请输入在线速度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="掰边宽度" prop="width">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 100%"
|
||||
v-model="dataForm.width"
|
||||
clearable
|
||||
placeholder="请输入掰边宽度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="拉引量" prop="inArea">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 80%"
|
||||
v-model="dataForm.inArea"
|
||||
clearable
|
||||
placeholder="请输入拉引量" />
|
||||
(/m²)
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="下片面积" prop="outArea">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 80%"
|
||||
v-model="dataForm.outArea"
|
||||
clearable
|
||||
placeholder="请输入下片面积" />
|
||||
(/m²)
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="良品率" prop="ratio">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 80%"
|
||||
v-model="dataForm.ratio"
|
||||
clearable
|
||||
placeholder="请输入良品率" />
|
||||
(%)
|
||||
disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -91,10 +29,73 @@
|
||||
type="date"
|
||||
value-format="timestamp"
|
||||
:style="{ width: '100%' }"
|
||||
readonly
|
||||
disabled
|
||||
placeholder="选择所属日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厚度" prop="thick">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 85%"
|
||||
v-model="dataForm.thick"
|
||||
clearable
|
||||
placeholder="请输入厚度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="在线速度" prop="speed">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 85%"
|
||||
v-model="dataForm.speed"
|
||||
clearable
|
||||
placeholder="请输入在线速度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="掰边宽度" prop="width">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 85%"
|
||||
v-model="dataForm.width"
|
||||
clearable
|
||||
placeholder="请输入掰边宽度" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="拉引量" prop="inArea">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 85%"
|
||||
v-model="dataForm.inArea"
|
||||
clearable
|
||||
placeholder="请输入拉引量" />
|
||||
(m²)
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="下片面积" prop="outArea">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 85%"
|
||||
v-model="dataForm.outArea"
|
||||
clearable
|
||||
placeholder="请输入下片面积" />
|
||||
(m²)
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="良品率" prop="ratio">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
style="width: 85%"
|
||||
v-model="dataForm.ratio"
|
||||
clearable
|
||||
placeholder="请输入良品率" />
|
||||
(%)
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import basicPage from '@/mixins/basic-page';
|
||||
import { getLineAll } from '@/api/base/productionLine';
|
||||
import { getcostOriginRatioHisPage } from '@/api/cost/costOriginRatioHis';
|
||||
import { getLinePage } from '@/api/base/productionLine';
|
||||
import { getcostOriginRatioHisPage,exportcostOriginRatioHisExcel } from '@/api/cost/costOriginRatioHis';
|
||||
import { parseTime } from '@/filter/code-filter';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
const tableProps = [
|
||||
@@ -52,10 +52,12 @@ const tableProps = [
|
||||
prop: 'recTime',
|
||||
label: '日期',
|
||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
||||
width:130,
|
||||
},
|
||||
{
|
||||
prop: 'bindObjectName',
|
||||
label: '产线',
|
||||
width:145,
|
||||
},
|
||||
{
|
||||
prop: 'thick',
|
||||
@@ -128,6 +130,15 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'warning',
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
statisticType: 1,
|
||||
@@ -148,8 +159,13 @@ export default {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
getLineAll().then((response) => {
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
const params ={
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
pdType: 1
|
||||
}
|
||||
getLinePage(params).then((response) => {
|
||||
this.formConfig[1].selectOptions = response.data.list;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@@ -172,7 +188,8 @@ export default {
|
||||
case 'export':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.name = val.name;
|
||||
this.listQuery.bindObjectId = val.name || null;
|
||||
this.listQuery.statisticType = val.statisticType || 1;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime
|
||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||
@@ -195,6 +212,25 @@ export default {
|
||||
this.otherMethods(val);
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
let exportURL, title;
|
||||
exportURL = exportcostOriginRatioHisExcel;
|
||||
title = '原片成本-原片良品率';
|
||||
// 处理查询参数
|
||||
let params = { ...this.listQuery };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal
|
||||
.confirm('是否确认导出所有数据项?')
|
||||
.then(() => {
|
||||
return exportURL(params);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, title + '报表.xls');
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user