工艺工时,工艺保存

This commit is contained in:
liushuai
2020-02-17 11:50:06 +08:00
parent e8eeade817
commit 4e8acde445
6 changed files with 34 additions and 12 deletions

View File

@@ -589,6 +589,20 @@ export function TableAddLi1(a, b) {
}
})
}
// 未编制定额保存
export function TableAddLi2(a) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '车间生产管理工艺_工艺定额制定_自动编制工艺_循环',
param: '工艺计划流水号=' + a
}
})
}
// 已编制定额保存
export function TableAddLi(a, b, c, num0, num1, num2) {
return request({

View File

@@ -66,7 +66,7 @@
</el-row>
</el-card>
<el-card>
<el-table :data="tableData1" border size="mini" highlight-current-row style="width: 100%" stripe height="475px">
<el-table v-loading="loading" :data="tableData1" border size="mini" highlight-current-row style="width: 100%" stripe height="475px">
<el-table-column align="center" label="禁用情况" width="80px">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否禁用)===0||scope.row.是否禁用===''" type="success" size="small" @click="approvalPass(scope.row)">未禁用</el-tag>
@@ -624,6 +624,7 @@ export default {
console.log(type)
},
selecttable() {
this.loading = true
this.tableData1 = []
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }

View File

@@ -164,11 +164,11 @@ export default {
单件计划工时: response.data[i].单件定额工时,
计划工时: Number(response.data[i].批次数量) * (Number(response.data[i].单件定额工时) + Number(response.data[i].准结定额工时)),
计划加工日期: response.data[i].计划日期.split(' ')[0],
加工数量: response.data[i].批次数量,
加工数量: response.data[i].完成数量,
加工准备工时: response.data[i].修补准结工时,
加工工时: response.data[i].设备工时,
加工日期: response.data[i].操作时间,
图号及规格: response.data[i].机床图号,
图号及规格: response.data[i].零件图号_零件工艺计划,
制品名称: response.data[i].零件名称
})
}

View File

@@ -30,12 +30,12 @@
</el-table-column>
<el-table-column label="计划工时" align="center">
<template slot-scope="scope">
{{ scope.row.理论加工时间段 }}
{{ scope.row.计划工时 }}
</template>
</el-table-column>
<el-table-column label="实际工时" align="center">
<template slot-scope="scope">
{{ scope.row.设备工时 }}
{{ scope.row.实际工时 }}
</template>
</el-table-column>
<el-table-column label="比例" align="center">
@@ -175,7 +175,7 @@ export default {
}
searchtable(this.workerName_ckeck, this.workerName, this.timeCheck, this.startTime, this.endTime).then(response => {
response.data.map(v => {
this.$set(v, '比例', v.理论加工时间段 === 0 ? 0 : Math.round(v.设备工时 / v.理论加工时间段 * 100) / 100.00)
this.$set(v, '比例', v.计划工时 === 0 ? 0 : Math.round(v.实际工时 / v.计划工时 * 100) / 100.00)
})
this.tableData = response.data
this.loading = false
@@ -184,7 +184,7 @@ export default {
// 导出
exportTable() {
import('./Export2Excel').then(excel => {
const filterVal1 = ['姓名', '理论加工时间段', '设备工时', '比例']
const filterVal1 = ['姓名', '计划工时', '实际工时', '比例']
const data1 = this.tableData.map(v => filterVal1.map(j => v[j]))
const dataGroup = []
dataGroup.push(data1)

View File

@@ -24,7 +24,7 @@
</el-table-column>
<el-table-column align="center" label="图号" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号_ }}
{{ scope.row.零件图号_零件工艺计划 }}
</template>
</el-table-column>
<el-table-column align="center" label="跟单号" width="120px">
@@ -54,12 +54,12 @@
</el-table-column>
<el-table-column align="center" label="合格件数" width="70px">
<template slot-scope="scope">
{{ scope.row.合格数 }}
{{ scope.row.合格数 }}
</template>
</el-table-column>
<el-table-column align="center" label="废品件数" width="70px">
<template slot-scope="scope">
{{ scope.row.不合格数 }}
{{ scope.row.不合格数 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" width="100px">
@@ -82,6 +82,11 @@
{{ scope.row.单件定额工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划工时(分)" width="100px">
<template slot-scope="scope">
{{ scope.row.计划工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="130px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
@@ -133,8 +138,8 @@ export default {
return
}
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['日期', '姓名', '图号', '跟单号', '工序', '工序名', '录入准结(分)', '实际工时(分)', '合格件数', '废品件数', '备注', '计划准结(分)', '计划定额(分)', '项目名称', '机床图号', '组号', '设计', '材料']
const filterVal = ['操作时间', '姓名', '零件图号_', '跟单号', '工序顺序', '工艺名称', '修补准结工时', '设备工时', '合格数', '不合格数', '备注', '准结定额工时', '单件定额工时', '项目名称', '机床图号', '组号', '设计者', '材料']
const tHeader = ['日期', '姓名', '图号', '跟单号', '工序', '工序名', '录入准结(分)', '实际工时(分)', '合格件数', '废品件数', '备注', '计划准结(分)', '计划定额(分)', '计划工时(分)', '项目名称', '机床图号', '组号', '设计', '材料']
const filterVal = ['操作时间', '姓名', '零件图号_零件工艺计划', '跟单号', '工序顺序', '工艺名称', '修补准结工时', '设备工时', '合格数', '不合格数', '备注', '准结定额工时', '单件定额工时', '计划工时', '项目名称', '机床图号', '组号', '设计者', '材料']
const list = this.tableData
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({

View File

@@ -491,6 +491,7 @@
<script>
import '@/icon/iconfont.css'
import {
TableAddLi2,
dropGongyi,
editGongyi,
saveWeight,
@@ -1523,6 +1524,7 @@ export default {
flag++
if (flag === this.tableData.length) {
TableAddLi1(this.partNumValue, this.CraftmenValue).then(() => {
TableAddLi2(this.partNumValue)
this.checked = false
this.partNumValue = ''
this.typeValue = ''