This commit is contained in:
liushuai
2020-04-08 18:05:24 +08:00
parent 307598eb96
commit 9525a0fdc2
10 changed files with 571 additions and 15 deletions

View File

@@ -0,0 +1,47 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
// 初始化 项目名称
export function initProject() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: 'PDM_项目名称_查询数据_总计划'
}
})
}
// 查询机床
export function initMachine(projectNum) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: 'PDM_机床名称_查询数据2',
param: `项目流水号=${projectNum}`
}
})
}
// 查询项目详情
export function searchatabledata(projectNum, machineValue, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '项目工时统计_合同详情查询_工时综合查询',
param: `项目流水号=${projectNum}&机床流水号=${machineValue}&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
}
})
}

View File

@@ -0,0 +1,18 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
export function searchTable(num, time, time1, order, orderName, check, name, check1, partNumber, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '工艺月底工时核算_查询数据_最新',
param: '筛选=' + num + '&开始时间=' + time + '&结束时间=' + time1 + '&排序名称=' + order + '&排序方式=' + orderName + '&操作工_check=' + check + '&操作工=' + name + '&零件图号_check=' + check1 + '&零件图号=' + partNumber,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -28,7 +28,7 @@
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button> <el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
</el-card> </el-card>
<el-card style="margin-top: 5px"> <el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2"> <el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table-column label="采购合同编号" align="center" min-width="130"> <el-table-column label="采购合同编号" align="center" min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购合同编号 }} {{ scope.row.采购合同编号 }}

View File

@@ -28,7 +28,7 @@
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button> <el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
</el-card> </el-card>
<el-card style="margin-top: 5px"> <el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2"> <el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table-column label="采购合同编号" align="center" min-width="130"> <el-table-column label="采购合同编号" align="center" min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购合同编号 }} {{ scope.row.采购合同编号 }}

View File

@@ -0,0 +1,236 @@
<template>
<div class="app-container">
<el-card>
<el-select v-model="projectValue" filterable clearable size="small" style="margin-right:10px;width: 150px" placeholder="项目名称" @change="typeChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="machineValue" clearable filterable size="small" style="margin-right:10px;width: 150px" placeholder="机床名称">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" style="margin: 0 0 0 10px" plain @click="exportExcel()">导出</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" highlight-current-row show-summary border style="width: 1360px;" size="mini" height="590">
<el-table-column label="跟单号" align="center" width="140">
<template slot-scope="scope">
{{ scope.row.跟单号 }}
</template>
</el-table-column>
<el-table-column label="工序" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.序号 }}
</template>
</el-table-column>
<el-table-column label="工序名" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.工序名 }}
</template>
</el-table-column>
<el-table-column label="投产数" align="center" prop="计划数量" width="70">
<template slot-scope="scope">
{{ scope.row.计划数量 }}
</template>
</el-table-column>
<!-- <el-table-column label="计划准结(分)" align="center" prop="计划准备工时" width="110">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.计划准备工时 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="单件定额(分)" align="center" width="110">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.单件计划工时 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="计划工时(分)" align="center" prop="计划工时" width="110">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.计划工时 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="加工件数" align="center" prop="加工数量" width="80">
<template slot-scope="scope">
{{ scope.row.加工数量 }}
</template>
</el-table-column>
<el-table-column label="单件加工工时(分)" align="center" prop="加工工时" width="140">
<template slot-scope="scope">
{{ scope.row.修补单件工时 }}
</template>
</el-table-column>
<el-table-column label="准结(分)" align="center" prop="修补工时" width="90">
<template slot-scope="scope">
{{ scope.row.修补工时 }}
</template>
</el-table-column>
<el-table-column label="加工工时(分)" align="center" prop="完成工时" width="110">
<template slot-scope="scope">
{{ scope.row.完成工时 }}
</template>
</el-table-column>
<el-table-column label="扫码工时(分)" align="center" prop="扫码工时" width="110">
<template slot-scope="scope">
{{ scope.row.扫码工时 }}
</template>
</el-table-column>
<!-- <el-table-column label="工时比值" align="center" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.工时比值 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="计划完成" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.计划加工日期 }}
</template>
</el-table-column>
<el-table-column label="加工完成" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.加工完成时间 }}
</template>
</el-table-column>
<el-table-column label="图号及规格" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.图号及规格 }}
</template>
</el-table-column>
<el-table-column label="制品名称" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.制品名称 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[50, 100, 200, 300]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { initProject, initMachine, searchatabledata } from '@/api/ManufacturingCenter/ContractDetailsInquiryMetalworking'
export default {
data() {
return {
project: [],
projectValue: '', // 项目名称
machineValue: '', // 机床名称
machine: [],
loading: false,
part: [], // 分組
partValue: '',
specificationValue: '', // 规格型号
totalProcessingHours: '', // 加工总工时
totalPlannedHours: '', // 计划总工时
tableData: [], // 详情表
total: 0, // 总条数
pageSize: 50, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
// 查询按钮
typeChange() {
this.machineValue = ''
this.machine = []
initMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
// 分页查询
searchTable() {
this.tableData = []
if (this.machineValue) {
this.loading = true
searchatabledata(this.projectValue, this.machineValue, this.pageCurrent, this.pageSize).then(response => {
this.loading = false
if (response.data.result.length !== 0) {
for (let i = 0; i < response.data.result.length; i++) {
this.tableData.push({
跟单号: response.data.result[i].跟单号,
序号: response.data.result[i].工序顺序,
工序名: response.data.result[i].工艺名称,
计划数量: response.data.result[i].批次数量,
计划准备工时: response.data.result[i].准结定额工时,
单件计划工时: response.data.result[i].单件定额工时,
计划工时: response.data.result[i].计划工时,
计划加工日期: response.data.result[i].计划日期.split(' ')[0],
加工数量: response.data.result[i].完成数量,
加工准备工时: response.data.result[i].修补准结工时,
加工工时: response.data.result[i].设备工时,
扫码工时: response.data.result[i].扫码工时,
辅助工时: response.data.result[i].辅助工时,
工时比值: Number(response.data.result[i].计划工时) === 0 ? 0 : Math.round(response.data.result[i].完成工时 / Number(response.data.result[i].计划工时) * 100) / 100.00,
加工日期: response.data.result[i].操作时间,
图号及规格: response.data.result[i].零件图号_零件工艺计划,
修补工时: response.data.result[i].修补工时,
修补单件工时: response.data.result[i].修补单件工时,
完成工时: response.data.result[i].完成工时,
加工完成时间: response.data.result[i].加工完成时间,
制品名称: response.data.result[i].零件名称
})
}
}
this.total = parseInt(response.data.output[0].ItemCount)
})
} else {
this.$message.warning('请选择要查询的机床')
}
},
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('请查询出要导出的数据')
return
}
var param = []
param[0] = ['项目流水号', this.projectValue]
param[1] = ['机床流水号', this.machineValue]
param[2] = ['PageCurrent', 1]
param[3] = ['PageSize', 999999]
param[4] = ['PageCount', '1111', 'int', '1']
param[5] = ['ItemCount', '1111', 'int', '1']
var Data = this.CreateData('2001', '报表_机床工时统计_金工_查询', param)
this.exportExcel_NPOI(Data)
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,235 @@
<template>
<div class="app-container">
<el-card>
<el-date-picker
v-model="startTime"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margin-left: 5px;"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-input v-model="name" size="small" placeholder="操作工" style="width: 150px" clearable/>
<el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 150px" clearable/>
<el-tooltip :open-delay="600" effect="dark" content="筛选掉备料、热及外协工序" placement="top">
<el-checkbox v-model="check" class="remeberPassword">筛选</el-checkbox>
</el-tooltip>
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="pageCurrent=1;pageSize=50;searchTable()">查询</el-button>
<el-button size="small" type="success" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 590px;width: 1370px" height="720px" border @sort-change="sortChange">
<el-table-column align="center" label="跟单号" width="120px">
<template slot-scope="scope">
{{ scope.row.跟单号 }}
</template>
</el-table-column>
<el-table-column align="center" label="加工日期" width="110px" sortable="custom" prop="操作时间">
<template slot-scope="scope">
{{ scope.row.完成日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="姓名" width="80px" sortable="custom" prop="姓名">
<template slot-scope="scope">
{{ scope.row.操作工 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="工序" width="50px">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column align="center" label="工序名称" width="80px">
<template slot-scope="scope">
{{ scope.row.工艺名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="完成数量" width="80px">
<template slot-scope="scope">
{{ scope.row.完成数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="单件工时(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.修补单件工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="准结(分)" width="90px">
<template slot-scope="scope">
{{ scope.row.修补工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="完成工时(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.完成工时 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" width="160px" show-overflow-tooltip="">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="扫码工时(分)" width="110px">
<template slot-scope="scope">
{{ 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="80px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.不合格数量 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!-- <el-table-column align="center" label="计划准结(分)" width="110px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.准结定额工时 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="计划定额(分)" width="110px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.单件定额工时 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="计划工时(分)" width="110px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.计划工时 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="项目名称" width="130px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ 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="70px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.组号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="设计者" width="70px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.设计者 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="材料" width="150px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.材料 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[50, 100, 200, 300]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { searchTable } from '@/api/ManufacturingCenter/MonthEndHourAccountingMetalworking'
export default {
data() {
return {
check: 0,
orderName: 0,
order: 0,
startTime: '',
name: '',
partNumber: '',
tableData: [],
loading: false,
total: 0, // 总条数
pageSize: 50, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
methods: {
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('请查询出要导出的数据')
return
}
let check, check1, check2
this.name ? check = 1 : check = 0
this.partNumber ? check1 = 1 : check1 = 0
this.check ? check2 = 1 : check2 = 0
var param = []
param[0] = ['开始时间', this.startTime[0]]
param[1] = ['结束时间', this.startTime[1]]
param[2] = ['排序名称', this.orderName]
param[3] = ['排序方式', this.order]
param[4] = ['筛选', check2]
param[5] = ['操作工_check', check]
param[6] = ['操作工', this.name]
param[7] = ['零件图号_check', check1]
param[8] = ['零件图号', this.partNumber]
var Data = this.CreateData('2001', '报表_工艺月底工时核算_金工_查询数据', param)
this.exportExcel_NPOI(Data)
},
sortChange(column, prop, order) {
if (column.prop === '姓名') {
this.orderName = 1
} else if (column.prop === '操作时间') { this.orderName = 2 } else {
this.orderName = 2
}
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
this.order = 0
}
this.searchTable()
},
searchTable() {
if (this.startTime[0] && this.startTime[1]) {
let check, check1, check2
this.name ? check = 1 : check = 0
this.partNumber ? check1 = 1 : check1 = 0
this.loading = true
this.check ? check2 = 1 : check2 = 0
searchTable(check2, this.startTime[0], this.startTime[1], this.orderName, this.order, check, this.name, check1, this.partNumber, this.pageCurrent, this.pageSize).then(response => {
response.data.rows.map(v => {
this.$set(v, '工时比值', parseInt(v.计划工时) === 0 ? 0 : (Math.round(parseInt(v.完成工时) / parseInt(v.计划工时) * 100) / 100.00))
})
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
} else {
this.$message.warning('请选择时间段')
}
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>

View File

@@ -35,7 +35,7 @@
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button> <el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
</el-card> </el-card>
<el-card style="margin-top: 5px"> <el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2"> <el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table-column label="供应商" align="center" min-width="150"> <el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}

View File

@@ -35,7 +35,7 @@
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button> <el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
</el-card> </el-card>
<el-card style="margin-top: 5px"> <el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2"> <el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table-column label="供应商" align="center" min-width="150"> <el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}

View File

@@ -21,7 +21,7 @@
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-card> <el-card>
<el-table v-loading="loading" :data="tableData" highlight-current-row size="mini" stripe style="width: 100%;" height="700px" border element-loading-text="拼命加载中" @row-click="searchTable2"> <el-table v-loading="loading" :data="tableData" highlight-current-row size="mini" stripe style="width: 100%;" height="600px" border element-loading-text="拼命加载中" @row-click="searchTable2">
<el-table-column label="操作者" align="center" show-overflow-tooltip> <el-table-column label="操作者" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.操作工 }} {{ scope.row.操作工 }}
@@ -60,7 +60,7 @@
</el-col> </el-col>
<el-col :span="17"> <el-col :span="17">
<el-card> <el-card>
<el-table v-loading="loading2" :data="tableData2" size="mini" style="width: 100%;" height="700px" border element-loading-text="拼命加载中"> <el-table v-loading="loading2" :data="tableData2" size="mini" style="width: 100%;" height="600px" border element-loading-text="拼命加载中">
<el-table-column label="零件图号" align="center" width="150px" show-overflow-tooltip> <el-table-column label="零件图号" align="center" width="150px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
@@ -91,16 +91,16 @@
{{ scope.row.修补单件工时 }} {{ scope.row.修补单件工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="加工工时(分)" align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.完成工时 }}
</template>
</el-table-column>
<el-table-column label="录入准结" align="center" width="80px"> <el-table-column label="录入准结" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.修补工时 }} {{ scope.row.修补工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="加工工时(分)" align="center" width="80px">
<template slot-scope="scope">
{{ Number(scope.row.完成工时) + Number(scope.row.修补工时) }}
</template>
</el-table-column>
<el-table-column label="扫码工时(分)" align="center" width="80px"> <el-table-column label="扫码工时(分)" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.扫码工时 }} {{ scope.row.扫码工时 }}
@@ -111,6 +111,16 @@
{{ scope.row.完成日期 }} {{ scope.row.完成日期 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编辑人员" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.修改人员 }}
</template>
</el-table-column>
<el-table-column label="编辑时间" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.修改时间 ? scope.row.修改时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="90px"> <el-table-column align="center" label="操作" fixed="right" width="90px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button> <el-button type="text" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
@@ -150,7 +160,7 @@
<!--<el-input class="editWorkTime" v-positive="'float'" v-model="form1.录入工时" placeholder="录入工时" style="width:200px;" type="number"/>--> <!--<el-input class="editWorkTime" v-positive="'float'" v-model="form1.录入工时" placeholder="录入工时" style="width:200px;" type="number"/>-->
</el-form-item> </el-form-item>
<el-form-item label="录入准结(分)" prop="录入准结"> <el-form-item label="录入准结(分)" prop="录入准结">
<el-input-number :min="0" v-model="form1.录入准结" style="width: 200px"/> <el-input-number :min="0" v-model="form1.录入准结" style="width: 200px" @change="timeChange()"/>
<!--<el-input class="editWorkTime" v-positive="'float'" v-model="form1.录入准结" placeholder="录入准结" style="width:200px;" type="number"/>--> <!--<el-input class="editWorkTime" v-positive="'float'" v-model="form1.录入准结" placeholder="录入准结" style="width:200px;" type="number"/>-->
</el-form-item> </el-form-item>
<el-form-item label="加工工时(分)" prop="加工时间"> <el-form-item label="加工工时(分)" prop="加工时间">
@@ -171,6 +181,7 @@
<script> <script>
import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/ScheduleCompletionDetails' import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/ScheduleCompletionDetails'
import { getNowShotTime } from '@/utils/tool' import { getNowShotTime } from '@/utils/tool'
import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
@@ -203,6 +214,14 @@ export default {
剩余数量: 0 剩余数量: 0
} }
}, },
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])
},
created() { created() {
this.searchTable() this.searchTable()
}, },
@@ -273,9 +292,9 @@ export default {
}, },
timeChange() { timeChange() {
if (this.form1.完成数量 > 0) { if (this.form1.完成数量 > 0) {
this.加工时间 = this.form1.录入工时 * this.form1.完成数量 this.加工时间 = Number(this.form1.录入工时) * Number(this.form1.完成数量) + Number(this.form1.录入准结)
} else { } else {
this.加工时间 = this.form1.录入工时 this.加工时间 = Number(this.form1.录入工时) + Number(this.form1.录入准结)
} }
}, },
submit1() { submit1() {
@@ -288,6 +307,7 @@ export default {
param[4] = ['录入工时', this.form1.录入工时] param[4] = ['录入工时', this.form1.录入工时]
param[5] = ['录入准结', this.form1.录入准结] param[5] = ['录入准结', this.form1.录入准结]
param[6] = ['备注', this.form1.备注] param[6] = ['备注', this.form1.备注]
param[7] = ['修改人员', this.id]
var Data1 = this.CreateData('11', 'MES_机加工MES_编辑备注_Vue_New', param) var Data1 = this.CreateData('11', 'MES_机加工MES_编辑备注_Vue_New', param)
this.ExecDatabase(Data1).then(response => { this.ExecDatabase(Data1).then(response => {
if (response.data[0].result === 1) { if (response.data[0].result === 1) {

View File

@@ -35,7 +35,7 @@
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button> <el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
</el-card> </el-card>
<el-card style="margin-top: 5px"> <el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2"> <el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table-column label="供应商" align="center" min-width="150"> <el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}