diff --git a/src/api/ManufacturingCenter/TraceabilityOfParts.js b/src/api/ManufacturingCenter/TraceabilityOfParts.js
new file mode 100644
index 00000000..1d6fcea6
--- /dev/null
+++ b/src/api/ManufacturingCenter/TraceabilityOfParts.js
@@ -0,0 +1,57 @@
+import request from '@/utils/request'
+
+export function SelectPart() {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ type: '1',
+ name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新_MESWORK',
+ param: '项目流水号_check=' + arguments[0] + '&项目流水号=' + arguments[1] + '&机床流水号_check=' + arguments[2] + '&机床流水号=' + arguments[3] + '&组件流水号_check=' + arguments[4] + '&组件流水号=' + arguments[5] + '&零件图号_check=' + arguments[6] + '&零件图号=' + arguments[7] + '&考核状态_check=' + arguments[8] + '&考核状态=' + arguments[9] + '&单件是否外协_check=' + arguments[10] + '&单件是否外协=' + arguments[11] + '&时间=' + arguments[12] + '&机加工开始时间=' + arguments[13] + '&机加工结束时间=' + arguments[14] + '&零件类型=' + arguments[15] + '&工艺计划流水号=' + arguments[16]
+ }
+ })
+}
+export function getTable(stepNumber, a, b, c, d, e, f, g, i, j, k, l, m) {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ type: '1',
+ name: '车间生产管理工艺_零件工序_查询数据_已编制工序的全部零件及工序_横向赋值新建存储过程',
+ param: '项目流水号_check=' + stepNumber + '=string&项目流水号=' + a + '=string&机床流水号_check=' + b + '=string&机床流水号=' + c + '=string&组件流水号_check=' + d + '=string&组件流水号=' + e + '=string&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=' + i + '=string&考核状态=6=int&开始时间_check=' + j + '&开始时间=' + k + '&结束时间_check=' + l + '&结束时间=' + m
+ }
+ })
+}
+export function SelectProcessingProgress() {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ type: '1',
+ name: '车间生产管理工艺_加工进度查询_查询',
+ param: '工艺计划流水号=' + arguments[0]
+ }
+ })
+}
+export function SelectPreparation() {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ type: '1',
+ name: '零件追溯_备料信息_查询数据',
+ param: '工艺计划流水号=' + arguments[0]
+ }
+ })
+}
+export function SelectOut() {
+ return request({
+ url: '',
+ method: 'post',
+ data: {
+ type: '1',
+ name: '零件追溯_外协信息_查询数据',
+ param: '工艺计划流水号=' + arguments[0]
+ }
+ })
+}
diff --git a/src/api/Outsourcing/OutsourcingQCSearch.js b/src/api/Outsourcing/OutsourcingQCSearch.js
index b4dace89..53d65092 100644
--- a/src/api/Outsourcing/OutsourcingQCSearch.js
+++ b/src/api/Outsourcing/OutsourcingQCSearch.js
@@ -8,7 +8,7 @@ export function searchTable1(...params) {
data: {
type: '1',
name: '车间生产管理_外协到货单_查询数据',
- param: ``,
+ param: `外协到货单号_check=${params[2]}&外协到货单号=${params[3]}&外协厂家_check=${params[4]}&外协厂家=${params[5]}`,
Pagination: params[0] + '&' + params[1]
}
})
diff --git a/src/api/PurchasingCenter/PurchaseSituationSearch.js b/src/api/PurchasingCenter/PurchaseSituationSearch.js
index b2fcf305..0445867b 100644
--- a/src/api/PurchasingCenter/PurchaseSituationSearch.js
+++ b/src/api/PurchasingCenter/PurchaseSituationSearch.js
@@ -31,7 +31,7 @@ export function searchTable1(...params) {
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后_加供应商',
- param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件类型=${params[6]}`,
+ param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件类型=${params[6]}&物料名称_check=${params[7]}&物料名称=${params[8]}&物料规格_check=${params[9]}&物料规格=${params[10]}&物料型号_check=${params[11]}&物料型号=${params[12]}`,
Pagination: params[4] + '&' + params[5]
}
})
@@ -44,7 +44,7 @@ export function searchTable2(...params) {
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_基本件_分配后_加供应商',
- param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}`,
+ param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件名称_check=${params[6]}&零件名称=${params[7]}&零件规格_check=${params[8]}&零件规格=${params[9]}&零件图号_check=${params[10]}&零件图号=${params[11]}`,
Pagination: params[4] + '&' + params[5]
}
})
diff --git a/src/icons/svg/TraceabilityOfParts.svg b/src/icons/svg/TraceabilityOfParts.svg
new file mode 100644
index 00000000..6e5db806
--- /dev/null
+++ b/src/icons/svg/TraceabilityOfParts.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/utils/request.js b/src/utils/request.js
index 39e0294c..05ba122c 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -26,65 +26,4 @@ const service = axios.create({
timeout: 1500000 // 请求超时时间
})
-// request拦截器
-// service.interceptors.request.use(
-// config => {
-// if (store.getters.token) {
-// config.headers['X-Token'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
-// }
-// return config
-// },
-// error => {
-// // Do something with request error
-// console.log(error) // for debug
-// Promise.reject(error)
-// }
-// )
-
-// response 拦截器
-// service.interceptors.response.use(
-// response => {
-// /**
-// * code为非20000是抛错 可结合自己业务进行修改
-// */
-// const res = response.data
-// if (res.code !== 20000) {
-// Message({
-// message: res.message,
-// type: 'error',
-// duration: 5 * 1000
-// })
-//
-// // 50008:非法的token; 50012:其他客户端登录了; 50014:Token 过期了;
-// if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
-// MessageBox.confirm(
-// '你已被登出,可以取消继续留在该页面,或者重新登录',
-// '确定登出',
-// {
-// confirmButtonText: '重新登录',
-// cancelButtonText: '取消',
-// type: 'warning'
-// }
-// ).then(() => {
-// store.dispatch('FedLogOut').then(() => {
-// location.reload() // 为了重新实例化vue-router对象 避免bug
-// })
-// })
-// }
-// return Promise.reject('error')
-// } else {
-// return response.data
-// }
-// },
-// error => {
-// console.log('err' + error) // for debug
-// Message({
-// message: error.message,
-// type: 'error',
-// duration: 5 * 1000
-// })
-// return Promise.reject(error)
-// }
-// )
-
export default service
diff --git a/src/utils/tool.js b/src/utils/tool.js
index 005cfadf..ba0f89ff 100644
--- a/src/utils/tool.js
+++ b/src/utils/tool.js
@@ -128,7 +128,7 @@ export function groupBy(datas, keys) {
group.data1 = group.data1 || 0
group.key.数量 = group.data1 += v.数量
group.data2 = group.data2 || ''
- group.key.机床图号_组号 = group.data2 += (v.机床图号 || '') + '-' + (v.组号 ? v.组号.split('组')[0] : '') + ' '
+ group.key.机床图号_组号 = group.data2 += (v.机床图号 || '') + '-' + (v.组号 ? v.组号.split('组')[0] : '') + '
'
group.data3 = group.data3 || 0
group.key.合计 = group.data3 += v.合计
})
diff --git a/src/views/ManufacturingCenter/TraceabilityOfParts/index.vue b/src/views/ManufacturingCenter/TraceabilityOfParts/index.vue
new file mode 100644
index 00000000..00abcfba
--- /dev/null
+++ b/src/views/ManufacturingCenter/TraceabilityOfParts/index.vue
@@ -0,0 +1,531 @@
+
+
+
+
+
+
+
+
+ 零件图号:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
零件档案
+
+ 零件图号:{{ form.零件图号 }}
+
+ 零件名称:{{ form.零件名称 }}
+
+ 投产数量:{{ form.投产数量 }}
+
+ 所属机床:{{ form.所属机床 }}
+
+ 所属组件:{{ form.所属组件 }}
+
+
生命周期
+
+
+
+
+
+ {{ activity.content }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 第{{ sudoku.id }}序
+
+
+
+
+ {{ sudoku.procedure }}
+
+
+
+
+ {{ sudoku.planningTime }}
+
+
+
+
+ {{ sudoku.actualTime }}
+
+
+
+
+ {{ sudoku.name }}
+
+
+
+
+
+
+
+
+
+
+ —备料信息—
+
+
+ 备料单:{{ isMaterials }}
+ 备料类型:{{ materialsType }}
+ 下料员:{{ Cutter }}
+ 确认日期:{{ confirmationTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+ —外协信息—
+
+
+ 是否序间外协:{{ isOut }}
+ 外协工序:{{ outName }}
+ 检验日期:{{ outTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
跳转链接
+
+ 零件状态查询
+
+ 加工进度查询
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/Outsourcing/OutsourcingQCSearch/index.vue b/src/views/Outsourcing/OutsourcingQCSearch/index.vue
index a0da4aa5..c4a471a8 100644
--- a/src/views/Outsourcing/OutsourcingQCSearch/index.vue
+++ b/src/views/Outsourcing/OutsourcingQCSearch/index.vue
@@ -1,10 +1,14 @@
-
+
-
+
@@ -16,7 +20,7 @@
{{ scope.row.外协厂家名称 }}
-
+
{{ scope.row.操作日期 }}
@@ -33,7 +37,7 @@
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
-
+
@@ -151,6 +155,8 @@ export default {
name: 'OutsourcingQCSearch',
data() {
return {
+ orderNumber: '',
+ outsourcingSupplier: '',
tableData1: [],
pageCurrent1: 1,
pageSize1: 10,
@@ -226,8 +232,10 @@ export default {
},
// 查询到货单列表
searchTable1() {
- searchTable1(this.pageCurrent1, this.pageSize1).then(response => {
- console.log(response.data, 1)
+ let check1, check2
+ this.orderNumber ? check1 = 1 : check1 = 0
+ this.outsourcingSupplier ? check2 = 1 : check2 = 0
+ searchTable1(this.pageCurrent1, this.pageSize1, check1, this.orderNumber, check2, this.outsourcingSupplier).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
@@ -242,7 +250,6 @@ export default {
this.searchTable1()
},
searchTable2(row) {
- console.log(row, 2)
searchTable2(row.外协到货单流水号).then(response => {
this.tableData2 = response.data
})
@@ -251,12 +258,13 @@ export default {
searchTableDetail(type, num).then(response => {
this.gridData = response.data
})
- console.log(type)
}
}
}
diff --git a/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue b/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue
index cc37de06..17ddc5c9 100644
--- a/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue
+++ b/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue
@@ -1,27 +1,37 @@
- 机床编号:
-
-
- {{ item.label }}
- {{ item.name }}
-
-
- 组号:
-
-
-
- 查询
- 导出
+
+ 机床编号:
+
+
+ {{ item.label }}
+ {{ item.name }}
+
+
+ 组 号:
+
+
+
+ 名 称:
+
+
+
+ 规 格:
+
+ 型 号:
+
+ 查询
+ 导出
+
@@ -305,6 +315,9 @@ export default {
name: '', // 采购件采购查询
data() {
return {
+ name: '',
+ spec: '',
+ model: '',
machineNumberValue: '',
machineNumber: [],
groupNumberValue: '',
@@ -486,28 +499,37 @@ export default {
this.searchTable2()
},
searchTable0() { // 查询标准件
- let check1, check2
+ let check1, check2, check3, check4, check5
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
- searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent0, this.pageSize0, 1).then(response => {
+ this.name ? check3 = 1 : check3 = 0
+ this.spec ? check4 = 1 : check4 = 0
+ this.model ? check5 = 1 : check5 = 0
+ searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent0, this.pageSize0, 1, check3, this.name, check4, this.spec, check5, this.model).then(response => {
this.tableData0 = response.data.rows
this.total0 = response.data.total
})
},
searchTable1() { // 查询外购件
- let check1, check2
+ let check1, check2, check3, check4, check5
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
- searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1, 2).then(response => {
+ this.name ? check3 = 1 : check3 = 0
+ this.spec ? check4 = 1 : check4 = 0
+ this.model ? check5 = 1 : check5 = 0
+ searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1, 2, check3, this.name, check4, this.spec, check5, this.model).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
searchTable2() { // 查询基本件
- let check1, check2
+ let check1, check2, check3, check4, check5
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
- searchTable2(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2).then(response => {
+ this.name ? check3 = 1 : check3 = 0
+ this.spec ? check4 = 1 : check4 = 0
+ this.model ? check5 = 1 : check5 = 0
+ searchTable2(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent2, this.pageSize2, check3, this.name, check4, this.spec, check5, this.model).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
diff --git a/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue b/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue
index 67f090c0..4f1d21dc 100644
--- a/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue
+++ b/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue
@@ -611,6 +611,25 @@
+
+
+
+ 刷新 | 待分配零件数
+
+
+
+
+
+
+ {{ machine.机床图号 }}
+
+
+
+
+
+
+
+
@@ -618,11 +637,14 @@
import { initMaterialCategory, initMaterialVariety, initProject, initBuyer, searchMachine, searchGroup, searchTable1, searchTable2, allocateTask1,
allocateTask2, executeReturn1, executeReturn2, retract1, retract2 } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
import { mapGetters } from 'vuex'
+import request from '@/utils/request'
export default {
name: '', // 采购任务分配
data() {
return {
+ timer2: '',
+ machines: [],
source: [
{
text: 'BZ',
@@ -707,14 +729,42 @@ export default {
computed: {
...mapGetters([
'name',
+ 'token',
'id'
])
},
created() {
this.searchTable0() // 查表1
this.fetchData() // 初始化数据
+ this.searchUnallocatePartNumber()
+ this.timer2 = setInterval(this.searchUnallocatePartNumber, 20 * 60 * 1000) // 20 分钟一刷新
+ },
+ beforeDestroy() {
+ clearInterval(this.timer2)
},
methods: {
+ // 选择机床
+ clickCard(project, machine) {
+ this.projectValue = project
+ this.machine = []
+ this.machineValue = ''
+ this.group = []
+ this.groupValue = ''
+ searchMachine(this.projectValue).then(response => {
+ for (let i = 0; i < response.data.length; i++) {
+ this.machine.push({
+ value: response.data[i].机床流水号,
+ label: response.data[i].机床图号,
+ name: response.data[i].机床名称
+ })
+ }
+ this.machineValue = machine
+ this.materialStatusValue = [1]
+ this.searchTable0()
+ this.searchTable1()
+ this.searchTable2()
+ })
+ },
filterSource(value, row) {
return Number(row['零件类型']) === Number(value)
},
@@ -994,6 +1044,28 @@ export default {
})
})
}
+ },
+ async searchUnallocatePartNumber() {
+ this.machines = []
+ await request({
+ url: '',
+ method: 'post',
+ data: {
+ type: '3',
+ name: ` select 项目流水号,机床流水号,机床图号,sum(未分配零件数) as 未分配零件数 from (
+ select 项目流水号,机床流水号,机床图号,COUNT(*) as 未分配零件数 from MRP_计划订单_组件零件清单_标准件和外购件_视图
+ where 人员编号 is null
+ group by 项目流水号,机床流水号,机床图号
+ union all
+ select 项目流水号,机床流水号,机床图号,COUNT(*) as 未分配零件数 from MRP_计划订单_组件零件清单_基本件_视图
+ where 人员编号 is null
+ group by 项目流水号,机床流水号,机床图号
+ ) as tb1
+ group by 项目流水号,机床流水号,机床图号`
+ }
+ }).then(res => {
+ this.machines = res.data
+ })
}
}
}
@@ -1016,3 +1088,45 @@ export default {
margin: 10px 0 10px 10px;
}
+
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 707ff73a..4207fe8a 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -13,22 +13,6 @@
-
-
待分配零件数
-
-
-
-
-
- {{ machine.机床图号 }}
-
-
-
-
-
-
-
-
@@ -45,9 +29,7 @@ export default {
sudokus: [],
curSelect: null,
number: '',
- timer: '',
- timer2: '',
- machines: []
+ timer: ''
}
},
computed: {
@@ -59,18 +41,12 @@ export default {
mounted() {
this.getFileList()
this.timer = setInterval(this.getFileList, 60 * 60 * 1000) // 60 分钟一刷新
- this.searchUnallocatePartNumber()
- this.timer2 = setInterval(this.searchUnallocatePartNumber, 20 * 60 * 1000) // 20 分钟一刷新
+ this.drawLine()
},
beforeDestroy() {
clearInterval(this.timer)
- clearInterval(this.timer2)
},
methods: {
- // 选择机床
- clickCard() {
- this.$router.push({ path: '/PurchaseTaskAllocate/index' })
- },
async getFileList() {
await request({
url: '',
@@ -104,34 +80,32 @@ export default {
value: res.data[0].Column1
})
})
- },
- async searchUnallocatePartNumber() {
- this.machines = []
- await request({
- url: '',
- method: 'post',
- data: {
- type: '3',
- name: ` select 项目流水号,机床流水号,机床图号,sum(未分配零件数) as 未分配零件数 from (
- select 项目流水号,机床流水号,机床图号,COUNT(*) as 未分配零件数 from MRP_计划订单_组件零件清单_标准件和外购件_视图
- where 人员编号 is null
- group by 项目流水号,机床流水号,机床图号
- union all
- select 项目流水号,机床流水号,机床图号,COUNT(*) as 未分配零件数 from MRP_计划订单_组件零件清单_基本件_视图
- where 人员编号 is null
- group by 项目流水号,机床流水号,机床图号
- ) as tb1
- group by 项目流水号,机床流水号,机床图号`
- }
- }).then(res => {
- this.machines = res.data
- })
}
}
}