-
-
-
-
-
-
-
-
-
-
- 机床名称:
-
+
+
+
{{ item.value2 }}
-
-
-
-
-
-
-
- 分组:
-
+
- 零件图号:
-
- 查询
-
-
-
-
-
-
-
-
- {{ scope.row.零件图号 }}
-
-
-
-
- {{ scope.row.零件名称 }}
-
-
-
-
- {{ scope.row.材料 }}
-
-
-
-
- {{ scope.row.零件类型名称 }}
-
-
-
-
- {{ scope.row.批次数量 }}
-
-
-
-
-
-
-
-
-
-
-
-
- 未加工
- 已完成
- 备料
- 停产
-
-
-
-
-
-
-
-
-
- 是
- 否
-
-
-
-
- {{ scope.row.工艺名称 }}
-
-
-
-
-
-
-
-
-
- {{ scope.row.机加工开始时间 }}
-
-
-
-
- {{ scope.row.机加工结束时间 }}
-
-
-
-
- {{ scope.row.计划日期 }}
-
-
-
-
- {{ scope.row.工序工时 }}
-
-
-
-
+
+ 查询
+
+
+
+
+ {{ scope.row.零件图号 }}
+
+
+
+
+ {{ scope.row.零件名称 }}
+
+
+
+
+ {{ scope.row.材料 }}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.批次数量 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 未加工
+ 已完成
+ 备料
+ 停产
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.工艺名称 }}
+
+
+
+
+ {{ scope.row.计划日期 }}
+
+
+
+
+ {{ scope.row.工序工时 }}
+
+
+
+
+
@@ -161,6 +123,7 @@ export default {
Num: [], // 分组
count: 0, // 计数器 (表二是否有外协工序)
InOut: 1, // 工序间是否外协变量 1自家 2外协
+ index: 0, // 当前点击行(改变颜色不刷新用)
num1: '',
checkBox: [],
loading1: false,
@@ -170,7 +133,7 @@ export default {
tableData1: [], // 表格数据
tableData2: [],
total1: null, // 总条数
- pageSize1: 10, // 每页显示条数
+ pageSize1: 50, // 每页显示条数
pageCurrent1: 1
}
},
@@ -254,10 +217,6 @@ export default {
this.checkBox = []
this.tableData2 = []
searchTable2(row.工艺计划流水号).then(response => {
- for (let i = 0; i < response.data.length; i++) {
- console.log(response.data[i].工序顺序)
- }
- console.log(response.data, 1111111)
this.num1 = row.工艺计划流水号
if (response.data.length === 0) {
this.loading0 = false
@@ -280,9 +239,19 @@ export default {
this.loading2 = false
})
},
+ tableData1ClassName({ row, rowIndex }) {
+ row.index = rowIndex
+ if (row.工序间是否外协 === 2) {
+ return 'XJWXwx'
+ }
+ if (parseInt(row.工序状态) !== 3 || parseInt(row.工艺编号) === 29) {
+ return 'XJWXywc'
+ }
+ },
// 修改外协状态
edit(index, row) {
this.count = 0
+ this.index = row.index
for (let i = 0; i < this.tableData2.length; i++) {
if (this.checkBox[i] === false) {
this.count = this.count + 1
@@ -296,68 +265,62 @@ export default {
edit(row.工序流水号, this.InOut).then(response => {
edit2(row.工序流水号, row.工艺计划流水号, 1).then(response => {
this.$message.success('工序外协状态更改成功')
- this.loading2 = true
- this.checkBox = []
- this.tableData2 = []
- searchTable2(this.num1).then(response => {
- for (let i = 0; i < response.data.length; i++) {
- console.log(response.data[i].工序顺序)
- }
- console.log(response.data, 1111111)
- if (response.data.length === 0) {
- this.loading0 = false
- } else {
- for (let i = 0; i < response.data.length; i++) {
- if (response.data[i].工序间是否外协 === 1) {
- this.checkBox.push(false)
- } else {
- this.checkBox.push(true)
- }
- }
- for (let i = 0; i < response.data.length; i++) {
- response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
- response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
- response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
- }
- this.tableData2 = response.data
- }
- }).then(() => {
- this.loading2 = false
- })
+ this.tableData2[this.index].工序间是否外协 = 2
+ // this.loading2 = true
+ // this.checkBox = []
+ // this.tableData2 = []
+ // searchTable2(this.num1).then(response => {
+ // if (response.data.length === 0) {
+ // this.loading0 = false
+ // } else {
+ // for (let i = 0; i < response.data.length; i++) {
+ // if (response.data[i].工序间是否外协 === 1) {
+ // this.checkBox.push(false)
+ // } else {
+ // this.checkBox.push(true)
+ // }
+ // }
+ // for (let i = 0; i < response.data.length; i++) {
+ // response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
+ // response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
+ // response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
+ // }
+ // this.tableData2 = response.data
+ // }
+ // }).then(() => {
+ // this.loading2 = false
+ // })
})
})
} else {
this.InOut = 1
edit(row.工序流水号, this.InOut).then(response => {
this.$message.success('工序外协状态更改成功')
- this.loading2 = true
- this.checkBox = []
- this.tableData2 = []
- searchTable2(this.num1).then(response => {
- for (let i = 0; i < response.data.length; i++) {
- console.log(response.data[i].工序顺序)
- }
- console.log(response.data, 1111111)
- if (response.data.length === 0) {
- this.loading0 = false
- } else {
- for (let i = 0; i < response.data.length; i++) {
- if (response.data[i].工序间是否外协 === 1) {
- this.checkBox.push(false)
- } else {
- this.checkBox.push(true)
- }
- }
- for (let i = 0; i < response.data.length; i++) {
- response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
- response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
- response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
- }
- this.tableData2 = response.data
- }
- }).then(() => {
- this.loading2 = false
- })
+ this.tableData2[this.index].工序间是否外协 = 1
+ // this.loading2 = true
+ // this.checkBox = []
+ // this.tableData2 = []
+ // searchTable2(this.num1).then(response => {
+ // if (response.data.length === 0) {
+ // this.loading0 = false
+ // } else {
+ // for (let i = 0; i < response.data.length; i++) {
+ // if (response.data[i].工序间是否外协 === 1) {
+ // this.checkBox.push(false)
+ // } else {
+ // this.checkBox.push(true)
+ // }
+ // }
+ // for (let i = 0; i < response.data.length; i++) {
+ // response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
+ // response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
+ // response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
+ // }
+ // this.tableData2 = response.data
+ // }
+ // }).then(() => {
+ // this.loading2 = false
+ // })
})
}
},
@@ -388,6 +351,13 @@ export default {