From e9a2038d2d60ec1d46290be93cb6d122f067d256 Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Fri, 22 May 2020 17:58:06 +0800
Subject: [PATCH] a
---
src/api/ManufacturingCenter/GroupMatching.js | 8 +-
.../GroupMatching/index.vue | 154 ++++++++++++++----
2 files changed, 126 insertions(+), 36 deletions(-)
diff --git a/src/api/ManufacturingCenter/GroupMatching.js b/src/api/ManufacturingCenter/GroupMatching.js
index ef1166e8..35a52f16 100644
--- a/src/api/ManufacturingCenter/GroupMatching.js
+++ b/src/api/ManufacturingCenter/GroupMatching.js
@@ -27,7 +27,7 @@ export function searchgroup(num) {
}
})
}
-export function searchTable(check1, machine, check2, groupNum, pageCurrent, pageSize) {
+export function searchTable(check1, machine, check2, groupNum, check3, num, order, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
@@ -36,7 +36,7 @@ export function searchTable(check1, machine, check2, groupNum, pageCurrent, page
ModularID: router.currentRoute.path,
type: '1',
name: '车间生产管理工艺_基本件成组配套_查询数据_新',
- param: '机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + `&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
+ param: '机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '&名称规格型号_check=' + check3 + '&名称规格型号=' + num + '&排序=' + order + `&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
}
})
}
@@ -66,7 +66,7 @@ export function searchTable22(check1, machine, check2, groupNum, check3, year, c
}
})
}
-export function searchTable1(check1, machine, check2, groupNum, pageCurrent, pageSize) {
+export function searchTable1(check1, machine, check2, groupNum, check3, num, order, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
@@ -75,7 +75,7 @@ export function searchTable1(check1, machine, check2, groupNum, pageCurrent, pag
ModularID: router.currentRoute.path,
type: '1',
name: '库存管理_车间采购出库_零件查询_新',
- param: '机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int',
+ param: '机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '&名称规格型号_check=' + check3 + '&名称规格型号=' + num + '&排序=' + order,
pagination: pageCurrent + '&' + pageSize
}
})
diff --git a/src/views/ManufacturingCenter/GroupMatching/index.vue b/src/views/ManufacturingCenter/GroupMatching/index.vue
index d830f3c5..dba99444 100644
--- a/src/views/ManufacturingCenter/GroupMatching/index.vue
+++ b/src/views/ManufacturingCenter/GroupMatching/index.vue
@@ -21,13 +21,30 @@
{{ item.value2 }}
+
查询
组件状态查询
-
+
+
+
+ {{ scope.row.进程 }}
+
+
{{ scope.row.零件图号 }}
@@ -88,13 +105,9 @@
-
-
+
+
-
-
-
-
未分配
未询价
已询价
@@ -165,13 +178,9 @@
-
-
+
+
-
-
-
-
未分配
未询价
已询价
@@ -247,13 +256,9 @@
-
-
+
+
-
-
-
-
未分配
未询价
已询价
@@ -326,8 +331,8 @@
-
-
+
+
{{ scope.row.采购状态 }}
@@ -433,6 +438,12 @@ import { searchTable, searchmachine, searchgroup, searchTable1, processingStatus
export default {
data() {
return {
+ order: 0,
+ order2: 0,
+ order3: 0,
+ order4: 0,
+ order5: 0,
+ materialName: '',
titleaa: '',
零件图号: '',
Machines: [],
@@ -544,20 +555,21 @@ export default {
this.SearchMachine()
},
methods: {
- turnTo() {
- this.$router.push({
- path: '/ManufacturingCenter/CompletionOfWorkshopComponents',
- query: {
- 机床流水号: this.Machine
- }
- })
- },
- searchData() {
+ sortChange(column, prop, order) {
+ if (column.order === 'ascending') {
+ this.order = 1
+ } else if (column.order === 'descending') {
+ this.order = 2
+ } else {
+ this.order = 0
+ }
this.totalNum = 0
this.loading = true
+ var check
this.Machine ? this.check1 = 1 : this.check1 = 0
this.Group ? this.check2 = 1 : this.check2 = 0
- searchTable(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
+ this.materialName ? check = 1 : check = 0
+ searchTable(this.check1, this.Machine, this.check2, this.Group, check, this.materialName, this.order, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.result.length; i++) {
if (response.data.result[i].入库时间) {
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
@@ -574,7 +586,85 @@ export default {
this.total = parseInt(response.data.output[0].ItemCount)
this.loading = false
})
- searchTable1(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
+ },
+ sortChange2(column, prop, order) {
+ if (column.order === 'ascending') {
+ this.order2 = 1
+ } else if (column.order === 'descending') {
+ this.order2 = 2
+ } else {
+ this.order2 = 0
+ }
+ this.totalNum = 0
+ var check
+ this.Machine ? this.check1 = 1 : this.check1 = 0
+ this.Group ? this.check2 = 1 : this.check2 = 0
+ this.materialName ? check = 1 : check = 0
+ searchTable1(this.check1, this.Machine, this.check2, this.Group, check, this.materialName, this.order2, this.pageCurrent, this.pageSize).then(response => {
+ this.tableData1 = response.data.rows
+ this.total5 = parseInt(response.data.total)
+ })
+ },
+ sortChange3(column, prop, order) {
+ if (column.order === 'ascending') {
+ this.order3 = 1
+ } else if (column.order === 'descending') {
+ this.order3 = 2
+ } else {
+ this.order3 = 0
+ }
+ },
+ sortChange4(column, prop, order) {
+ if (column.order === 'ascending') {
+ this.order4 = 1
+ } else if (column.order === 'descending') {
+ this.order4 = 2
+ } else {
+ this.order4 = 0
+ }
+ },
+ sortChange5(column, prop, order) {
+ if (column.order === 'ascending') {
+ this.order5 = 1
+ } else if (column.order === 'descending') {
+ this.order5 = 2
+ } else {
+ this.order5 = 0
+ }
+ },
+ turnTo() {
+ this.$router.push({
+ path: '/ManufacturingCenter/CompletionOfWorkshopComponents',
+ query: {
+ 机床流水号: this.Machine
+ }
+ })
+ },
+ searchData() {
+ this.totalNum = 0
+ this.loading = true
+ var check
+ this.Machine ? this.check1 = 1 : this.check1 = 0
+ this.Group ? this.check2 = 1 : this.check2 = 0
+ this.materialName ? check = 1 : check = 0
+ searchTable(this.check1, this.Machine, this.check2, this.Group, check, this.materialName, this.order, this.pageCurrent, this.pageSize).then(response => {
+ for (let i = 0; i < response.data.result.length; i++) {
+ if (response.data.result[i].入库时间) {
+ response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
+ this.totalNum += 1
+ }
+ if (response.data.result[i].计划完成时间) {
+ response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
+ }
+ if (response.data.result[i].机加工实际完成时间) {
+ response.data.result[i].机加工实际完成时间 = response.data.result[i].机加工实际完成时间.split(' ', 2)[0]
+ }
+ }
+ this.tableData = response.data.result
+ this.total = parseInt(response.data.output[0].ItemCount)
+ this.loading = false
+ })
+ searchTable1(this.check1, this.Machine, this.check2, this.Group, check, this.materialName, this.order, this.pageCurrent, this.pageSize).then(response => {
this.tableData1 = response.data.rows
this.total5 = parseInt(response.data.total)
})