更新
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-button :disabled="isShow" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditData">补录完成日期</el-button>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 185px;" placeholder="机床号" @change="getGroup">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
@@ -22,6 +21,7 @@
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;margin:0px 10px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
|
||||
<el-button type="primary" class="el-icon-plus" size="small" style="margin: 0px 10px;" @click="addTableData()">加序</el-button>
|
||||
<el-button type="danger" class="el-icon-delete" size="small" style="margin: 0px 10px;" @click="deleteProcess()">删除加序</el-button>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col style="width: 550px">
|
||||
@@ -35,7 +35,8 @@
|
||||
highlight-current-row
|
||||
empty-text=" "
|
||||
border
|
||||
@current-change="getRow">
|
||||
@current-change="getRow"
|
||||
@row-click="getID">
|
||||
<el-table-column align="center" label="序号" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
@@ -78,7 +79,7 @@
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:row-class-name="tableRowClassName"
|
||||
:row-class-name="tableRowClassName1"
|
||||
loading="loading"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
@@ -247,7 +248,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit, initProcessNumber, addProcess } from '@/api/ManufacturingCenter/AddingOrder'
|
||||
import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit, initProcessNumber, addProcess, deleteProcess } from '@/api/ManufacturingCenter/AddingOrder'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
export default {
|
||||
@@ -267,6 +268,7 @@ export default {
|
||||
pageCurrent: 1,
|
||||
pageSize: 100,
|
||||
total: 0,
|
||||
Id: '',
|
||||
ProcessNumber: [], // 工艺
|
||||
tableData1: [], // 工序表
|
||||
radio: '',
|
||||
@@ -318,6 +320,47 @@ export default {
|
||||
addTableData() {
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
deleteProcess() {
|
||||
this.$confirm('确定删除该合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.Id !== 0) {
|
||||
deleteProcess(this.Id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.tableData1 = []
|
||||
gettabledata1(this.process).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData1.push({
|
||||
ID: response.data[i].ID,
|
||||
工序顺序: response.data[i].工序顺序,
|
||||
工艺名称: response.data[i].工艺名称,
|
||||
序间质检: response.data[i].质检结果,
|
||||
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
|
||||
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
|
||||
操作者: response.data[i].操作者,
|
||||
不合格数量: response.data[i].不合格数量,
|
||||
质检数量: response.data[i].数量,
|
||||
工序流水号: response.data[i].工序流水号
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.error('只能删除加序')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
getMachine() {
|
||||
if (Cookie.get('machineValue') !== undefined) {
|
||||
this.Machine = ''
|
||||
@@ -400,6 +443,7 @@ export default {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData.push({
|
||||
工艺计划流水号: response.data.rows[i].工艺计划流水号,
|
||||
考核状态: response.data.rows[i].考核状态,
|
||||
序号: response.data.rows[i].序号,
|
||||
跟单号: response.data.rows[i].跟单号,
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
@@ -415,7 +459,11 @@ export default {
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
}, // 获取工序表
|
||||
},
|
||||
getID(row) {
|
||||
this.Id = row.ID
|
||||
},
|
||||
// 获取工序表
|
||||
getCurrentRow(row) {
|
||||
this.completeTime = ''
|
||||
this.dateOfProduction = ''
|
||||
@@ -428,6 +476,7 @@ export default {
|
||||
if (response.data.length !== 0) {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData1.push({
|
||||
ID: response.data[i].ID,
|
||||
工序顺序: response.data[i].工序顺序,
|
||||
工艺名称: response.data[i].工艺名称,
|
||||
序间质检: response.data[i].质检结果,
|
||||
@@ -450,6 +499,7 @@ export default {
|
||||
this.form.完成时间 = ''
|
||||
},
|
||||
getRow(row) {
|
||||
this.Id = row.ID
|
||||
this.completeTime = row.完成日期
|
||||
this.dateOfProduction = row.排产日期
|
||||
this.processSerialNumber = row.工序流水号
|
||||
@@ -510,6 +560,25 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('加序成功')
|
||||
this.dialogFormVisible2 = false
|
||||
this.tableData1 = []
|
||||
gettabledata1(this.process).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData1.push({
|
||||
ID: response.data[i].ID,
|
||||
工序顺序: response.data[i].工序顺序,
|
||||
工艺名称: response.data[i].工艺名称,
|
||||
序间质检: response.data[i].质检结果,
|
||||
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
|
||||
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
|
||||
操作者: response.data[i].操作者,
|
||||
不合格数量: response.data[i].不合格数量,
|
||||
质检数量: response.data[i].数量,
|
||||
工序流水号: response.data[i].工序流水号
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('加序失败')
|
||||
}
|
||||
@@ -526,6 +595,13 @@ export default {
|
||||
this.dialogFormVisible = false
|
||||
this.getCurrentRow(this.row2)
|
||||
},
|
||||
// 考核状态变色
|
||||
tableRowClassName1({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
if (parseInt(row.考核状态) > 6) {
|
||||
return 'CompleteColor'
|
||||
}
|
||||
},
|
||||
// 完成日期变色
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
|
||||
Reference in New Issue
Block a user