From 96770dd78faa0b7516980581b4879edf033cff45 Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Thu, 16 Apr 2020 16:02:22 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A1=E5=88=92=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ProjectPlanningManagementNew/index.vue | 180 +++++++++++++-----
1 file changed, 130 insertions(+), 50 deletions(-)
diff --git a/src/views/ManufacturingCenter/ProjectPlanningManagementNew/index.vue b/src/views/ManufacturingCenter/ProjectPlanningManagementNew/index.vue
index 0757269d..f607b0d5 100644
--- a/src/views/ManufacturingCenter/ProjectPlanningManagementNew/index.vue
+++ b/src/views/ManufacturingCenter/ProjectPlanningManagementNew/index.vue
@@ -21,7 +21,7 @@
查询
- 保存
+ 保存
签订日期:
@@ -36,7 +36,7 @@
-
+
@@ -97,11 +97,16 @@
{{ scope.row.项目计划制定人 }}
+
+
+ {{ scope.row.修改时间 }}
+
+
确定
编辑
- 取消
+ 取消
@@ -212,17 +217,17 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -336,7 +341,7 @@
确定
编辑
- 取消
+ 取消
删除
@@ -512,6 +517,7 @@ export default {
审图实际完成时间: response.data.rows[i].审图实际完成时间,
完成顺序: response.data.rows[i].完成顺序,
更新: response.data.rows[i].更新,
+ 修改时间: response.data.rows[i].修改时间,
项目流水号: response.data.rows[i].项目流水号,
机床流水号: response.data.rows[i].机床流水号,
项目生成: response.data.rows[i].项目生成,
@@ -544,32 +550,70 @@ export default {
}
})
},
- // 表格1保存
- editPro() {
+ // 表1 保存判断
+ limit1() {
if (this.项目流水号) {
- this.审图开始 ? this.审图开始 : this.审图开始 = null
- this.审图结束 ? this.审图结束 : this.审图结束 = null
- this.发图完成 ? this.发图完成 : this.发图完成 = null
- this.采购完成 ? this.采购完成 : this.采购完成 = null
- this.备料完成 ? this.备料完成 : this.备料完成 = null
- this.制造完成 ? this.制造完成 : this.制造完成 = null
- this.装配完成 ? this.装配完成 : this.装配完成 = null
- editTable(this.项目流水号, this.机床流水号, this.项目编号, this.设计者, this.审图开始, this.审图结束, '', this.发图完成, this.采购完成, this.备料完成, this.制造完成, this.装配完成, '', this.更新时间, this.id).then(response => {
- if (response.data[0].result === '1') {
- this.tableData.map(v => {
- if (v.项目流水号 === this.项目流水号) {
- v.项目编号 = this.项目编号
- }
- })
- this.$message.success('保存成功')
+ if (!this.设计者) {
+ this.$message.error('请输入设计者')
+ } else if (!this.项目编号) {
+ this.$message.error('请输入项目编号')
+ } else if (!this.审图开始) {
+ this.$message.error('请选择审图开始时间')
+ } else if (!this.审图结束) {
+ this.$message.error('请选择审图结束时间')
+ } else if (!this.发图完成) {
+ this.$message.error('请选择发图完成始时间')
+ } else if (!this.采购完成) {
+ this.$message.error('请选择采购完成时间')
+ } else if (!this.备料完成) {
+ this.$message.error('请选择备料完成时间')
+ } else if (!this.制造完成) {
+ this.$message.error('请选择制造完成时间')
+ } else if (!this.装配完成) {
+ this.$message.error('请选择装配完成时间')
+ } else {
+ if (this.审图结束 < this.审图开始) {
+ this.$message.error('审图结束时间应大于审图开始时间')
+ } else if (this.发图完成 < this.审图结束) {
+ this.$message.error('发图完成时间应大于审图结束时间')
+ } else if (this.采购完成 < this.发图完成) {
+ this.$message.error('采购完成时间应大于发图完成时间')
+ } else if (this.备料完成 < this.发图完成) {
+ this.$message.error('备料完成时间应大于发图完成时间')
+ } else if (this.制造完成 < this.发图完成) {
+ this.$message.error('制造完成时间应大于发图完成时间')
+ } else if (this.装配完成 < this.制造完成) {
+ this.$message.error('装配完成时间应大于制造完成时间')
} else {
- this.$message.error('信息修改失败')
+ this.editPro()
}
- })
+ }
} else {
this.$message.error('请先选择项目')
}
},
+ // 表格1保存
+ editPro() {
+ this.审图开始 ? this.审图开始 : this.审图开始 = null
+ this.审图结束 ? this.审图结束 : this.审图结束 = null
+ this.发图完成 ? this.发图完成 : this.发图完成 = null
+ this.采购完成 ? this.采购完成 : this.采购完成 = null
+ this.备料完成 ? this.备料完成 : this.备料完成 = null
+ this.制造完成 ? this.制造完成 : this.制造完成 = null
+ this.装配完成 ? this.装配完成 : this.装配完成 = null
+ editTable(this.项目流水号, this.机床流水号, this.项目编号, this.设计者, this.审图开始, this.审图结束, '', this.发图完成, this.采购完成, this.备料完成, this.制造完成, this.装配完成, '', this.更新时间, this.id).then(response => {
+ if (response.data[0].result === '1') {
+ this.tableData.map(v => {
+ if (v.项目流水号 === this.项目流水号) {
+ v.项目编号 = this.项目编号
+ }
+ })
+ this.$message.success('保存成功')
+ } else {
+ this.$message.error('信息修改失败')
+ }
+ })
+ },
// 查询表格2数据
openDialog() {
this.loading2 = true
@@ -595,7 +639,6 @@ export default {
}
})
searchTable2(this.机床流水号, this.radio).then(response => {
- console.log('')
if (response.data.length === 0) {
this.loading2 = false
} else {
@@ -628,7 +671,16 @@ export default {
计划完成时间: response.data[i].计划完成时间,
货期: response.data[i].货期,
实际完成时间: response.data[i].实际完成时间,
- 备注: response.data[i].备注
+ 备注: response.data[i].备注,
+ 组号_原: response.data[i].组号,
+ 任务名称_原: response.data[i].任务名称,
+ 负责人_原: response.data[i].负责人,
+ 接收任务时间_原: response.data[i].接收任务时间,
+ 任务开始时间_原: response.data[i].任务开始时间,
+ 计划完成时间_原: response.data[i].计划完成时间,
+ 货期_原: response.data[i].货期,
+ 实际完成时间_原: response.data[i].实际完成时间,
+ 备注_原: response.data[i].备注
})
}
}
@@ -690,7 +742,16 @@ export default {
计划完成时间: response.data[i].计划完成时间,
货期: response.data[i].货期,
实际完成时间: response.data[i].实际完成时间,
- 备注: response.data[i].备注
+ 备注: response.data[i].备注,
+ 组号_原: response.data[i].组号,
+ 任务名称_原: response.data[i].任务名称,
+ 负责人_原: response.data[i].负责人,
+ 接收任务时间_原: response.data[i].接收任务时间,
+ 任务开始时间_原: response.data[i].任务开始时间,
+ 计划完成时间_原: response.data[i].计划完成时间,
+ 货期_原: response.data[i].货期,
+ 实际完成时间_原: response.data[i].实际完成时间,
+ 备注_原: response.data[i].备注
})
}
}
@@ -700,19 +761,38 @@ export default {
},
// 表格2保存
confirmEdit2(row) {
- editTable2(row.组件计划流水号, row.组件流水号, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => {
- if (response.data[0].result === '1') {
- row.edit = false
- this.$notify({
- title: '成功',
- message: '信息修改成功',
- type: 'success'
- })
- this.searchTable2()
- } else {
- this.$message.error('信息修改失败')
- }
- })
+ if (row.任务开始时间 < row.接收任务时间) {
+ this.$message.error('任务开始时间应大于接收任务时间')
+ } else if (row.计划完成时间 < row.任务开始时间) {
+ this.$message.error('计划完成时间应大于任务开始时间')
+ } else {
+ editTable2(row.组件计划流水号, row.组件流水号, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => {
+ if (response.data[0].result === '1') {
+ row.edit = false
+ this.$notify({
+ title: '成功',
+ message: '信息修改成功',
+ type: 'success'
+ })
+ this.searchTable2()
+ } else {
+ this.$message.error('信息修改失败')
+ }
+ })
+ }
+ },
+ // 表格2取消
+ cennel(row) {
+ row.组号 = row.组号_原
+ row.任务名称 = row.任务名称_原
+ row.负责人 = row.负责人_原
+ row.接收任务时间 = row.接收任务时间_原
+ row.任务开始时间 = row.任务开始时间_原
+ row.计划完成时间 = row.计划完成时间_原
+ row.货期 = row.货期_原
+ row.实际完成时间 = row.实际完成时间_原
+ row.备注 = row.备注_原
+ row.edit = !row.edit
},
// 表格2删除
Delete(row) {