更新plus

This commit is contained in:
2024-12-25 18:08:09 +08:00
parent f49879b7aa
commit ec00532542
5 changed files with 201 additions and 110 deletions

View File

@@ -17,25 +17,25 @@
<tbody>
<tr v-if="dataList.length>0" v-for="(item,index) in dataList">
<td class="hxjx_table_btnColumn"
:class="[{table_td_warn: item.operation==1},{table_td_error:item.state==3}]"
:class="[{table_td_warn: item.operation===1},{table_td_error:item.state===3}]"
>{{ index + 1 }}
</td>
<td class="hxjx_table_btnColumn"
:class="[{table_td_warn: item.operation==1},{table_td_error:item.state==3}]"
:class="[{table_td_warn: item.operation===1},{table_td_error:item.state===3}]"
>{{ item.id }}
</td>
<td class="hxjx_table_btnColumn"
:class="[{table_td_warn: item.operation==1},{table_td_error:item.state==3}]"
:class="[{table_td_warn: item.operation===1},{table_td_error:item.state===3}]"
>
{{ item.specification }}
</td>
<td class="hxjx_table_btnColumn"
:class="[{table_td_warn: item.operation==1},{table_td_error:item.state==3}]"
:class="[{table_td_warn: item.operation===1},{table_td_error:item.state===3}]"
>
{{ item.technology }}
</td>
<td class="hxjx_table_btnColumn"
:class="[{table_td_warn: item.operation==1},{table_td_error:item.state==3}]"
:class="[{table_td_warn: item.operation===1},{table_td_error:item.state===3}]"
>{{ item.diameter }}
</td>
</tr>
@@ -97,18 +97,18 @@
</td>
<tr v-for="(item,index) in passList">
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation==1}">{{ item.step }}</td>
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation==1}">
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation===1}">{{ item.step }}</td>
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation===1}">
{{ item.reduction }}
</td>
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation==1}">{{ item.setValue }}
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation===1}">{{ item.setValue }}
</td>
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation==1}">{{ item.angle }}</td>
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation==1}">
<div class="circle_finish" v-if="item.state==1"></div>
<div class="circle_error" v-if="item.state==2"></div>
<div class="circle_unstart" v-if="item.state==0 && item.operation===1"></div>
<div class="circle_unstart2" v-if="item.state==0 && item.operation!==1"></div>
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation===1}">{{ item.angle }}</td>
<td class="hxjx_table_btnColumn" :class="{table_td_unstart: item.operation===1}">
<div class="circle_finish" v-if="item.state===1"></div>
<div class="circle_error" v-if="item.state===2"></div>
<div class="circle_unstart" v-if="item.state===0 && item.operation===1"></div>
<div class="circle_unstart2" v-if="item.state===0 && item.operation!==1"></div>
</td>
</tr>
<tr v-if="passList==[]" v-for="item in 4">
@@ -277,30 +277,52 @@
<el-table
:data="finalData"
stripe
style="width: 100%"
>
style="width: 100%">
<el-table-column type="index" label="序号"></el-table-column>
<el-table-column
prop="id"
label="钽靶批号"
width="180"
>
<templete slot-scope="scope">
<div v-if="scope.row.id">{{ scope.row.id }}</div>
<div class="kong" v-else>-</div>
</templete>
</el-table-column>
<el-table-column
prop="finalWidth"
label="最终厚度"
<el-table-column
prop="width"
label="轧前厚度"
width="180"
>
<templete slot-scope="scope">
<el-input v-if="scope.row.id && scope.row.state!=3" v-model="scope.row.finalWidth"
placeholder="请输入该批号的最终厚度"
<div v-if="scope.row.width">{{ scope.row.width }}</div>
<div class="kong" v-else>-</div>
</templete>
</el-table-column>
<el-table-column
prop="finalWidth"
label="最终厚度D1"
>
<templete slot-scope="scope">
<el-input v-if="scope.row.id && scope.row.state!==3" v-model="scope.row.finalWidth"
placeholder="请输入该批号的最终厚度1"
></el-input>
<el-input v-if="scope.row.id && scope.row.state==3" v-model="scope.row.finalWidth"
<el-input v-if="scope.row.id && scope.row.state===3" v-model="scope.row.finalWidth"
placeholder="该批次发生异常" disabled
></el-input>
<div class="kong" v-if="!scope.row.id">-</div>
</templete>
</el-table-column>
<el-table-column
prop="finalWidth2"
label="最终厚度D2"
>
<templete slot-scope="scope">
<el-input v-if="scope.row.id && scope.row.state!==3" v-model="scope.row.finalWidth2"
placeholder="请输入该批号的最终厚度2"
></el-input>
<el-input v-if="scope.row.id && scope.row.state===3" v-model="scope.row.finalWidth2"
placeholder="该批次发生异常" disabled
></el-input>
<div class="kong" v-if="!scope.row.id">-</div>
@@ -308,13 +330,51 @@
</el-table-column>
<el-table-column
prop="finalDiameter"
label="最终直径"
label="最终直径L1"
>
<templete slot-scope="scope">
<el-input v-if="scope.row.id && scope.row.state!=3" v-model="scope.row.finalDiameter"
placeholder="请输入该批号的最终直径"
<el-input v-if="scope.row.id && scope.row.state!==3" v-model="scope.row.finalDiameter"
placeholder="请输入该批号的最终直径1"
></el-input>
<el-input v-if="scope.row.id && scope.row.state==3 " placeholder="该批次发生异常" disabled></el-input>
<el-input v-if="scope.row.id && scope.row.state===3 " placeholder="该批次发生异常" disabled></el-input>
<div class="kong" v-if="!scope.row.id">-</div>
</templete>
</el-table-column>
<el-table-column
prop="finalDiameter2"
label="最终直径L2"
>
<templete slot-scope="scope">
<el-input v-if="scope.row.id && scope.row.state!==3" v-model="scope.row.finalDiameter2"
placeholder="请输入该批号的最终直径2"
></el-input>
<el-input v-if="scope.row.id && scope.row.state===3 " placeholder="该批次发生异常" disabled></el-input>
<div class="kong" v-if="!scope.row.id">-</div>
</templete>
</el-table-column>
<el-table-column
prop="createBy"
label="轧制人员1"
>
<templete slot-scope="scope">
<el-input v-if="scope.row.id && scope.row.state!==3" v-model="scope.row.createBy"
placeholder="请输入轧制人员"
></el-input>
<el-input v-if="scope.row.id && scope.row.state===3 " placeholder="该批次发生异常" disabled></el-input>
<div class="kong" v-if="!scope.row.id">-</div>
</templete>
</el-table-column>
<el-table-column
prop="updateBy"
label="轧制人员2"
>
<templete slot-scope="scope">
<el-input v-if="scope.row.id && scope.row.state!==3" v-model="scope.row.updateBy"
placeholder="请输入轧制人员2"
></el-input>
<el-input v-if="scope.row.id && scope.row.state===3 " placeholder="该批次发生异常" disabled></el-input>
<div class="kong" v-if="!scope.row.id">-</div>
</templete>
</el-table-column>
@@ -328,12 +388,12 @@
</template>
<script>
import { messageData, messageUpdate } from '@/api/system/resource'
import {messageData, messageUpdate} from '@/api/system/resource'
import {
listMaterial,
materialFinalData,
materialUpdate,
stepCheck, stepPLC, stepProcess,
stepPLC, stepProcess,
stepSubmit,
stepUpdate
} from '@/api/system/process'
@@ -343,7 +403,7 @@ import {
materialNextStepFlagError, stepCheckAbnormal, stepFinishError,
stepNextError
} from '@/api/system/abnormal'
import { getFaultMessage, newIP } from '@/api/system/common'
import {getFaultMessage, newIP} from '@/api/system/common'
export default {
name: 'index',
@@ -382,6 +442,7 @@ export default {
nextStepFlagError: -1,
messageData: {},
newHTML: true,
processBatchId:0,
nowPass: {},
nextStepLoading: false
}
@@ -399,8 +460,8 @@ export default {
},
submit(state) {
// 获取正在运行的对象
this.submitButton = false
let step = this.passList.filter(item => item.operation === 1)[0]
if (state === 2) {
if (confirm('是否将钽靶【' + step.materialId + '】移动至异常品内处理?')) {
@@ -413,7 +474,7 @@ export default {
materialCheckFlagError(this.processing).then(res => {
this.nextStepFlagError = step.state
this.nextMaterial()
if (res.data === 0) {
if (res.data === 1) {
this.$notify({
title: '提醒',
message: '该道次已完成,请点击下道次'
@@ -430,15 +491,16 @@ export default {
let step = this.passList.filter(item => item.operation === 1)[0]
step.state = 1
stepUpdate(step).then(res => {
this.getStepDataList()
materialCheckFlagError(material).then(res => {
this.nextStepFlagError = step.state
this.nextMaterial()
if (res.data === 0) {
if (res.data === 1) {
this.checkFinal()
this.$notify({
title: '提醒',
message: '该道次已完成,请点击下道次'
})
} else {
this.nextMaterial()
}
})
})
@@ -454,9 +516,9 @@ export default {
} else {
this.nextStepLoading = true
stepNextError(step).then(res => {
this.nextStepLoading = false
this.getDataList()
materialNextStepFlagError().then(res => {
this.nextStepLoading = false
this.submitButton = res.data === 0
})
})
@@ -470,14 +532,22 @@ export default {
let material = this.processing
material.stepFlag = stepFlag
materialNextError(material).then(res => {
this.getDataList()
// 表示这是第一次穷尽
if (this.finalFlag === 0) {
// 检测是否穷尽
this.checkFinal()
}
materialNextStepFlagError().then(res => {
this.submitButton = res.data === 0
if (res.data === 1) {
this.$notify({
title: '提示',
message: '该道次已完成,请点击下道次'
})
} else {
this.submitButton = res.data === 0
}
if (this.finalFlag === 0) {
// 检测是否穷尽
this.checkFinal()
}
})
})
}
@@ -491,6 +561,7 @@ export default {
if (res.data !== 0) {
materialNextStepFlagError().then(res => {
this.submitButton = res.data === 0
this.getDataList()
})
alert('开始轧制')
this.getDataList()
@@ -501,22 +572,26 @@ export default {
},
finishProcess() {
stepCheck(this.processing.batchId).then(res => {
if (res.data === 0) {
// get
stepFinishError(this.processing.batchId)
alert('该批次轧制完成')
this.dataList = []
this.passList = []
this.processing = { batchId: -1, id: null }
} else {
alert('该批次存在某道次尚未处理')
}
})
stepCheckAbnormal(this.processBatchId).then(res => {
if (res.data === 0) {
// get
stepFinishError(this.processBatchId).then(res => {
alert('该批次轧制完成')
})
this.dataList = []
this.passList = []
this.processing = {batchId: -1, id: null}
} else {
alert('该批次存在某道次尚未处理')
}
})
},
checkFinal() {
stepCheckAbnormal(this.processing.batchId).then(res => {
stepCheckAbnormal(this.processBatchId).then(res => {
console.log(res)
if (res.data === 0) {
this.finalFlag = 1
this.dialogVisible = true
@@ -540,6 +615,7 @@ export default {
getDataList() {
//state==0表示并未送进轧制页面的新进材料
let params = {
delFlag: 1,
state: 5
}
listMaterial(params).then(res => {
@@ -550,6 +626,7 @@ export default {
batchId: -1,
id: null
}
this.processBatchId = res.rows[0].batchId
materialNextStepFlagError().then(res => {
this.submitButton = res.data === 0
@@ -589,9 +666,9 @@ export default {
if (temp === 1) {
this.circleStart = 0
} else if (temp === 2) {
this.circleStart = 90
} else if (temp === 3) {
this.circleStart = 45
} else if (temp === 3) {
this.circleStart = 90
} else if (temp === 0) {
this.circleStart = 315
} else if (temp === 4) {