成组配套
This commit is contained in:
@@ -19,7 +19,7 @@ const service = axios.create({
|
|||||||
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
|
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
|
||||||
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
||||||
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
||||||
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||||
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
|
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
|
||||||
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
|
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
|
||||||
timeout: 1500000 // 请求超时时间
|
timeout: 1500000 // 请求超时时间
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
:data="tableData"
|
:data="tableData"
|
||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
style="width: 100%;max-height: 600px"
|
style="width: 100%;max-height: 600px"
|
||||||
height="300"
|
height="400"
|
||||||
show-summary
|
show-summary
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
border>
|
border>
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
:data="tableDataPurchase"
|
:data="tableDataPurchase"
|
||||||
border
|
border
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
height="300">
|
height="400">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="序号"
|
label="序号"
|
||||||
align="center"
|
align="center"
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
:data="tableData1"
|
:data="tableData1"
|
||||||
border
|
border
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
height="300">
|
height="400">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="序号"
|
label="序号"
|
||||||
align="center"
|
align="center"
|
||||||
@@ -426,6 +426,8 @@ export default {
|
|||||||
total4: 0,
|
total4: 0,
|
||||||
total5: 0,
|
total5: 0,
|
||||||
title: '',
|
title: '',
|
||||||
|
totalNum: 0,
|
||||||
|
totalNum1: 0,
|
||||||
dialogFormVisible2: false,
|
dialogFormVisible2: false,
|
||||||
dialogFormVisible3: false,
|
dialogFormVisible3: false,
|
||||||
dialogFormVisible4: false,
|
dialogFormVisible4: false,
|
||||||
@@ -484,6 +486,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchData() {
|
searchData() {
|
||||||
|
this.totalNum = 0
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.listLoading1 = true
|
this.listLoading1 = true
|
||||||
this.listLoading2 = true
|
this.listLoading2 = true
|
||||||
@@ -520,10 +523,11 @@ export default {
|
|||||||
}
|
}
|
||||||
searchTable(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 => {
|
searchTable(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 => {
|
||||||
for (let i = 0; i < response.data.rows.length; i++) {
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
if (response.data.rows[i].入库时间 !== null) {
|
if (response.data.rows[i].入库时间 !== '') {
|
||||||
|
this.totalNum += 1
|
||||||
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
||||||
}
|
}
|
||||||
if (response.data.rows[i].计划完成时间 !== null) {
|
if (response.data.rows[i].计划完成时间 !== '') {
|
||||||
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -624,6 +628,7 @@ export default {
|
|||||||
this.dialogFormVisible3 = false
|
this.dialogFormVisible3 = false
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
|
this.totalNum = 0
|
||||||
this.pageCurrent = 1
|
this.pageCurrent = 1
|
||||||
this.pageSize = val
|
this.pageSize = val
|
||||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||||
@@ -659,10 +664,11 @@ export default {
|
|||||||
}
|
}
|
||||||
searchTable(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 => {
|
searchTable(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 => {
|
||||||
for (let i = 0; i < response.data.rows.length; i++) {
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
if (response.data.rows[i].入库时间 !== null) {
|
if (response.data.rows[i].入库时间 !== '') {
|
||||||
|
this.totalNum += 1
|
||||||
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
||||||
}
|
}
|
||||||
if (response.data.rows[i].计划完成时间 !== null) {
|
if (response.data.rows[i].计划完成时间 !== '') {
|
||||||
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -676,6 +682,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
|
this.totalNum = 0
|
||||||
this.pageCurrent = val
|
this.pageCurrent = val
|
||||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||||
@@ -710,10 +717,11 @@ export default {
|
|||||||
}
|
}
|
||||||
searchTable(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 => {
|
searchTable(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 => {
|
||||||
for (let i = 0; i < response.data.rows.length; i++) {
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
if (response.data.rows[i].入库时间 !== null) {
|
if (response.data.rows[i].入库时间 !== '') {
|
||||||
|
this.totalNum += 1
|
||||||
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
||||||
}
|
}
|
||||||
if (response.data.rows[i].计划完成时间 !== null) {
|
if (response.data.rows[i].计划完成时间 !== '') {
|
||||||
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -921,6 +929,39 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
this.$message.warning('请先选择项目')
|
this.$message.warning('请先选择项目')
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
getSummaries(param) {
|
||||||
|
const { columns } = param
|
||||||
|
const sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 4) {
|
||||||
|
sums[index] = '总件数'
|
||||||
|
return
|
||||||
|
} else if (index === 5) {
|
||||||
|
sums[index] = this.total + '件'
|
||||||
|
} else if (index === 6) {
|
||||||
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -565,8 +565,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.err === 0) { // 传递成功后,清除该分组。当所有组都传递完成后,该项目下的机床和分组消失
|
if (this.err === 0) { // 传递成功后,清除该分组。当所有组都传递完成后,该项目下的机床和分组消失
|
||||||
const index = this.groupsNames.indexOf(this.groupValue)
|
console.log(this.groupsNames.indexOf(this.groupValue), 22222)
|
||||||
this.groupsNames.splice(index, 1)
|
// const index = this.groupsNames.indexOf(this.groupValue)
|
||||||
|
// this.groupsNames.splice(index, 1)
|
||||||
if (this.groupsNames.length === 0) {
|
if (this.groupsNames.length === 0) {
|
||||||
const groupIndex = this.machineNames.indexOf(this.machineValue)
|
const groupIndex = this.machineNames.indexOf(this.machineValue)
|
||||||
this.machineNames.splice(groupIndex, 1)
|
this.machineNames.splice(groupIndex, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user