From 03a1e50fa18c4311235be65a8d3fb74ee9692134 Mon Sep 17 00:00:00 2001 From: liushuai Date: Tue, 27 Nov 2018 14:39:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=98=E5=B8=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManufacturingCenter/StatusQuery/index.vue | 55 +++++++------------ 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/src/views/ManufacturingCenter/StatusQuery/index.vue b/src/views/ManufacturingCenter/StatusQuery/index.vue index d82822f5..114b821e 100644 --- a/src/views/ManufacturingCenter/StatusQuery/index.vue +++ b/src/views/ManufacturingCenter/StatusQuery/index.vue @@ -122,10 +122,10 @@ - - - - + + + + @@ -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,34 +435,24 @@ 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 => { - if (response.data[0].result === '1') { - this.$message.success('编辑成功') - this.dialogFormVisible4 = false - this.pageCurrent = 1 - this.searchData() - } else { this.$message.error('编辑失败') } - }) - } else { - return false - } + submitEdit() { // 提交编辑 + editData(this.num, this.partStateValue1).then(response => { + if (response.data[0].result === '1') { + this.$message.success('编辑成功') + this.dialogFormVisible4 = false + this.pageCurrent = 1 + this.searchData() + } else { this.$message.error('编辑失败') } }) }, - cancel(formName) { // 取消 - this.form = {} + cancel() { // 取消 this.dialogFormVisible4 = false - this.$refs[formName].resetFields() }, handleSizeChange(val) { this.pageSize = val