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