This commit is contained in:
liushuai
2020-03-01 15:06:05 +08:00
parent 7674978c4f
commit f9b2c840f7
5 changed files with 71 additions and 46 deletions

View File

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

View File

@@ -52,7 +52,7 @@ export function gettabledata1(num) {
UserID: state.state.user.id, UserID: state.state.user.id,
ModularID: router.currentRoute.path, ModularID: router.currentRoute.path,
type: '1', type: '1',
name: '车间生产管理工艺_加工进度查询_查询_New', name: '车间生产管理工艺_追溯加工过程_查询工序',
param: '工艺计划流水号=' + num + '=int' param: '工艺计划流水号=' + num + '=int'
} }
}) })

View File

@@ -12,6 +12,8 @@
style="width:250px;margin-left: 5px;margin-top: 10px;margin-bottom: 10px" style="width:250px;margin-left: 5px;margin-top: 10px;margin-bottom: 10px"
start-placeholder="开始日期" start-placeholder="开始日期"
end-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-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="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="pageCurrent=1;pageSize=50;searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" plain @click="exportExcel">导出</el-button> <el-button size="small" type="primary" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
</el-card> </el-card>
@@ -19,12 +21,12 @@
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border @sort-change="sortChange"> <el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border @sort-change="sortChange">
<el-table-column align="center" label="姓名" width="80px" sortable="custom" prop="姓名"> <el-table-column align="center" label="姓名" width="80px" sortable="custom" prop="姓名">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.操作工 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="图号" width="150px"> <el-table-column align="center" label="图号" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件图号_零件工艺计划 }} {{ scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="跟单号" width="120px"> <el-table-column align="center" label="跟单号" width="120px">
@@ -42,24 +44,24 @@
{{ scope.row.工艺名称 }} {{ scope.row.工艺名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="录入准结(分)" width="110px"> <!--<el-table-column align="center" label="录入准结(分)" width="110px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.修补准结工时 }} <!--{{ scope.row.修补准结工时 }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column align="center" label="加工工时(分)" width="110px"> <!--<el-table-column align="center" label="加工工时(分)" width="110px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.设备工时 }} <!--{{ scope.row.设备工时 }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column align="center" label="扫码工时(分)" width="110px"> <el-table-column align="center" label="扫码工时(分)" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.扫码工时 }} {{ scope.row.扫码工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="辅助工时(分)" width="110px"> <el-table-column align="center" label="完成工时(分)" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.辅助工时 }} {{ scope.row.完成工时 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="工时比值" width="100px"> <el-table-column align="center" label="工时比值" width="100px">
@@ -67,19 +69,19 @@
{{ scope.row.工时比值 }} {{ scope.row.工时比值 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="合格件数" width="80px"> <el-table-column align="center" label="完成数量" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.合格数量 }} {{ scope.row.完成数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="废品件数" width="80px">
<template slot-scope="scope">
{{ scope.row.不合格数量 }}
</template> </template>
</el-table-column> </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" sortable="custom" prop="操作时间"> <el-table-column align="center" label="加工日期" width="110px" sortable="custom" prop="操作时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.操作时间 }} {{ scope.row.完成日期 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="备注" width="200px" show-overflow-tooltip=""> <el-table-column align="center" label="备注" width="200px" show-overflow-tooltip="">
@@ -150,6 +152,8 @@ export default {
orderName: 0, orderName: 0,
order: 0, order: 0,
startTime: '', startTime: '',
name: '',
partNumber: '',
tableData: [], tableData: [],
loading: false, loading: false,
total: 0, // 总条数 total: 0, // 总条数
@@ -186,8 +190,11 @@ export default {
}, },
searchTable() { searchTable() {
if (this.startTime[0] && this.startTime[1]) { if (this.startTime[0] && this.startTime[1]) {
let check, check1
this.name ? check = 1 : check = 0
this.partNumber ? check1 = 1 : check1 = 0
this.loading = true this.loading = true
searchTable(this.startTime[0], this.startTime[1], this.orderName, this.order, this.pageCurrent, this.pageSize).then(response => { searchTable(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 => { response.data.rows.map(v => {
this.$set(v, '工时比值', parseInt(v.计划工时) === 0 ? 0 : (Math.round(parseInt(v.扫码工时) / parseInt(v.计划工时) * 100) / 100.00)) this.$set(v, '工时比值', parseInt(v.计划工时) === 0 ? 0 : (Math.round(parseInt(v.扫码工时) / parseInt(v.计划工时) * 100) / 100.00))
}) })

View File

@@ -29,7 +29,7 @@
</el-option> </el-option>
</el-select> </el-select>
<el-checkbox v-model="checked" :disabled="isShow2 || (parseInt(token) !== 6 && parseInt(token) !== 19)" size="small" style="margin-left:10px">是否核准</el-checkbox> <el-checkbox v-model="checked" :disabled="isShow2 || (parseInt(token) !== 6 && parseInt(token) !== 19)" size="small" style="margin-left:10px">是否核准</el-checkbox>
<el-button :disabled="disabled" type="success" size="small" plain icon="el-icon-tickets" @click="saveApprove">保存</el-button> <el-button :loading="loading" :disabled="disabled" type="success" size="small" plain icon="el-icon-tickets" @click="saveApprove">保存</el-button>
<el-button v-show="isShowN" type="text" style="margin-top: 8px;float: right" @click="isShowN=false">折叠</el-button> <el-button v-show="isShowN" type="text" style="margin-top: 8px;float: right" @click="isShowN=false">折叠</el-button>
<el-button v-show="!isShowN" type="text" style="margin-top: 8px;float: right" @click="isShowN=true">展开</el-button> <el-button v-show="!isShowN" type="text" style="margin-top: 8px;float: right" @click="isShowN=true">展开</el-button>
</el-card> </el-card>
@@ -1210,6 +1210,7 @@ export default {
this.Specifications = response.data[0].规格 this.Specifications = response.data[0].规格
this.spec = response.data[0].原材料规格 this.spec = response.data[0].原材料规格
this.工艺是否更改 = response.data[0].工艺是否更改 this.工艺是否更改 = response.data[0].工艺是否更改
console.log(this.工艺是否更改, 111)
if (response.data[0].重量 === null) { if (response.data[0].重量 === null) {
this.weight = '' this.weight = ''
} else { } else {
@@ -1513,6 +1514,7 @@ export default {
}, },
saveApprove() { // 核准保存 saveApprove() { // 核准保存
if (this.checked === true) { if (this.checked === true) {
this.loading = true
let 零件图号 let 零件图号
let flag = 0 let flag = 0
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
@@ -1554,6 +1556,7 @@ export default {
if (this.partNumValue === '') { if (this.partNumValue === '') {
this.$message.error('请先选择一个零件') this.$message.error('请先选择一个零件')
} else { } else {
console.log(this.工艺是否更改, 2222)
if (this.工艺是否更改 === 1) { if (this.工艺是否更改 === 1) {
insertOne1(this.partNumValue, row.工序流水号).then(response => { insertOne1(this.partNumValue, row.工序流水号).then(response => {
this.searchDetail() this.searchDetail()

View File

@@ -29,20 +29,29 @@
<el-col style="width: 37%"> <el-col style="width: 37%">
<el-card> <el-card>
<el-table v-loading="loading2" :data="tableData1" :row-class-name="tableRowClassName1" class="table" style="max-height: 830px" highlight-current-row empty-text=" " border @row-click="getRow"> <el-table v-loading="loading2" :data="tableData1" :row-class-name="tableRowClassName1" class="table" style="max-height: 830px" highlight-current-row empty-text=" " border @row-click="getRow">
<el-table-column type="index" label="序" width="50"/> <el-table-column align="center" label="序" show-overflow-tooltip width="50">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
</template>
</el-table-column>
<el-table-column align="center" label="工艺名" show-overflow-tooltip min-width="70"> <el-table-column align="center" label="工艺名" show-overflow-tooltip min-width="70">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工艺名称 }} {{ scope.row.工艺名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="质检" width="60"> <!--<el-table-column align="center" label="已完数量" show-overflow-tooltip min-width="70">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.完成数量 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column align="center" label="投产数" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.序间质检 }} {{ scope.row.批次数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="不合格数" width="80"> <el-table-column align="center" label="完成数" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.不合格数量 }} {{ scope.row.完成数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作者" show-overflow-tooltip width="70"> <el-table-column align="center" label="操作者" show-overflow-tooltip width="70">
@@ -50,7 +59,12 @@
{{ scope.row.操作者 }} {{ scope.row.操作者 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="完成日期" width="95"> <el-table-column align="center" label="扫码开始" show-overflow-tooltip width="90">
<template slot-scope="scope">
{{ scope.row.加工开始时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="加工完成" width="95">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.完成日期 }} {{ scope.row.完成日期 }}
</template> </template>
@@ -367,15 +381,16 @@ export default {
gettabledata1(row).then(response => { gettabledata1(row).then(response => {
if (response.data.length !== 0) { if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
console.log(response.data[i])
this.tableData1.push({ this.tableData1.push({
工艺名称: response.data[i].工艺名称, 工艺名称: response.data[i].工艺名称,
间质检: response.data[i].质检结果, 工序顺: response.data[i].工序顺序,
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '', 加工开始时间: response.data[i].加工开始时间 ? response.data[i].加工开始时间 : '',
完成日期: 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].工序流水号, 工序流水号: response.data[i].工序流水号,
完成过程流水号: response.data[i].完成过程流水号,
工序状态: response.data[i].工序状态, 工序状态: response.data[i].工序状态,
完成数量: response.data[i].完成数量 完成数量: response.data[i].完成数量
}) })
@@ -538,13 +553,13 @@ export default {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({ this.tableData1.push({
工艺名称: response.data[i].工艺名称, 工艺名称: response.data[i].工艺名称,
间质检: response.data[i].质检结果, 工序顺: response.data[i].工序顺序,
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '', 加工开始时间: response.data[i].加工开始时间 ? response.data[i].加工开始时间 : '',
完成日期: 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].工序流水号, 工序流水号: response.data[i].工序流水号,
完成过程流水号: response.data[i].完成过程流水号,
工序状态: response.data[i].工序状态, 工序状态: response.data[i].工序状态,
完成数量: response.data[i].完成数量 完成数量: response.data[i].完成数量
}) })