刘帅
This commit is contained in:
@@ -122,10 +122,10 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="零件状态" prop="零件状态" style="margin-left: 200px">
|
||||
<el-select v-model="form.零件状态" placeholder="零件状态" size="small" clearable>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center style="min-height: 300px" width="400px">
|
||||
<el-form label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="零件状态">
|
||||
<el-select v-model="partStateValue1" placeholder="零件状态" size="small">
|
||||
<el-option
|
||||
v-for="item in partState"
|
||||
:key="item.value"
|
||||
@@ -135,8 +135,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
<el-button @click="cancel()">取消</el-button>
|
||||
<el-button type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -267,6 +267,7 @@ export default {
|
||||
groupNum: null, // 组件流水号
|
||||
partNumber: '', // 零件号
|
||||
partStateValue: null, // 零件状态
|
||||
partStateValue1: null,
|
||||
partState: [], // 零件状态数组
|
||||
partTypeValue: null, // 零件类型
|
||||
num: null,
|
||||
@@ -300,15 +301,7 @@ export default {
|
||||
}, {
|
||||
value: 2,
|
||||
label: '外协生产'
|
||||
}],
|
||||
form: {
|
||||
零件状态: null
|
||||
},
|
||||
rules: {
|
||||
零件状态: [
|
||||
{ required: true, message: '请选择零件状态', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -442,18 +435,14 @@ export default {
|
||||
this.dialogFormVisible3 = false
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form = {}
|
||||
console.log(row)
|
||||
this.title = '编辑'
|
||||
this.partStateValue1 = parseInt(row.考核状态) + 2
|
||||
this.dialogFormVisible4 = true
|
||||
this.num = row.工艺计划流水号
|
||||
},
|
||||
submitEdit(formName) { // 提交编辑
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editData(this.num, this.form.零件状态).then(response => {
|
||||
submitEdit() { // 提交编辑
|
||||
editData(this.num, this.partStateValue1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible4 = false
|
||||
@@ -461,15 +450,9 @@ export default {
|
||||
this.searchData()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel(formName) { // 取消
|
||||
this.form = {}
|
||||
cancel() { // 取消
|
||||
this.dialogFormVisible4 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
|
||||
Reference in New Issue
Block a user