This commit is contained in:
2025-06-13 11:04:14 +08:00
parent b28816f515
commit 3e13028f9f
3 changed files with 230 additions and 66 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2024-09-05 15:33:16
* @LastEditTime: 2025-06-13 10:59:54
* @Description:
-->
<template>
@@ -15,7 +15,9 @@
label-width="80px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="产线" prop="bindObjectName">
<el-form-item
:label="activeName === 'his' ? '产线' : '工段'"
prop="bindObjectName">
<el-input
style="width: 100%"
v-model="dataForm.bindObjectName"
@@ -33,7 +35,7 @@
placeholder="选择所属日期"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="activeName === 'his'">
<el-form-item label="厚度" prop="thick">
<el-input-number
:min="0"
@@ -43,7 +45,7 @@
placeholder="请输入厚度" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="activeName === 'his'">
<el-form-item label="在线速度" prop="speed">
<el-input-number
:min="0"
@@ -53,7 +55,7 @@
placeholder="请输入在线速度" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="activeName === 'his'">
<el-form-item label="掰边宽度" prop="width">
<el-input-number
:min="0"
@@ -64,25 +66,27 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="拉引量" prop="inArea">
<el-form-item
:label="activeName === 'his' ? '拉引量' : '进片数'"
prop="inArea">
<el-input-number
:min="0"
style="width: 85%"
v-model="dataForm.inArea"
clearable
placeholder="请输入拉引量" />
()
clearable />
{{ activeName === 'his' ? '(m²)' : '片' }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="下片面积" prop="outArea">
<el-form-item
:label="activeName === 'his' ? '下片面积' : '出片数'"
prop="outArea">
<el-input-number
:min="0"
style="width: 85%"
v-model="dataForm.outArea"
clearable
placeholder="请输入下片面积" />
()
clearable />
{{ activeName === 'his' ? '(m²)' : '片' }}
</el-form-item>
</el-col>
<el-col :span="12">
@@ -129,10 +133,12 @@ export default {
recTime: undefined,
},
dataRule: {},
activeName: 'his',
};
},
methods: {
init(val, statisticType) {
init(val, statisticType, activeName) {
this.activeName = activeName;
this.visible = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
@@ -148,17 +154,22 @@ export default {
if (!valid) {
return false;
}
const udata = {
let udata = {
id: this.dataForm.id,
statisticType: this.dataForm.statisticType,
modifyThick: this.dataForm.thick,
modifySpeed: this.dataForm.speed,
modifyWidth: this.dataForm.width,
modifyInArea: this.dataForm.inArea,
modifyOutArea: this.dataForm.outArea,
modifyRatio:
this.dataForm.ratio >= 0 ? this.dataForm.ratio / 100 : '',
};
if (this.activeName === 'his') {
udata = {
...udata,
modifyThick: this.dataForm.thick,
modifySpeed: this.dataForm.speed,
modifyWidth: this.dataForm.width,
};
}
// 修改的提交
this.urlOptions.updateURL(udata).then((response) => {
this.$modal.msgSuccess('修改成功');