更新
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 150px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="加工日期"/>
|
||||
<el-select v-model="Person" style="width:100px" placeholder="操作工" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in Persons"
|
||||
@@ -66,6 +73,11 @@
|
||||
{{ scope.row.录入人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="录入时间" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作时间 ? scope.row.操作时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
@@ -76,6 +88,7 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
startTime: '',
|
||||
Person: '',
|
||||
Persons: [],
|
||||
partNumber: '',
|
||||
@@ -129,14 +142,14 @@ export default {
|
||||
}
|
||||
},
|
||||
saveDate() {
|
||||
if (this.Person && this.partNumber && this.procedureName && this.number && this.workTime) {
|
||||
saveDate(this.Person, this.partNumber, this.procedureName, this.id, this.number, this.workTime).then(response => {
|
||||
if (this.Person && this.partNumber && this.procedureName && this.number && this.workTime && this.startTime) {
|
||||
saveDate(this.Person, this.partNumber, this.procedureName, this.id, this.number, this.workTime, this.startTime).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.RemoveDate()
|
||||
this.fetchDate()
|
||||
} else {
|
||||
this.$message.success('增加失败')
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -144,14 +157,14 @@ export default {
|
||||
}
|
||||
},
|
||||
editDate() {
|
||||
if (this.Person && this.partNumber && this.procedureName && this.number && this.workTime) {
|
||||
editDate(this.ID, this.Person, this.partNumber, this.procedureName, this.id, this.number, this.workTime).then(response => {
|
||||
if (this.Person && this.partNumber && this.procedureName && this.number && this.workTime && this.startTime) {
|
||||
editDate(this.ID, this.Person, this.partNumber, this.procedureName, this.id, this.number, this.workTime, this.startTime).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.RemoveDate()
|
||||
this.fetchDate()
|
||||
} else {
|
||||
this.$message.success('编辑失败')
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -186,6 +199,7 @@ export default {
|
||||
this.procedureName = ''
|
||||
},
|
||||
searchTable(row) {
|
||||
this.startTime = row.加工日期
|
||||
this.Person = row.操作工流水号
|
||||
this.partNumber = row.零件图号
|
||||
this.procedureName = row.工序
|
||||
|
||||
Reference in New Issue
Block a user