+
+
+
+
@@ -435,6 +402,9 @@
+
+
+
@@ -538,8 +508,8 @@ export default {
outNote: '' // 出库备注
},
rules2: { // 表单验证规则
- OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }],
- outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
+ OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }]
+ // outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
},
form3: { // 车间采购出库
OutNumber: '', // 出库数量
@@ -568,19 +538,19 @@ export default {
listLoading3: false,
PageCurrent: 1,
PageSize: 10,
- total: null,
+ total: 0,
PageCurrent1: 1,
PageSize1: 10,
- total1: null,
+ total1: 0,
PageCurrent2: 1,
PageSize2: 10,
- total2: null,
+ total2: 0,
PageCurrent3: 1,
PageSize3: 10,
- total3: null,
+ total3: 0,
PageCurrentx: 1,
PageSizex: 10,
- totalx: null,
+ totalx: 0,
materialName: '',
materialNumber: '',
materialType: '',
@@ -612,6 +582,8 @@ export default {
created() {
this.fetchData()
this.getpeopleid()
+ this.searchListinfor()
+ this.searchPartinfo()
},
methods: {
fetchData() {
@@ -621,7 +593,8 @@ export default {
getpeopleid() {
this.picikingPeople = this.id
},
- searchMachine() { // 查询机床
+ // 查询机床
+ searchMachine() {
this.MachineValue = ''
this.Machine = []
this.GroupNumValue = ''
@@ -640,7 +613,8 @@ export default {
}
})
},
- searchGroupList() { // 查询组号
+ // 查询组号
+ searchGroupList() {
this.GroupNumValue = ''
this.GroupNum = []
searchTeam(this.MachineValue).then(response => {
@@ -652,18 +626,13 @@ export default {
}
})
},
+ // 根据项目机床分组查零件/物料
searchPartinfo() {
this.tableDataPurchase = []
this.tableDataBasic = []
- if (this.ProjectValue !== null && this.ProjectValue !== '') {
- this.ProjectValue_check = 1
- }
- if (this.MachineValue !== null && this.MachineValue !== '') {
- this.MachineValue_check = 1
- }
- if (this.GroupNumValue !== null && this.GroupNumValue !== '') {
- this.GroupNumValue_check = 1
- }
+ this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
+ this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0
+ this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0
this.listLoading = true
this.listLoading1 = true
this.listLoadingx = true
@@ -697,13 +666,12 @@ export default {
this.tableDataBasic = response.data.rows
this.listLoading1 = false
this.total = response.data.total
- console.log(response)
})
searchHoursePart(this.PageCurrentx, this.PageSizex, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
+ console.log(response.data.rows)
this.tableDataHouse = response.data.rows
this.listLoadingx = false
this.totalx = response.data.total
- console.log(response)
})
},
handleSizeChange(val) {
@@ -746,7 +714,6 @@ export default {
this.tableData1 = response.data.rows
this.listLoading2 = false
this.total2 = response.data.total
- console.log(response)
})
},
handleSizeChange2(val) {
@@ -772,13 +739,21 @@ export default {
},
// 增加领料单
addListinfor() {
- addList(this.picikingPeople).then(response => {
- if (response.data[0].result === '1') {
- this.$message.success('增加成功')
- this.searchListinfor()
- } else {
- this.$message.error('增加失败')
- }
+ this.$confirm('确认创建新的领料单?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ addList(this.picikingPeople).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('增加成功')
+ this.searchListinfor()
+ } else {
+ this.$message.error('增加失败')
+ }
+ })
+ }).catch(() => {
+ this.$message('已取消操作')
})
},
// 删除领料单
@@ -789,14 +764,18 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- dropList(this.pickingListNumberx).then(response => {
- if (response.data[0].result === '1') {
- this.$message.success('删除成功')
- this.searchListinfor()
- } else {
- this.$message.error('数据占用')
- }
- })
+ if (this.tableDataPicking.length === 0) {
+ dropList(this.pickingListNumberx).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('删除成功')
+ this.searchListinfor()
+ } else {
+ this.$message.error('数据占用')
+ }
+ })
+ } else {
+ this.$message.error('数据占用')
+ }
}).catch(() => {
this.$message({
type: 'info',
@@ -816,6 +795,7 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchListDetailt()
+ this.searchPartinfo()
} else {
this.$message.error('数据占用')
}
@@ -830,6 +810,7 @@ export default {
// 选择领料单
chooseListinfor(row) {
this.pickingListNumberx = row.领料单流水号
+ this.pickingListNumber = row.领料单编号
this.searchListDetailt()
},
// 增加基本件领料单明细
@@ -878,7 +859,7 @@ export default {
},
// 增加外购件领料单明细
addListDetailinfor(row) {
- this.form2 = []
+ this.form2 = {}
this.outType = 2
this.partProjectNumber = row.项目流水号
this.partProjectName = row.项目名称
@@ -905,7 +886,6 @@ export default {
if (this.pickingListNumberx === '') {
this.$message.error('请选择领料单')
} else if (this.form2.OutNumber === '' || this.form2.OutNumber > this.enableOut) {
- console.log(this.enableOut)
this.$message.error('请正确输入领用数量')
} else {
this.$refs[formName].validate((valid) => {
@@ -927,9 +907,9 @@ export default {
},
// 增加车间采购领料单明细
addWorkshopDetailinfor(row) {
- this.form3 = []
- this.outType = 3
console.log(row)
+ this.form3 = {}
+ this.outType = 3
this.partProjectNumber = row.项目流水号
this.partMachineNumber = row.机床流水号
this.partGroupNumber = row.组件流水号
@@ -953,10 +933,19 @@ export default {
} else if (this.form3.OutNumber === '' || this.form3.OutNumber > this.enableOut) {
this.$message.error('请正确输入领用数量')
} else {
+ console.log(this.materialLocate)
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.purchaseDetailNum, this.askPurchaseNumber, this.locatenumber, this.outType, this.materialLocate, this.materialName, this.materialType, this.materialNumber, this.partPiant, this.material).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchPartinfo()
+ searchListDetail(this.pickingListNumberx).then(response => {
+ const data = response.data
+ for (let i = 0; i < data.length; i++) {
+ data[i].是否出库 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
+ }
+ this.tableDataPicking = data
+ })
+ this.dialogFormVisibleWork = false
} else {
this.$message.error('增加失败')
}
@@ -964,7 +953,6 @@ export default {
}
}
})
- this.dialogFormVisibleWork = false
this.searchListinfor()
this.searchListDetailt()
},
@@ -1035,5 +1023,16 @@ export default {
diff --git a/src/views/ManufacturingCenter/GroupMatching/index.vue b/src/views/ManufacturingCenter/GroupMatching/index.vue
index 54545849..cab4d0d6 100644
--- a/src/views/ManufacturingCenter/GroupMatching/index.vue
+++ b/src/views/ManufacturingCenter/GroupMatching/index.vue
@@ -112,7 +112,6 @@
- {{ scope.row.货位存量 }}
+ {{ scope.row.数量 }}
-
+
- {{ scope.row.类型名称 }}
+ {{ scope.row.实际到货数量 }}
+
+
+
+
+ {{ scope.row.到货时间 }}
@@ -177,7 +181,6 @@
{
- console.log(response)
+ for (let i = 0; i < response.data.rows.length; i++) {
+ if (response.data.rows[i].到货时间 !== '' || response.data.rows[i].到货时间 !== null) {
+ response.data.rows[i].到货时间 = response.data.rows[i].到货时间.split(' ', 2)[0]
+ }
+ }
this.tableDataPurchase = response.data.rows
- this.listLoading1 = false
this.total4 = parseInt(response.data.total)
})
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
- console.log(response)
this.tableData1 = response.data.rows
- this.listLoading2 = false
this.total5 = parseInt(response.data.total)
})
} else {
@@ -946,22 +950,6 @@ export default {
sums[index] = '入库数量'
} else if (index === 7) {
sums[index] = this.totalNum + ' 件'
- // const values = data.map(item => item['入库时间'])
- // console.log(values)
- // if (!values.every(value => value !== '')) {
- // sums[index] = values.reduce((prev, curr) => {
- // const value = curr
- // console.log(value)
- // if (value !== '') {
- // return this.totalNum1 + 1
- // } else {
- // return this.totalNum1
- // }
- // }, '')
- // sums[index] += '件'
- // } else {
- // sums[index] = 'N/A'
- // }
}
})
return sums
diff --git a/src/views/ManufacturingCenter/InitialProduction/index.vue b/src/views/ManufacturingCenter/InitialProduction/index.vue
index 1fa02eb3..da0905d4 100644
--- a/src/views/ManufacturingCenter/InitialProduction/index.vue
+++ b/src/views/ManufacturingCenter/InitialProduction/index.vue
@@ -186,7 +186,7 @@
@current-change="handleCurrentChange"/>
- 投产
+ 投产
@@ -350,6 +350,7 @@ export default {
jieguo: 0,
value: '',
title: null,
+ listLoading3: false,
temp: 0,
ComponentflowNumber: '', // 组件零件基本件流水号
TypeflowNumber: '',
@@ -787,6 +788,7 @@ export default {
},
// 投产
production() {
+ this.listLoading3 = true
this.result = 0
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
this.$message.error('请输入加工结束时间')
@@ -836,7 +838,9 @@ export default {
this.checked_baitu = false
this.checked_gaonandu = false
this.tableData1 = []
+ this.listLoading3 = false
} else if (response.data[0].result === '0') {
+ this.listLoading3 = false
this.$message.error('投产失败')
}
})
diff --git a/src/views/ManufacturingCenter/MaterialArrivalManagement/index.vue b/src/views/ManufacturingCenter/MaterialArrivalManagement/index.vue
index 2f4e06a2..6ac4d67d 100644
--- a/src/views/ManufacturingCenter/MaterialArrivalManagement/index.vue
+++ b/src/views/ManufacturingCenter/MaterialArrivalManagement/index.vue
@@ -189,7 +189,7 @@ export default {
// 自家备料出库
handleChange1(row) {
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
- handlechange(row.工序流水号, this.id)
+ handlechange(row.工序流水号, '0000')
}).then(response => {
this.searchTable()
})
@@ -200,7 +200,7 @@ export default {
searchTable2() {
this.loading2 = true
this.tableData2 = []
- this.Data = []
+ this.Data2 = []
if (this.partName2 !== '' && this.partName2 !== null) {
this.partNamecheck2 = 1
} else {
@@ -210,19 +210,19 @@ export default {
if (response.data.total === 0) {
this.loading2 = false
} else {
- this.Data = response.data.rows
+ this.Data2 = response.data.rows
this.total2 = response.data.total
}
}).then(() => {
- for (let i = 0; i < this.Data.length; i++) {
- searchtable2(this.Data[i].工艺计划流水号).then(response => {
+ for (let i = 0; i < this.Data2.length; i++) {
+ searchtable2(this.Data2[i].工艺计划流水号).then(response => {
this.tableData2.push({
- 工艺计划流水号: this.Data[i].工艺计划流水号,
- 零件名称: this.Data[i].零件名称,
- 零件图号: this.Data[i].零件图号,
- 重量1: this.Data[i].重量1,
- 单价: this.Data[i].单价,
- 备注1: this.Data[i].备注1,
+ 工艺计划流水号: this.Data2[i].工艺计划流水号,
+ 零件名称: this.Data2[i].零件名称,
+ 零件图号: this.Data2[i].零件图号,
+ 重量1: this.Data2[i].重量1,
+ 单价: this.Data2[i].单价,
+ 备注1: this.Data2[i].备注1,
工序流水号: response.data[0].工序流水号
})
})
@@ -240,7 +240,7 @@ export default {
this.bianliang1.push(this.arrest[i].工艺计划流水号)
this.bianliang2.push(this.arrest[i].工序流水号)
}
- change2(this.bianliang2, this.id, this.bianliang1).then(response => {
+ change2(this.bianliang2, '0000', this.bianliang1).then(response => {
this.searchTable2()
})
}
diff --git a/src/views/ManufacturingCenter/PartAssignment/index.vue b/src/views/ManufacturingCenter/PartAssignment/index.vue
index 19203fd9..b286a08d 100644
--- a/src/views/ManufacturingCenter/PartAssignment/index.vue
+++ b/src/views/ManufacturingCenter/PartAssignment/index.vue
@@ -1087,7 +1087,6 @@ export default {
})
},
handleSelectionChange(val) {
- console.log(val)
if (this.PartType === '基本件') {
this.MaterialNum = []
this.BasicPartsNumber = []
@@ -1144,7 +1143,6 @@ export default {
},
purchaseRequisition() {
if (this.RequisitionList !== '') {
- console.log(this.time)
if (this.time !== '' && this.time !== null) {
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
this.result = 0
@@ -1152,9 +1150,7 @@ export default {
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
this.result += parseInt(response.data[0].result)
- console.log(this.result)
if (this.result === this.BasicPartsNumber.length) {
- console.log(1111)
this.$message.success('请购成功')
searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data
diff --git a/src/views/ManufacturingCenter/ProcessingStatus/index.vue b/src/views/ManufacturingCenter/ProcessingStatus/index.vue
index 775e66b9..e8462be2 100644
--- a/src/views/ManufacturingCenter/ProcessingStatus/index.vue
+++ b/src/views/ManufacturingCenter/ProcessingStatus/index.vue
@@ -458,6 +458,7 @@ export default {
} else {
this.endTime_check = 1
}
+ this.num111 = []
this.tableData1 = []
this.零件图号 = []
this.零件名称 = []
@@ -472,6 +473,7 @@ export default {
getTable(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, 1, this.startTime_check, this.startTime, this.endTime_check, this.endTime, this.pageCurrent, this.pageSize).then(response => {
this.length = parseInt(response.data.total)
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
+ this.num111.push(response.data.rows[i].工艺计划流水号)
this.零件图号.push(response.data.rows[i].零件图号)
this.零件名称.push(response.data.rows[i].零件名称)
this.投产数量.push(response.data.rows[i].投产数量)
@@ -484,31 +486,28 @@ export default {
}
if (this.零件图号.length !== 0) {
for (let i = 0; i < this.零件图号.length; i++) {
- getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i], 1).then(response => {
- this.liushuihao = response.data[0].工艺计划流水号
+ getTable2(this.num111[i]).then(response => {
for (let k = 0; k < response.data.length; k++) {
- if (response.data[k].工艺计划流水号 === this.liushuihao) {
- this.process[i][k] = response.data[k].工艺名称简称
- this.planDate[i][k] = response.data[k].计划日期_短
- this.realDate[i][k] = response.data[k].完成日期_短
- if (response.data[k].工艺编号 === 29) {
- response.data[k].员工姓名 = '备料'
- }
- if (response.data[k].工序间是否外协 === 2) {
- response.data[k].员工姓名 = '外协'
- }
- if (response.data[k].员工姓名 === '超级管理员') {
- response.data[k].员工姓名 = '无'
- }
- this.worker[i][k] = response.data[k].员工姓名
- if (response.data[k].工序状态 === 5) { // 灰色是已经完成 未入库
- this.colorCode[i][k] = 'grey'
- } else {
- this.colorCode[i][k] = response.data[k].进度颜色
- }
- if (response.data[k].工序间是否外协 === 2) {
- this.colorCode[i][k] = 'lightblue'
- }
+ this.process[i][k] = response.data[k].工艺名称简称
+ this.planDate[i][k] = response.data[k].计划日期_短
+ this.realDate[i][k] = response.data[k].完成日期_短
+ if (response.data[k].工艺编号 === 29) {
+ response.data[k].员工姓名 = '备料'
+ }
+ if (response.data[k].工序间是否外协 === 2) {
+ response.data[k].员工姓名 = '外协'
+ }
+ if (response.data[k].员工姓名 === '超级管理员') {
+ response.data[k].员工姓名 = '无'
+ }
+ this.worker[i][k] = response.data[k].员工姓名
+ if (response.data[k].工序状态 === 5) { // 灰色是已经完成 未入库
+ this.colorCode[i][k] = 'grey'
+ } else {
+ this.colorCode[i][k] = response.data[k].进度颜色
+ }
+ if (response.data[k].工序间是否外协 === 2) {
+ this.colorCode[i][k] = 'lightblue'
}
}
}).then(() => {
diff --git a/src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue b/src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue
index ac6184ca..927b8644 100644
--- a/src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue
+++ b/src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue
@@ -372,6 +372,7 @@ import { isMachining, handlechange3, getTable8, getTree, fn, dialogtablevisible,
export default {
data() {
return {
+ num111: [], // 零件图号去掉P后修改
Num2: '',
gongyijihualiushuihao: [[]],
midd: 0,
@@ -557,6 +558,7 @@ export default {
} else {
this.endTime_check = 1
}
+ this.num111 = []
this.tableData1 = []
this.零件图号 = []
this.零件名称 = []
@@ -577,6 +579,7 @@ export default {
} else {
this.length = parseInt(response.data.total)
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
+ this.num111.push(response.data.rows[i].工艺计划流水号)
this.零件图号.push(response.data.rows[i].零件图号)
this.零件名称.push(response.data.rows[i].零件名称)
this.投产数量.push(response.data.rows[i].投产数量)
@@ -592,25 +595,22 @@ export default {
}
if (this.零件图号.length !== 0) {
for (let i = 0; i < this.零件图号.length; i++) {
- getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i]).then(response => {
- this.liushuihao = response.data[0].工艺计划流水号
+ getTable2(this.num111[i]).then(response => {
for (let k = 0; k < response.data.length; k++) {
- if (response.data[k].工艺计划流水号 === this.liushuihao) {
- this.kaoqinbianhao[i][k] = response.data[k].工作者考勤编号
- this.gongxuliushuihao[i][k] = response.data[k].工序流水号
- this.gongyijihualiushuihao[i][k] = response.data[k].工艺计划流水号
- this.process[i][k] = response.data[k].工艺名称简称
- this.planDate[i][k] = response.data[k].计划日期_短
- this.worker[i][k] = response.data[k].员工姓名
- this.realDate[i][k] = response.data[k].完成日期_短
- if (response.data[k].工序状态 === 5) { // 灰色:停产,不允许修改,重新投产
- this.colorCode[i][k] = 'grey'
- } else {
- this.colorCode[i][k] = response.data[k].进度颜色
- }
- if (response.data[k].工序间是否外协 === 2) {
- this.colorCode[i][k] = 'lightblue'
- }
+ this.kaoqinbianhao[i][k] = response.data[k].工作者考勤编号
+ this.gongxuliushuihao[i][k] = response.data[k].工序流水号
+ this.gongyijihualiushuihao[i][k] = response.data[k].工艺计划流水号
+ this.process[i][k] = response.data[k].工艺名称简称
+ this.planDate[i][k] = response.data[k].计划日期_短
+ this.worker[i][k] = response.data[k].员工姓名
+ this.realDate[i][k] = response.data[k].完成日期_短
+ if (response.data[k].工序状态 === 5) { // 灰色:停产,不允许修改,重新投产
+ this.colorCode[i][k] = 'grey'
+ } else {
+ this.colorCode[i][k] = response.data[k].进度颜色
+ }
+ if (response.data[k].工序间是否外协 === 2) {
+ this.colorCode[i][k] = 'lightblue'
}
}
}).then(() => {
diff --git a/src/views/ManufacturingCenter/QuotaFormulation/index.vue b/src/views/ManufacturingCenter/QuotaFormulation/index.vue
index f7dfed94..27c2a5ce 100644
--- a/src/views/ManufacturingCenter/QuotaFormulation/index.vue
+++ b/src/views/ManufacturingCenter/QuotaFormulation/index.vue
@@ -22,7 +22,7 @@
:label="item.label"
:value="item.value"/>
-