更新plus
This commit is contained in:
@@ -43,7 +43,7 @@ export function materialNextStepFlagError(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询部门列表
|
// 异常轧制页面下道次
|
||||||
export function stepNextError(query) {
|
export function stepNextError(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/work/step/nextError',
|
url: '/work/step/nextError',
|
||||||
|
|||||||
@@ -17,25 +17,25 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="dataList.length>0" v-for="(item,index) in dataList">
|
<tr v-if="dataList.length>0" v-for="(item,index) in dataList">
|
||||||
<td class="hxjx_table_btnColumn"
|
<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 }}
|
>{{ index + 1 }}
|
||||||
</td>
|
</td>
|
||||||
<td class="hxjx_table_btnColumn"
|
<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 }}
|
>{{ item.id }}
|
||||||
</td>
|
</td>
|
||||||
<td class="hxjx_table_btnColumn"
|
<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 }}
|
{{ item.specification }}
|
||||||
</td>
|
</td>
|
||||||
<td class="hxjx_table_btnColumn"
|
<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 }}
|
{{ item.technology }}
|
||||||
</td>
|
</td>
|
||||||
<td class="hxjx_table_btnColumn"
|
<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 }}
|
>{{ item.diameter }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -97,18 +97,18 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<tr v-for="(item,index) in passList">
|
<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}">{{ 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.reduction }}
|
{{ item.reduction }}
|
||||||
</td>
|
</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>
|
||||||
<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}">{{ item.angle }}</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}">
|
||||||
<div class="circle_finish" v-if="item.state==1"></div>
|
<div class="circle_finish" v-if="item.state===1"></div>
|
||||||
<div class="circle_error" v-if="item.state==2"></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_unstart" v-if="item.state===0 && item.operation===1"></div>
|
||||||
<div class="circle_unstart2" v-if="item.state==0 && item.operation!==1"></div>
|
<div class="circle_unstart2" v-if="item.state===0 && item.operation!==1"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="passList==[]" v-for="item in 4">
|
<tr v-if="passList==[]" v-for="item in 4">
|
||||||
@@ -277,30 +277,52 @@
|
|||||||
<el-table
|
<el-table
|
||||||
:data="finalData"
|
:data="finalData"
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%">
|
||||||
|
<el-table-column type="index" label="序号"></el-table-column>
|
||||||
>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="id"
|
prop="id"
|
||||||
label="钽靶批号"
|
label="钽靶批号"
|
||||||
|
|
||||||
width="180"
|
|
||||||
>
|
>
|
||||||
<templete slot-scope="scope">
|
<templete slot-scope="scope">
|
||||||
<div v-if="scope.row.id">{{ scope.row.id }}</div>
|
<div v-if="scope.row.id">{{ scope.row.id }}</div>
|
||||||
<div class="kong" v-else>-</div>
|
<div class="kong" v-else>-</div>
|
||||||
</templete>
|
</templete>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
prop="finalWidth"
|
|
||||||
label="最终厚度"
|
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="width"
|
||||||
|
label="轧前厚度"
|
||||||
|
width="180"
|
||||||
>
|
>
|
||||||
<templete slot-scope="scope">
|
<templete slot-scope="scope">
|
||||||
<el-input v-if="scope.row.id && scope.row.state!=3" v-model="scope.row.finalWidth"
|
<div v-if="scope.row.width">{{ scope.row.width }}</div>
|
||||||
placeholder="请输入该批号的最终厚度"
|
<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>
|
||||||
<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
|
placeholder="该批次发生异常" disabled
|
||||||
></el-input>
|
></el-input>
|
||||||
<div class="kong" v-if="!scope.row.id">-</div>
|
<div class="kong" v-if="!scope.row.id">-</div>
|
||||||
@@ -308,13 +330,51 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="finalDiameter"
|
prop="finalDiameter"
|
||||||
label="最终直径"
|
label="最终直径L1"
|
||||||
>
|
>
|
||||||
<templete slot-scope="scope">
|
<templete slot-scope="scope">
|
||||||
<el-input v-if="scope.row.id && scope.row.state!=3" v-model="scope.row.finalDiameter"
|
<el-input v-if="scope.row.id && scope.row.state!==3" v-model="scope.row.finalDiameter"
|
||||||
placeholder="请输入该批号的最终直径"
|
placeholder="请输入该批号的最终直径1"
|
||||||
></el-input>
|
></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>
|
<div class="kong" v-if="!scope.row.id">-</div>
|
||||||
</templete>
|
</templete>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -328,12 +388,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { messageData, messageUpdate } from '@/api/system/resource'
|
import {messageData, messageUpdate} from '@/api/system/resource'
|
||||||
import {
|
import {
|
||||||
listMaterial,
|
listMaterial,
|
||||||
materialFinalData,
|
materialFinalData,
|
||||||
materialUpdate,
|
materialUpdate,
|
||||||
stepCheck, stepPLC, stepProcess,
|
stepPLC, stepProcess,
|
||||||
stepSubmit,
|
stepSubmit,
|
||||||
stepUpdate
|
stepUpdate
|
||||||
} from '@/api/system/process'
|
} from '@/api/system/process'
|
||||||
@@ -343,7 +403,7 @@ import {
|
|||||||
materialNextStepFlagError, stepCheckAbnormal, stepFinishError,
|
materialNextStepFlagError, stepCheckAbnormal, stepFinishError,
|
||||||
stepNextError
|
stepNextError
|
||||||
} from '@/api/system/abnormal'
|
} from '@/api/system/abnormal'
|
||||||
import { getFaultMessage, newIP } from '@/api/system/common'
|
import {getFaultMessage, newIP} from '@/api/system/common'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
@@ -382,6 +442,7 @@ export default {
|
|||||||
nextStepFlagError: -1,
|
nextStepFlagError: -1,
|
||||||
messageData: {},
|
messageData: {},
|
||||||
newHTML: true,
|
newHTML: true,
|
||||||
|
processBatchId:0,
|
||||||
nowPass: {},
|
nowPass: {},
|
||||||
nextStepLoading: false
|
nextStepLoading: false
|
||||||
}
|
}
|
||||||
@@ -399,8 +460,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
submit(state) {
|
submit(state) {
|
||||||
|
|
||||||
// 获取正在运行的对象
|
// 获取正在运行的对象
|
||||||
|
this.submitButton = false
|
||||||
let step = this.passList.filter(item => item.operation === 1)[0]
|
let step = this.passList.filter(item => item.operation === 1)[0]
|
||||||
if (state === 2) {
|
if (state === 2) {
|
||||||
if (confirm('是否将钽靶【' + step.materialId + '】移动至异常品内处理?')) {
|
if (confirm('是否将钽靶【' + step.materialId + '】移动至异常品内处理?')) {
|
||||||
@@ -413,7 +474,7 @@ export default {
|
|||||||
materialCheckFlagError(this.processing).then(res => {
|
materialCheckFlagError(this.processing).then(res => {
|
||||||
this.nextStepFlagError = step.state
|
this.nextStepFlagError = step.state
|
||||||
this.nextMaterial()
|
this.nextMaterial()
|
||||||
if (res.data === 0) {
|
if (res.data === 1) {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '提醒',
|
title: '提醒',
|
||||||
message: '该道次已完成,请点击下道次'
|
message: '该道次已完成,请点击下道次'
|
||||||
@@ -430,15 +491,16 @@ export default {
|
|||||||
let step = this.passList.filter(item => item.operation === 1)[0]
|
let step = this.passList.filter(item => item.operation === 1)[0]
|
||||||
step.state = 1
|
step.state = 1
|
||||||
stepUpdate(step).then(res => {
|
stepUpdate(step).then(res => {
|
||||||
this.getStepDataList()
|
|
||||||
materialCheckFlagError(material).then(res => {
|
materialCheckFlagError(material).then(res => {
|
||||||
this.nextStepFlagError = step.state
|
this.nextStepFlagError = step.state
|
||||||
this.nextMaterial()
|
if (res.data === 1) {
|
||||||
if (res.data === 0) {
|
this.checkFinal()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '提醒',
|
title: '提醒',
|
||||||
message: '该道次已完成,请点击下道次'
|
message: '该道次已完成,请点击下道次'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.nextMaterial()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -454,9 +516,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.nextStepLoading = true
|
this.nextStepLoading = true
|
||||||
stepNextError(step).then(res => {
|
stepNextError(step).then(res => {
|
||||||
|
this.nextStepLoading = false
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
materialNextStepFlagError().then(res => {
|
materialNextStepFlagError().then(res => {
|
||||||
this.nextStepLoading = false
|
|
||||||
this.submitButton = res.data === 0
|
this.submitButton = res.data === 0
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -470,14 +532,22 @@ export default {
|
|||||||
let material = this.processing
|
let material = this.processing
|
||||||
material.stepFlag = stepFlag
|
material.stepFlag = stepFlag
|
||||||
materialNextError(material).then(res => {
|
materialNextError(material).then(res => {
|
||||||
|
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
// 表示这是第一次穷尽
|
// 表示这是第一次穷尽
|
||||||
if (this.finalFlag === 0) {
|
|
||||||
// 检测是否穷尽
|
|
||||||
this.checkFinal()
|
|
||||||
}
|
|
||||||
materialNextStepFlagError().then(res => {
|
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) {
|
if (res.data !== 0) {
|
||||||
materialNextStepFlagError().then(res => {
|
materialNextStepFlagError().then(res => {
|
||||||
this.submitButton = res.data === 0
|
this.submitButton = res.data === 0
|
||||||
|
this.getDataList()
|
||||||
})
|
})
|
||||||
alert('开始轧制')
|
alert('开始轧制')
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
@@ -501,22 +572,26 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
finishProcess() {
|
finishProcess() {
|
||||||
stepCheck(this.processing.batchId).then(res => {
|
|
||||||
if (res.data === 0) {
|
stepCheckAbnormal(this.processBatchId).then(res => {
|
||||||
// get
|
if (res.data === 0) {
|
||||||
stepFinishError(this.processing.batchId)
|
// get
|
||||||
alert('该批次轧制完成')
|
stepFinishError(this.processBatchId).then(res => {
|
||||||
this.dataList = []
|
alert('该批次轧制完成')
|
||||||
this.passList = []
|
})
|
||||||
this.processing = { batchId: -1, id: null }
|
this.dataList = []
|
||||||
} else {
|
this.passList = []
|
||||||
alert('该批次存在某道次尚未处理')
|
this.processing = {batchId: -1, id: null}
|
||||||
}
|
} else {
|
||||||
})
|
alert('该批次存在某道次尚未处理')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
checkFinal() {
|
checkFinal() {
|
||||||
stepCheckAbnormal(this.processing.batchId).then(res => {
|
stepCheckAbnormal(this.processBatchId).then(res => {
|
||||||
|
console.log(res)
|
||||||
if (res.data === 0) {
|
if (res.data === 0) {
|
||||||
this.finalFlag = 1
|
this.finalFlag = 1
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
@@ -540,6 +615,7 @@ export default {
|
|||||||
getDataList() {
|
getDataList() {
|
||||||
//state==0表示并未送进轧制页面的新进材料
|
//state==0表示并未送进轧制页面的新进材料
|
||||||
let params = {
|
let params = {
|
||||||
|
delFlag: 1,
|
||||||
state: 5
|
state: 5
|
||||||
}
|
}
|
||||||
listMaterial(params).then(res => {
|
listMaterial(params).then(res => {
|
||||||
@@ -550,6 +626,7 @@ export default {
|
|||||||
batchId: -1,
|
batchId: -1,
|
||||||
id: null
|
id: null
|
||||||
}
|
}
|
||||||
|
this.processBatchId = res.rows[0].batchId
|
||||||
|
|
||||||
materialNextStepFlagError().then(res => {
|
materialNextStepFlagError().then(res => {
|
||||||
this.submitButton = res.data === 0
|
this.submitButton = res.data === 0
|
||||||
@@ -589,9 +666,9 @@ export default {
|
|||||||
if (temp === 1) {
|
if (temp === 1) {
|
||||||
this.circleStart = 0
|
this.circleStart = 0
|
||||||
} else if (temp === 2) {
|
} else if (temp === 2) {
|
||||||
this.circleStart = 90
|
|
||||||
} else if (temp === 3) {
|
|
||||||
this.circleStart = 45
|
this.circleStart = 45
|
||||||
|
} else if (temp === 3) {
|
||||||
|
this.circleStart = 90
|
||||||
} else if (temp === 0) {
|
} else if (temp === 0) {
|
||||||
this.circleStart = 315
|
this.circleStart = 315
|
||||||
} else if (temp === 4) {
|
} else if (temp === 4) {
|
||||||
|
|||||||
@@ -283,14 +283,15 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
success() {
|
success() {
|
||||||
if (this.dataList.length == 0) {
|
if (this.dataList.length === 0) {
|
||||||
alert('钽靶原料列表为空,不可提交')
|
alert('钽靶原料列表为空,不可提交')
|
||||||
return
|
return
|
||||||
// TODO 考虑原料列表队列问题 及上一批材料未处理完毕 又来了一批材料
|
// TODO 考虑原料列表队列问题 及上一批材料未处理完毕 又来了一批材料
|
||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
batchId: this.dataList[0].batchId,
|
batchId: this.dataList[0].batchId,
|
||||||
state: 4
|
state: 4,
|
||||||
|
delFlag: 1,
|
||||||
}
|
}
|
||||||
materialSubmit(data).then(res => {
|
materialSubmit(data).then(res => {
|
||||||
if (res.data !== 0) {
|
if (res.data !== 0) {
|
||||||
@@ -312,7 +313,6 @@ export default {
|
|||||||
delFlag: 1
|
delFlag: 1
|
||||||
}
|
}
|
||||||
materialAbnormalList(params).then(res => {
|
materialAbnormalList(params).then(res => {
|
||||||
this.dataList = res.rows
|
|
||||||
this.dataList = res.rows
|
this.dataList = res.rows
|
||||||
if (res.rows[0].id != null && this.indexSelect === 0) {
|
if (res.rows[0].id != null && this.indexSelect === 0) {
|
||||||
this.getTechnologyInfo(0)
|
this.getTechnologyInfo(0)
|
||||||
|
|||||||
@@ -387,7 +387,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { messageData, messageUpdate } from '@/api/system/resource'
|
import {messageData, messageUpdate} from '@/api/system/resource'
|
||||||
import {
|
import {
|
||||||
listMaterial,
|
listMaterial,
|
||||||
materialCheckFlag, materialFinalData, materialNext,
|
materialCheckFlag, materialFinalData, materialNext,
|
||||||
@@ -397,7 +397,7 @@ import {
|
|||||||
stepSubmit,
|
stepSubmit,
|
||||||
stepUpdate
|
stepUpdate
|
||||||
} from '@/api/system/process'
|
} from '@/api/system/process'
|
||||||
import { getFaultMessage, newIP } from '@/api/system/common'
|
import {getFaultMessage, newIP} from '@/api/system/common'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
@@ -471,16 +471,15 @@ export default {
|
|||||||
stepSubmit(step).then(res => {
|
stepSubmit(step).then(res => {
|
||||||
// 判断目前的物料是否为第一个或者最后一个
|
// 判断目前的物料是否为第一个或者最后一个
|
||||||
materialCheckFlag(this.processing).then(res => {
|
materialCheckFlag(this.processing).then(res => {
|
||||||
if (res.data === 0) {
|
this.stepFlag = step.state
|
||||||
|
this.nextMaterial()
|
||||||
|
if (res.data === 1) {
|
||||||
// 表示当前料进行处理了
|
// 表示当前料进行处理了
|
||||||
this.stepFlag = step.state
|
|
||||||
this.nextMaterial()
|
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '该道次已完成,请点击下道次'
|
message: '该道次已完成,请点击下道次'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -491,12 +490,14 @@ export default {
|
|||||||
stepUpdate(step).then(res => {
|
stepUpdate(step).then(res => {
|
||||||
materialCheckFlag(processing).then(res => {
|
materialCheckFlag(processing).then(res => {
|
||||||
this.stepFlag = step.state
|
this.stepFlag = step.state
|
||||||
this.nextMaterial()
|
if (res.data === 1) {
|
||||||
if (res.data === 0) {
|
this.checkFinal()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: '该道次已完成,请点击下道次'
|
message: '该道次已完成,请点击下道次'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.nextMaterial()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -516,9 +517,7 @@ export default {
|
|||||||
this.getDataList()
|
this.getDataList()
|
||||||
materialNextStepFlag().then(res => {
|
materialNextStepFlag().then(res => {
|
||||||
this.submitButton = res.data === 0
|
this.submitButton = res.data === 0
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -529,13 +528,29 @@ export default {
|
|||||||
let stepFlag = this.stepFlag
|
let stepFlag = this.stepFlag
|
||||||
if (step && step.state !== 0 && stepFlag !== -1 && stepFlag !== 0) {
|
if (step && step.state !== 0 && stepFlag !== -1 && stepFlag !== 0) {
|
||||||
let material = this.processing
|
let material = this.processing
|
||||||
|
|
||||||
// 这里又进行了一次校验
|
// 这里又进行了一次校验
|
||||||
material.stepFlag = stepFlag
|
material.stepFlag = stepFlag
|
||||||
materialNext(material).then(res => {
|
materialNext(material).then(res => {
|
||||||
|
if (res.data === 2) {
|
||||||
|
// 如果返回值为2表示全部发生异常了
|
||||||
|
this.finalFlag = 1
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.finalData = this.dataList
|
||||||
|
}
|
||||||
|
if (res.data === 0) {
|
||||||
|
// 返回值等于0 表示没有切换物料
|
||||||
|
|
||||||
|
}
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
materialNextStepFlag().then(res => {
|
materialNextStepFlag().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) {
|
if (this.finalFlag === 0) {
|
||||||
// 检测是否穷尽
|
// 检测是否穷尽
|
||||||
@@ -551,7 +566,8 @@ export default {
|
|||||||
state: 1
|
state: 1
|
||||||
}
|
}
|
||||||
materialStart(params).then(res => {
|
materialStart(params).then(res => {
|
||||||
if (res.data !== 0) {
|
if (res.data === 1) {
|
||||||
|
this.$message('开始轧制')
|
||||||
materialNextStepFlag().then(res => {
|
materialNextStepFlag().then(res => {
|
||||||
this.submitButton = res.data === 0
|
this.submitButton = res.data === 0
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
@@ -563,29 +579,25 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
finishProcess() {
|
finishProcess() {
|
||||||
if (this.processing.batchId === -1) {
|
stepCheck(this.processBatchId).then(res => {
|
||||||
alert('该批次存在某道次尚未处理')
|
if (res.data === 0) {
|
||||||
} else {
|
// get
|
||||||
stepCheck(this.processing.batchId).then(res => {
|
stepFinish(this.processBatchId).then(res => {
|
||||||
if (res.data === 0) {
|
alert('轧制完成')
|
||||||
// get
|
})
|
||||||
stepFinish(this.processing.batchId).then(res => {
|
|
||||||
alert('轧制完成')
|
|
||||||
})
|
|
||||||
|
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.passList = []
|
this.passList = []
|
||||||
this.processing = { batchId: -1, id: null }
|
this.processing = {batchId: -1, id: null}
|
||||||
} else {
|
} else {
|
||||||
alert('该批次存在某道次尚未处理')
|
alert('该批次存在某道次尚未处理')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
checkFinal() {
|
checkFinal() {
|
||||||
stepCheck(this.processing.batchId).then(res => {
|
stepCheck(this.processBatchId).then(res => {
|
||||||
// 返回值等于0说明都轧完了
|
// 返回值等于0说明都轧完了
|
||||||
if (res.data === 0) {
|
if (res.data === 0) {
|
||||||
this.finalFlag = 1
|
this.finalFlag = 1
|
||||||
@@ -607,7 +619,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getDataList() {
|
getDataList() {
|
||||||
|
|
||||||
//state==0表示并未送进轧制页面的新进材料
|
//state==0表示并未送进轧制页面的新进材料
|
||||||
let params = {
|
let params = {
|
||||||
state: 1
|
state: 1
|
||||||
@@ -615,13 +626,12 @@ export default {
|
|||||||
listMaterial(params).then(res => {
|
listMaterial(params).then(res => {
|
||||||
if (res.total !== 0) {
|
if (res.total !== 0) {
|
||||||
this.batchSize = res.total
|
this.batchSize = res.total
|
||||||
this.dataList = res.rows
|
|
||||||
|
|
||||||
this.processing = res.rows.filter(item => item.operation === 1)[0] ? res.rows.filter(item => item.operation === 1)[0] : {
|
this.processing = res.rows.filter(item => item.operation === 1)[0] ? res.rows.filter(item => item.operation === 1)[0] : {
|
||||||
batchId: -1,
|
batchId: -1,
|
||||||
id: null
|
id: null
|
||||||
}
|
}
|
||||||
|
this.processBatchId = res.rows[0].batchId
|
||||||
materialNextStepFlag().then(res => {
|
materialNextStepFlag().then(res => {
|
||||||
this.submitButton = res.data === 0
|
this.submitButton = res.data === 0
|
||||||
if (this.processing.state === 3) {
|
if (this.processing.state === 3) {
|
||||||
@@ -632,7 +642,7 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
if (this.processing.batchId != -1 && this.processing.state != 3) {
|
if (this.processing.batchId !== -1 && this.processing.state !== 3) {
|
||||||
this.getStepDataList()
|
this.getStepDataList()
|
||||||
if (this.newHTML) {
|
if (this.newHTML) {
|
||||||
this.submitButtonCheck()
|
this.submitButtonCheck()
|
||||||
@@ -640,6 +650,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.dataList = res.rows
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -650,7 +661,7 @@ export default {
|
|||||||
batchId: this.processing.batchId
|
batchId: this.processing.batchId
|
||||||
}
|
}
|
||||||
stepProcess(params).then(res => {
|
stepProcess(params).then(res => {
|
||||||
this.nowPass = res.data.filter(item => item.operation == 1)[0]
|
this.nowPass = res.data.filter(item => item.operation === 1)[0]
|
||||||
this.passList = res.data
|
this.passList = res.data
|
||||||
this.stepFlag = this.nowPass.state
|
this.stepFlag = this.nowPass.state
|
||||||
let nowPass = this.nowPass
|
let nowPass = this.nowPass
|
||||||
@@ -658,9 +669,9 @@ export default {
|
|||||||
if (temp === 1) {
|
if (temp === 1) {
|
||||||
this.circleStart = 0
|
this.circleStart = 0
|
||||||
} else if (temp === 2) {
|
} else if (temp === 2) {
|
||||||
this.circleStart = 90
|
|
||||||
} else if (temp === 3) {
|
|
||||||
this.circleStart = 45
|
this.circleStart = 45
|
||||||
|
} else if (temp === 3) {
|
||||||
|
this.circleStart = 90
|
||||||
} else if (temp === 0) {
|
} else if (temp === 0) {
|
||||||
this.circleStart = 315
|
this.circleStart = 315
|
||||||
} else if (temp === 4) {
|
} else if (temp === 4) {
|
||||||
@@ -705,14 +716,15 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
clearInterval(this.intervalTime)
|
// TODO
|
||||||
this.getDataList() // 接口方法
|
// clearInterval(this.intervalTime)
|
||||||
|
// this.getDataList() // 接口方法
|
||||||
this.intervalTime = setInterval(() => {
|
//
|
||||||
this.getFault()
|
// this.intervalTime = setInterval(() => {
|
||||||
this.getPLCData()
|
// this.getFault()
|
||||||
this.getDataList() // 接口方法
|
// this.getPLCData()
|
||||||
}, 2000)
|
// this.getDataList() // 接口方法
|
||||||
|
// }, 2000)
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
success() {
|
success() {
|
||||||
if (this.dataList.length == 0) {
|
if (this.dataList.length === 0) {
|
||||||
alert('钽靶原料列表为空,不可提交')
|
alert('钽靶原料列表为空,不可提交')
|
||||||
return
|
return
|
||||||
// TODO 考虑原料列表队列问题 及上一批材料未处理完毕 又来了一批材料
|
// TODO 考虑原料列表队列问题 及上一批材料未处理完毕 又来了一批材料
|
||||||
@@ -296,8 +296,10 @@ export default {
|
|||||||
alert('钽靶原料成功提交至轧制')
|
alert('钽靶原料成功提交至轧制')
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
|
|
||||||
} else {
|
} else if(res.data===0){
|
||||||
alert('提交失败,请检查工艺是否相同')
|
alert('提交失败,请检查工艺是否相同')
|
||||||
|
}else if (res.data ===2){
|
||||||
|
alert('提交失败,请检查此物料工艺是否存在于数据库中')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user