零件工艺制定

This commit is contained in:
zhangdingyu
2018-12-22 16:20:15 +08:00
parent 4d044d77f9
commit f86c19c9c6
2 changed files with 34 additions and 13 deletions

View File

@@ -8,7 +8,7 @@ export function initCraftmen() {
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=17'
param: '考核部门编号=9'
}
})
}
@@ -209,7 +209,7 @@ export function gongyiCopy(num1, num2) {
method: 'post',
data: {
type: '1',
name: '车间采购管理工艺_零件工序_工艺拷贝_工艺流水号',
name: '车间生产管理工艺_零件工序_工艺拷贝_工艺流水号',
param: '工艺流水号_完成工艺=' + num1 + '=int&工艺流水号_被拷工艺=' + num2 + '=int'
}
})
@@ -233,8 +233,8 @@ export function hardEdit(num, hard) {
method: 'post',
data: {
type: '2',
name: '车间采购管理工艺_零件工序_修改数据_工艺难度等级',
param: '外购件工序流水号=' + num + '=int&工艺难度等级=' + hard
name: '车间生产管理工艺_零件工序_修改数据_工艺难度等级',
param: '工序流水号=' + num + '=int&工艺难度等级=' + hard
}
})
}
@@ -329,8 +329,8 @@ export function selectRequest(num0, num1, num2, num3, request0) {
method: 'post',
data: {
type: '2',
name: '车间采购管理工艺_零件工序_修改数据_根据外购件工序流水号和工艺流水号',
param: '外购件工序流水号=' + num0 + '&工艺流水号=' + num1 + '&工艺编号=' + num2 + '&工艺顺序=' + num3 + '&工艺要求=' + request0
name: '车间生产管理工艺_零件工序_修改数据_根据工序流水号和工艺计划流水号',
param: '工序流水号=' + num0 + '&工艺计划流水号=' + num1 + '&工艺编号=' + num2 + '&工艺顺序=' + num3 + '&工艺要求=' + request0
}
})
}

View File

@@ -56,7 +56,7 @@
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="getParts">
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中" @row-click="getParts">
<el-table-column
label=" "
type="index"
@@ -207,12 +207,7 @@
</el-card>
<el-card>
<el-table v-loading="loading2" :data="tableData2" height="370" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column
label=" "
type="index"
align="center"
width="50"/>
<el-table v-loading="loading2" :data="tableData2" :summary-method="getSummaries" height="370" show-summary style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="发票号" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
@@ -430,6 +425,32 @@ export default {
this.fetchData()
},
methods: {
getSummaries(param) {
console.log(param)
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ' 元'
} else {
sums[index] = 'N/A'
}
})
return sums
},
// 初始化外协厂家
fetchData() {
this.ManufacturerName = []