更新
This commit is contained in:
@@ -59,12 +59,12 @@
|
||||
style="width: 100%;"
|
||||
border>
|
||||
<el-table-column label="序号" type="index" align="center" width="55"/>
|
||||
<el-table-column label="零件图号" align="center" min-width="150px">
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="120px">
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -74,12 +74,12 @@
|
||||
{{ scope.row.完成数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称" align="center" min-width="70px">
|
||||
<el-table-column label="工艺名称" prop="工艺名称" align="center" min-width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作者" align="center" min-width="80px">
|
||||
<el-table-column label="操作者" prop="姓名" align="center" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
@@ -115,12 +115,12 @@
|
||||
<span v-else>{{ scope.row.修补工时 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补操作时间" align="center" min-width="160px">
|
||||
<el-table-column label="修补操作时间" prop="修补操作时间" align="center" min-width="160px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修补操作时间 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补人" align="center" min-width="100px">
|
||||
<el-table-column label="修补人" prop="修补人" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修补人 || '—' }}
|
||||
</template>
|
||||
@@ -319,7 +319,7 @@ export default {
|
||||
submitAdd() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
submitAdd(this.form.technology, this.form.timeNumber, this.form.number, this.id).then(res => {
|
||||
submitAdd(this.form.technology, this.form.timeNumber, this.form.number, this.id, this.form.opNum).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.dialogFormVisible = false
|
||||
this.$message.success('操作成功')
|
||||
|
||||
174
src/views/ManufacturingCenter/ActualWorkQuery/index.vue
Normal file
174
src/views/ManufacturingCenter/ActualWorkQuery/index.vue
Normal file
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span class="demonstration">日期:</span>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
:clearable="false"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px;margin-top: 10px"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
@change="pageCurrent=1;total=0;searchTable()"/>
|
||||
<span>操作者:</span>
|
||||
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px; margin-top: 10px;margin-bottom: 10px"/>
|
||||
<el-button :disabled="loading" type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total=0;searchTable();">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" stripe height="700" size="mini" style="width: 1360px;" border>
|
||||
<el-table-column label="序号" type="index" align="center" width="55"/>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数量" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称" prop="工艺名称" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作者" prop="姓名" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际开始时间" align="center" width="160px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工开始时间1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际完成时间" align="center" width="160px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工完成时间1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际工时" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际加工时间段 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补数量" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.isEditing">
|
||||
<el-input v-model="scope.row.数量" class="edit-input" size="mini"/>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.数量 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补工时" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.isEditing">
|
||||
<el-input v-model="scope.row.修补工时" class="edit-input" size="mini"/>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.修补工时 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补操作时间" prop="修补操作时间" align="center" width="160px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修补操作时间 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修补人" prop="修补人" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修补人 || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[100, 500, 1000]"
|
||||
: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/ActualWorkQuery'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getNowShotTime } from '@/utils/tool'
|
||||
|
||||
export default {
|
||||
name: 'ActualTimeSupplement',
|
||||
data() {
|
||||
return {
|
||||
startTime: getNowShotTime(),
|
||||
workerName: '',
|
||||
loading: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 1000,
|
||||
total: 0,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询加工工时统计表
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
let check1, check2
|
||||
this.startTime ? check1 = 1 : check1 = 0
|
||||
this.workerName ? check2 = 1 : check2 = 0
|
||||
searchTable(check1, this.startTime, check2, this.workerName, this.pageCurrent, this.pageSize).then(res => {
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
this.tableData.map(v => {
|
||||
this.$set(v, 'isEditing', false)
|
||||
v.原修补工时 = v.修补工时
|
||||
return v
|
||||
})
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-card{
|
||||
margin: 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -27,18 +27,18 @@
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column label="打印状态" align="center">
|
||||
<el-table-column label="打印状态" prop="备料打印" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.备料打印!=='0'" type="success" size="mini">已导出</el-tag>
|
||||
<el-tag v-else type="warning" size="mini">未导出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" >
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" >
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>工位号:</span>
|
||||
<el-select v-model="MachineValue" filterable size="small" style="width:160px;margin-bottom:10px" placeholder="工位号">
|
||||
<!-- <span>工位号:</span>-->
|
||||
<el-select v-model="MachineValue" filterable size="small" style="width:160px;margin:0px 10px" placeholder="工位号">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
@@ -12,7 +12,7 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>日期:</span>
|
||||
<!-- <span>日期:</span>-->
|
||||
<el-date-picker
|
||||
v-model="Time"
|
||||
value-format="yyyy-MM-dd"
|
||||
@@ -20,7 +20,7 @@
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;searchData()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin:0px 10px" @click="pageSize=10; pageCurrent= 1;searchData()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -71,16 +71,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<!-- <div class="block">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- :current-page="pageCurrent"-->
|
||||
<!-- :page-sizes="[10, 20, 30, 40]"-->
|
||||
<!-- :page-size="pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!-- @size-change="handleSizeChange"-->
|
||||
<!-- @current-change="handleCurrentChange"/>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
<el-card style="width: 49.8%; float: left;margin-right: 5px">
|
||||
<div id="myChart1" style="width: 1000px; height: 570px; margin: auto"/>
|
||||
@@ -187,9 +187,9 @@ export default {
|
||||
time22: '',
|
||||
time33: '',
|
||||
time44: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
// pageCurrent: 1,
|
||||
// pageSize: 10,
|
||||
// total: 0,
|
||||
table: []
|
||||
}
|
||||
},
|
||||
@@ -214,13 +214,13 @@ export default {
|
||||
})
|
||||
},
|
||||
searchData() {
|
||||
getData(this.MachineValue, this.Time, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableDataA = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.time1 = response.data.rows[0].运行持续时间
|
||||
this.time2 = response.data.rows[0].等待持续时间
|
||||
this.time3 = response.data.rows[0].停机持续时间
|
||||
this.time4 = response.data.rows[0].报警持续时间
|
||||
getData(this.MachineValue, this.Time).then(response => {
|
||||
this.tableDataA = response.data
|
||||
// this.total = response.data.total
|
||||
this.time1 = response.data[0].运行持续时间
|
||||
this.time2 = response.data[0].等待持续时间
|
||||
this.time3 = response.data[0].停机持续时间
|
||||
this.time4 = response.data[0].报警持续时间
|
||||
}).then(() => {
|
||||
this.drawLine1()
|
||||
})
|
||||
@@ -445,8 +445,8 @@ export default {
|
||||
} // 数据的值
|
||||
},
|
||||
legend: { // 图例
|
||||
left: 'left'
|
||||
// selectedMode: false, // 图例可点击
|
||||
left: 'left',
|
||||
selectedMode: false // 图例可点击
|
||||
},
|
||||
dataZoom: [{
|
||||
type: 'inside',
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
||||
<span>组号:</span>
|
||||
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-top: 15px;margin-left: 10px" @click="total=0;pageSize=10;pageCurrent=1;searchData();searchTable()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-top: 15px;margin-left: 10px" @click="total=0;pageSize=1000;pageCurrent=1;searchData();searchTable()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="text-align: center;">车间生产</h3>
|
||||
@@ -82,7 +82,7 @@
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
layout="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
@@ -140,7 +140,7 @@
|
||||
:page-size="pageSize00"
|
||||
:total="total00"
|
||||
style="margin-top:10px;display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
layout="total"
|
||||
@size-change="handleSizeChange00"
|
||||
@current-change="handleCurrentChange00"/>
|
||||
</div>
|
||||
@@ -195,7 +195,7 @@
|
||||
:page-size="pageSize01"
|
||||
:total="total01"
|
||||
style="margin-top:10px;display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
layout="total"
|
||||
@size-change="handleSizeChange01"
|
||||
@current-change="handleCurrentChange01"/>
|
||||
</div>
|
||||
@@ -255,7 +255,7 @@
|
||||
:page-size="pageSize02"
|
||||
:total="total02"
|
||||
style="margin-top:10px;display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
layout="total"
|
||||
@size-change="handleSizeChange02"
|
||||
@current-change="handleCurrentChange02"/>
|
||||
</div>
|
||||
@@ -312,7 +312,7 @@
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize5"
|
||||
:total="total5"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
layout="total"
|
||||
@size-change="handleSizeChange5"
|
||||
@current-change="handleCurrentChange5"/>
|
||||
</div>
|
||||
@@ -495,13 +495,13 @@ export default {
|
||||
num: null,
|
||||
PartType: '标准件',
|
||||
pageCurrent00: 1,
|
||||
pageSize00: 10,
|
||||
pageSize00: 1000,
|
||||
pageCurrent01: 1,
|
||||
pageSize01: 10,
|
||||
pageCurrent02: 1,
|
||||
pageSize02: 10,
|
||||
pageSize02: 1000,
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 1000,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
pageCurrent2: 1,
|
||||
@@ -726,12 +726,16 @@ export default {
|
||||
this.dialogFormVisible3 = false
|
||||
},
|
||||
searchTable() {
|
||||
if (this.PartType === '标准件') {
|
||||
this.searchTable0()
|
||||
} else if (this.PartType === '外购件') {
|
||||
this.searchTable1()
|
||||
} else if (this.PartType === '基本件') {
|
||||
this.searchTable2()
|
||||
if (this.machine === '' || this.machine === null) {
|
||||
this.$message.warning('请先选择机床组号')
|
||||
} else {
|
||||
if (this.PartType === '标准件') {
|
||||
this.searchTable0()
|
||||
} else if (this.PartType === '外购件') {
|
||||
this.searchTable1()
|
||||
} else if (this.PartType === '基本件') {
|
||||
this.searchTable2()
|
||||
}
|
||||
}
|
||||
},
|
||||
searchTable0() { // 查询标准件
|
||||
@@ -744,11 +748,10 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询外购件
|
||||
let check1, check2, check3
|
||||
let check1, check2
|
||||
this.machine ? check1 = 1 : check1 = 0
|
||||
this.groupNum ? check2 = 1 : check2 = 0
|
||||
this.entryNameValue ? check3 = 1 : check3 = 0
|
||||
searchTable01(check3, this.entryNameValue, check1, this.machine, check2, this.groupNum, this.pageCurrent01, this.pageSize01, 2).then(response => {
|
||||
searchTable01(check1, this.machine, check2, this.groupNum, this.pageCurrent01, this.pageSize01, 2).then(response => {
|
||||
this.tableData01 = response.data.rows
|
||||
this.total01 = response.data.total
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total = 0;pageSize = 10;pageList = 1;getTable()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total = 0;pageSize = 10000;pageList = 1;getTable()">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
@@ -102,17 +102,17 @@
|
||||
type="selection"
|
||||
align="center"
|
||||
width="35"/>
|
||||
<el-table-column label="零件号" align="center" min-width="220">
|
||||
<el-table-column label="零件号" prop="零件图号" align="center" min-width="220">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center">
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center">
|
||||
<el-table-column label="规格" prop="规格" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
@@ -137,35 +137,11 @@
|
||||
{{ scope.row.未投产数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" width="100">
|
||||
<el-table-column label="零件类型" prop="零件类型名称" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="是否外协" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox v-model="tableData[scope.$index].checked_waixie" @change="gaibianwaixie(scope.$index, scope.row)"/>-->
|
||||
<!--外协-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="是否带料" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox :disabled="!tableData[scope.$index].checked_waixie" v-model="tableData[scope.$index].checked_dailiao"/>-->
|
||||
<!--带料-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="是否着急" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox v-model="tableData[scope.$index].checked_zhaoji"/>-->
|
||||
<!--着急-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column prop="name" label="打回原因" width="170" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-input v-model="tableData[scope.$index].name" type="textarea" :rows="1" style="width:150px" placeholder="原因">-->
|
||||
<!--</el-input>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="操作" width="200px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -174,24 +150,20 @@
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleEdit(scope.$index, scope.row, 'form')">分批投产</el-button>
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--@click="handleDele(scope.$index, scope.row, 'form1')">打回</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
v-show="false"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-sizes="[10, 20, 30, 10000]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="width:50%;display:inline-block;"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>-->
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="打回到零件分配" placement="top">
|
||||
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;margin-left: 10px" @click="back">打回</el-button>
|
||||
</el-tooltip>
|
||||
@@ -219,7 +191,8 @@
|
||||
<template slot-scope="scope">{{ scope.row.零件图号 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件名称">
|
||||
prop="零件名称"
|
||||
label="零件名称" >
|
||||
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -267,15 +240,15 @@
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
v-show="false"
|
||||
:current-page="currentPage3"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-sizes="[10, 20, 30, 10000]"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -425,11 +398,11 @@ export default {
|
||||
gongyijihua: '',
|
||||
radio: 0, // 第一组
|
||||
total: 0, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageSize: 10000, // 每页显示条数
|
||||
pageList: 1, // 后台获取页
|
||||
currentPage: 1, // 显示当前页
|
||||
total3: 0, // 总条数
|
||||
pageSize3: 10, // 每页显示条数
|
||||
pageSize3: 10000, // 每页显示条数
|
||||
pageList3: 1, // 后台获取页
|
||||
currentPage3: 1, // 显示当前页
|
||||
listLoading: false,
|
||||
@@ -724,7 +697,7 @@ export default {
|
||||
this.listLoading1 = false
|
||||
})
|
||||
this.total = 0
|
||||
this.pageSize = 10
|
||||
this.pageSize = 10000
|
||||
this.pageList = 1
|
||||
this.getTable()
|
||||
} else {
|
||||
@@ -787,7 +760,7 @@ export default {
|
||||
this.checked_baitu = false
|
||||
this.checked_gaonandu = false
|
||||
this.total = 0
|
||||
this.pageSize = 10
|
||||
this.pageSize = 10000
|
||||
this.pageList = 1
|
||||
this.shijiancuo1 = 0
|
||||
this.shijiancuo = 0
|
||||
@@ -999,7 +972,7 @@ export default {
|
||||
message: '打回档案成功!'
|
||||
})
|
||||
this.total = 0
|
||||
this.pageSize = 10
|
||||
this.pageSize = 10000
|
||||
this.pageList = 1
|
||||
this.getTable()
|
||||
} else {
|
||||
|
||||
@@ -13,27 +13,27 @@
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table :data="tableData1" stripe border height="700px" size="mini" show-summary>
|
||||
<el-table-column label="名称" sortable prop="物料名称" align="center" width="130" show-overflow-tooltip>
|
||||
<el-table-column label="名称" prop="物料名称" align="center" width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" sortable prop="物料型号" align="center" width="150" show-overflow-tooltip>
|
||||
<el-table-column label="图号或型号" prop="物料型号" align="center" width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" sortable prop="物料规格" align="center" width="200" show-overflow-tooltip>
|
||||
<el-table-column label="规格" prop="物料规格" align="center" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料来源" sortable prop="物料来源" align="center" width="100">
|
||||
<el-table-column label="物料来源" prop="物料来源" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料来源 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" sortable prop="仓库名称" align="center" min-width="90">
|
||||
<el-table-column label="仓库" prop="仓库名称" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
|
||||
224
src/views/ManufacturingCenter/ManHourStatistics/Export2Excel.js
Normal file
224
src/views/ManufacturingCenter/ManHourStatistics/Export2Excel.js
Normal file
@@ -0,0 +1,224 @@
|
||||
/* eslint-disable */
|
||||
require('script-loader!file-saver');
|
||||
// import XLSX from 'xlsx'
|
||||
import XLSX from 'xlsx-style'
|
||||
function generateArray(table) {
|
||||
var out = [];
|
||||
var rows = table.querySelectorAll('tr');
|
||||
var ranges = [];
|
||||
for (var R = 0; R < rows.length; ++R) {
|
||||
var outRow = [];
|
||||
var row = rows[R];
|
||||
var columns = row.querySelectorAll('td');
|
||||
for (var C = 0; C < columns.length; ++C) {
|
||||
var cell = columns[C];
|
||||
var colspan = cell.getAttribute('colspan');
|
||||
var rowspan = cell.getAttribute('rowspan');
|
||||
var cellValue = cell.innerText;
|
||||
if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
|
||||
|
||||
//Skip ranges
|
||||
ranges.forEach(function (range) {
|
||||
if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
|
||||
for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);
|
||||
}
|
||||
});
|
||||
|
||||
//Handle Row Span
|
||||
if (rowspan || colspan) {
|
||||
rowspan = rowspan || 1;
|
||||
colspan = colspan || 1;
|
||||
ranges.push({
|
||||
s: {
|
||||
r: R,
|
||||
c: outRow.length
|
||||
},
|
||||
e: {
|
||||
r: R + rowspan - 1,
|
||||
c: outRow.length + colspan - 1
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//Handle Value
|
||||
outRow.push(cellValue !== "" ? cellValue : null);
|
||||
|
||||
//Handle Colspan
|
||||
if (colspan)
|
||||
for (var k = 0; k < colspan - 1; ++k) outRow.push(null);
|
||||
}
|
||||
out.push(outRow);
|
||||
}
|
||||
return [out, ranges];
|
||||
};
|
||||
|
||||
function datenum(v, date1904) {
|
||||
if (date1904) v += 1462;
|
||||
var epoch = Date.parse(v);
|
||||
return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
|
||||
}
|
||||
|
||||
function sheet_from_array_of_arrays(data, opts) {
|
||||
var ws = {};
|
||||
var range = {
|
||||
s: {
|
||||
c: 10000000,
|
||||
r: 10000000
|
||||
},
|
||||
e: {
|
||||
c: 0,
|
||||
r: 0
|
||||
}
|
||||
};
|
||||
for (var R = 0; R != data.length; ++R) {
|
||||
for (var C = 0; C != data[R].length; ++C) {
|
||||
if (range.s.r > R) range.s.r = R;
|
||||
if (range.s.c > C) range.s.c = C;
|
||||
if (range.e.r < R) range.e.r = R;
|
||||
if (range.e.c < C) range.e.c = C;
|
||||
var cell = {
|
||||
v: data[R][C]
|
||||
};
|
||||
if (cell.v == null) continue;
|
||||
var cell_ref = XLSX.utils.encode_cell({
|
||||
c: C,
|
||||
r: R
|
||||
});
|
||||
|
||||
if (typeof cell.v === 'number') cell.t = 'n';
|
||||
else if (typeof cell.v === 'boolean') cell.t = 'b';
|
||||
else if (cell.v instanceof Date) {
|
||||
cell.t = 'n';
|
||||
cell.z = XLSX.SSF._table[14];
|
||||
cell.v = datenum(cell.v);
|
||||
} else cell.t = 's';
|
||||
|
||||
ws[cell_ref] = cell;
|
||||
}
|
||||
}
|
||||
if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
|
||||
return ws;
|
||||
}
|
||||
|
||||
function Workbook() {
|
||||
if (!(this instanceof Workbook)) return new Workbook();
|
||||
this.SheetNames = [];
|
||||
this.Sheets = {};
|
||||
}
|
||||
|
||||
function s2ab(s) {
|
||||
var buf = new ArrayBuffer(s.length);
|
||||
var view = new Uint8Array(buf);
|
||||
for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
|
||||
return buf;
|
||||
}
|
||||
|
||||
export function export_table_to_excel(id) {
|
||||
var theTable = document.getElementById(id);
|
||||
var oo = generateArray(theTable);
|
||||
var ranges = oo[1];
|
||||
|
||||
/* original data */
|
||||
var data = oo[0];
|
||||
var ws_name = "SheetJS";
|
||||
|
||||
var wb = new Workbook(),
|
||||
ws = sheet_from_array_of_arrays(data);
|
||||
|
||||
/* add ranges to worksheet */
|
||||
// ws['!cols'] = ['apple', 'banan'];
|
||||
ws['!merges'] = ranges;
|
||||
|
||||
/* add worksheet to workbook */
|
||||
wb.SheetNames.push(ws_name);
|
||||
wb.Sheets[ws_name] = ws;
|
||||
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: 'xlsx',
|
||||
bookSST: false,
|
||||
type: 'binary'
|
||||
});
|
||||
|
||||
saveAs(new Blob([s2ab(wbout)], {
|
||||
type: "application/octet-stream"
|
||||
}), "test.xlsx")
|
||||
}
|
||||
|
||||
export function export_json_to_excel({
|
||||
headerGroup,
|
||||
dataGroup,
|
||||
sheetGroup,
|
||||
filename,
|
||||
autoWidth = true,
|
||||
bookType= 'xlsx'
|
||||
} = {}) {
|
||||
var wb = new Workbook()
|
||||
for (let i = 0; i < dataGroup.length; i++) {
|
||||
/* original data */
|
||||
let data = dataGroup[i]
|
||||
filename = filename || 'excel-list'
|
||||
data = [...data]
|
||||
data.unshift(headerGroup[i]);
|
||||
var ws_name = sheetGroup[i];
|
||||
var ws = sheet_from_array_of_arrays(data);
|
||||
|
||||
if (autoWidth) {
|
||||
/*设置worksheet每列的最大宽度*/
|
||||
const colWidth = data.map(row => row.map(val => {
|
||||
/*先判断是否为null/undefined*/
|
||||
if (val == null) {
|
||||
return {
|
||||
'wch': 10
|
||||
};
|
||||
}
|
||||
/*再判断是否为中文*/
|
||||
else if (val.toString().charCodeAt(0) > 255) {
|
||||
return {
|
||||
'wch': val.toString().length * 2
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
'wch': val.toString().length
|
||||
};
|
||||
}
|
||||
}))
|
||||
/*以第一行为初始值*/
|
||||
let result = colWidth[0];
|
||||
for (let i = 1; i < colWidth.length; i++) {
|
||||
for (let j = 0; j < colWidth[i].length; j++) {
|
||||
if (result[j]['wch'] < colWidth[i][j]['wch']) {
|
||||
result[j]['wch'] = colWidth[i][j]['wch'];
|
||||
}
|
||||
}
|
||||
}
|
||||
ws['!cols'] = result;
|
||||
}
|
||||
let R = 0;
|
||||
data.map(item => {
|
||||
let C = 0;
|
||||
item.map(itm => {
|
||||
var cell_ref = XLSX.utils.encode_cell({c:C,r:R});
|
||||
var cell = {v: itm }
|
||||
cell.s= {
|
||||
alignment: {
|
||||
horizontal: "center"
|
||||
}
|
||||
}
|
||||
ws[cell_ref] = cell;
|
||||
C++;
|
||||
})
|
||||
R++;
|
||||
})
|
||||
/* add worksheet to workbook */
|
||||
wb.SheetNames.push(ws_name);
|
||||
wb.Sheets[ws_name] = ws;
|
||||
}
|
||||
var wbout = XLSX.write(wb, {
|
||||
bookType: bookType,
|
||||
bookSST: false,
|
||||
type: 'binary'
|
||||
});
|
||||
saveAs(new Blob([s2ab(wbout)], {
|
||||
type: "application/octet-stream"
|
||||
}), `${filename}.${bookType}`);
|
||||
}
|
||||
231
src/views/ManufacturingCenter/ManHourStatistics/index.vue
Normal file
231
src/views/ManufacturingCenter/ManHourStatistics/index.vue
Normal file
@@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择开始日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择结束日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="searchTable();">查询</el-button>
|
||||
<el-tooltip :open-delay="1000" content="导出人员工时统计表" placement="right">
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin:0px 10px" @click="exportTable()">导出</el-button>
|
||||
</el-tooltip>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="700" size="mini" stripe style="width: 800px" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="操作者" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="比例" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.比例 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div v-show="false">
|
||||
<el-card>
|
||||
<el-date-picker
|
||||
v-model="startTime2"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择开始日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime2"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择结束日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="searchTable2();">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="380" size="mini" stripe style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="姓名" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="准备工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.准结定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="定额工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单件定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序间质检" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划准备" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工时调整说明" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { searchtable, searchTable2 } from '@/api/ManufacturingCenter/ManHourStatistics'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
workerName: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
startTime2: '',
|
||||
endTime2: '',
|
||||
loading2: false,
|
||||
tableData2: [] // 表格数据
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
if (this.startTime && this.endTime) {
|
||||
this.timeCheck = 1
|
||||
} else {
|
||||
this.startTime = ''
|
||||
this.endTime = ''
|
||||
this.timeCheck = 0
|
||||
}
|
||||
if (this.workerName) {
|
||||
this.workerName_ckeck = 1
|
||||
} else {
|
||||
this.workerName_ckeck = 0
|
||||
}
|
||||
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.tableData = response.data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
exportTable() {
|
||||
import('./Export2Excel').then(excel => {
|
||||
const filterVal1 = ['姓名', '理论加工时间段', '实际加工时间段', '比例']
|
||||
const data1 = this.tableData.map(v => filterVal1.map(j => v[j]))
|
||||
const dataGroup = []
|
||||
dataGroup.push(data1)
|
||||
const headerGroup = [['操作者', '计划工时', '加工工时', '比例']]
|
||||
const sheetGroup = ['工时统计表']
|
||||
excel.export_json_to_excel({
|
||||
headerGroup: headerGroup,
|
||||
dataGroup: dataGroup,
|
||||
sheetGroup: sheetGroup,
|
||||
filename: '工时统计表',
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchTable2() {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.total2 = 0
|
||||
if (this.startTime && this.endTime) {
|
||||
this.timeCheck = 1
|
||||
} else {
|
||||
this.startTime = ''
|
||||
this.endTime = ''
|
||||
this.timeCheck = 0
|
||||
}
|
||||
if (this.workerName) {
|
||||
this.workerName_ckeck = 1
|
||||
} else {
|
||||
this.workerName_ckeck = 0
|
||||
}
|
||||
searchTable2(this.workerName_ckeck, this.workerName, this.timeCheck, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response.data)
|
||||
this.total2 = response.data.length
|
||||
this.tableData2 = response.data
|
||||
this.loading2 = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -35,12 +35,12 @@
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="350" style="width: 100%;margin: 3px 0" size="mini" border stripe highlight-current-row element-loading-text="拼命加载中" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="280px">
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
@@ -78,12 +78,12 @@
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="350" style="width: 100%;margin: 3px 0" size="mini" border stripe highlight-current-row element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="零件名称" align="center" width="220px">
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" width="240px">
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="240px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getMachine()
|
||||
this.searchTable()
|
||||
// this.searchTable()
|
||||
this.searchTable2()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange">
|
||||
<!-- <span>机床编号:</span>-->
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin:0px 10px" clearable @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
@@ -13,8 +13,8 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable>
|
||||
<!-- <span>组号:</span>-->
|
||||
<el-select v-model="groupNumberValue" filterable placeholder="组号" style="margin:0px 10px" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
@@ -32,27 +32,27 @@
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="250px" @row-click="searchPart">
|
||||
<el-table-column label="项目名称" align="center">
|
||||
<el-table-column label="项目名称" prop="项目名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床编号" align="center">
|
||||
<el-table-column label="机床编号" prop="机床图号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center">
|
||||
<el-table-column label="机床名称" prop="机床名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center">
|
||||
<el-table-column label="组号" prop="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center">
|
||||
<el-table-column label="组件名称" prop="组件名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
@@ -196,13 +196,13 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="将零件选择到采购单" placement="top">
|
||||
<el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="purchaseRequisition()">制造部采购</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 15px" @click="purchaseRequisition()">制造部采购</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配到采购部" placement="top">
|
||||
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配为自家生产" placement="top">
|
||||
<el-button type="warning" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="Production()">车间生产</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 15px" @click="Production()">车间生产</el-button>
|
||||
</el-tooltip>
|
||||
</el-card>
|
||||
<el-card>
|
||||
|
||||
@@ -53,22 +53,22 @@
|
||||
type="selection"
|
||||
align="center"
|
||||
width="55"/>
|
||||
<el-table-column label="机床号" align="center">
|
||||
<el-table-column label="机床号" prop="机床图号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center">
|
||||
<el-table-column label="组号" prop="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center">
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center">
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -78,7 +78,7 @@
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺员" align="center">
|
||||
<el-table-column label="工艺员" prop="工艺员" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺员 }}
|
||||
</template>
|
||||
|
||||
1661
src/views/ManufacturingCenter/ProcessPlanningNew/index.vue
Normal file
1661
src/views/ManufacturingCenter/ProcessPlanningNew/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -341,7 +341,6 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="工艺选择" center width="800px">
|
||||
<el-form ref="form" :model="form" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
@@ -396,7 +395,6 @@
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="已完工艺选择" center width="800px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="80px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
@@ -471,7 +469,6 @@
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible3" title="工艺定额人员" center style="min-height: 300px">
|
||||
<el-table :data="tableData3" size="mini" style="width: 97%;max-height: 300px" height="300" highlight-current-row border @row-click="selectPerson">
|
||||
<el-table-column align="center" label="考勤编号" width="150">
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
stripe
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column align="center" type="selection"/>
|
||||
<el-table-column align="center" label="零件号" min-width="160">
|
||||
<el-table-column align="center" label="零件号" prop="零件号" min-width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称">
|
||||
<el-table-column align="center" prop="零件名称" label="零件名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
|
||||
348
src/views/ManufacturingCenter/ProcessingStatusNew/index.vue
Normal file
348
src/views/ManufacturingCenter/ProcessingStatusNew/index.vue
Normal file
@@ -0,0 +1,348 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<!-- <el-button :disabled="isShow" type="info" size="small" style="margin: 0px 10px;" @click="EditData">补录完成日期</el-button>-->
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="getGroup">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin:0px 10px;width: 120px;" @change="getTableData">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;margin:0px 10px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col style="width: 630px">
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
:row-class-name="tableRowClassName"
|
||||
loading="loading"
|
||||
class="table"
|
||||
style="max-height: 830px"
|
||||
highlight-current-row
|
||||
empty-text=" "
|
||||
border>
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column align="center" label="工艺名" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="序间质检" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序间质检 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="不合格数" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.不合格数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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">
|
||||
{{ scope.row.排产日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="完成日期" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width: 930px">
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:row-class-name="tableRowClassName"
|
||||
loading="loading"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
border
|
||||
height="800"
|
||||
@current-change="getCurrentRow">
|
||||
<el-table-column type="index" label="序号" width="65">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row.序号" v-model="radio"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件图号" show-overflow-tooltip width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" show-overflow-tooltip width="140">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="加工数" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计划数" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.投产数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="加工完成" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计划完成" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划结束时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="用户名称" show-overflow-tooltip width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[100, 200, 300, 400]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMachines, getGroups, getTable, gettabledata1 } from '@/api/ManufacturingCenter/ProcessingStatusNew'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Machine: '', // 机床号
|
||||
Machines: [],
|
||||
Group: '', // 组号
|
||||
Groups: [],
|
||||
number: '', // 零件图号
|
||||
tableData: [], // 工序表
|
||||
loading: '',
|
||||
checkbox_Machine: '', // 机床
|
||||
checkbox_Group: '', // 分组
|
||||
checkbox_number: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 100,
|
||||
total: 0,
|
||||
tableData1: [], // 工序表
|
||||
radio: '',
|
||||
completeTime: '', // 完成时间
|
||||
row1: [],
|
||||
isShow: true,
|
||||
processSerialNumber: '', // 工序流水号
|
||||
startTime: '', // 开始时间
|
||||
endTime: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getMachine()
|
||||
},
|
||||
methods: {
|
||||
getMachine() {
|
||||
if (Cookie.get('machineValue') !== undefined) {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
if (Cookie.get('group') !== undefined) {
|
||||
this.Machine = parseInt(Cookie.get('machineValue'))
|
||||
this.getGroup()
|
||||
this.getTableData()
|
||||
this.Group = parseInt(Cookie.get('group'))
|
||||
// this.getTableData()
|
||||
Cookie.remove('machineValue')
|
||||
Cookie.remove('group')
|
||||
} else {
|
||||
// this.getTableData()
|
||||
Cookie.remove('machineValue')
|
||||
Cookie.remove('group')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getTableData()
|
||||
}
|
||||
}, // 获取组号
|
||||
getGroup() {
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getGroups(this.Machine).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Groups.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
this.Group = response.data[0].组件流水号
|
||||
})
|
||||
this.getTableData()
|
||||
}, // 按条件查询
|
||||
getTableData() {
|
||||
this.tableData = []
|
||||
this.Loading = true
|
||||
if (this.Machine === '') {
|
||||
this.checkbox_Machine = 0
|
||||
} else {
|
||||
this.checkbox_Machine = 1
|
||||
}
|
||||
if (this.Group === '') {
|
||||
this.checkbox_Group = 0
|
||||
} else {
|
||||
this.checkbox_Group = 1
|
||||
}
|
||||
if (this.number === '') {
|
||||
this.checkbox_number = 0
|
||||
} else {
|
||||
this.checkbox_number = 1
|
||||
}
|
||||
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
// while (response.data.rows[i].机加工实际完成时间.indexOf('-') >= 0) {
|
||||
// response.data.rows[i].机加工实际完成时间 = (response.data.rows[i].机加工实际完成时间.replace('-', '/'))
|
||||
// }
|
||||
// while (response.data.rows[i].机加工结束时间.indexOf('-') >= 0) {
|
||||
// response.data.rows[i].机加工结束时间 = (response.data.rows[i].机加工结束时间.replace('-', '/'))
|
||||
// }
|
||||
this.tableData.push({
|
||||
工艺计划流水号: response.data.rows[i].工艺计划流水号,
|
||||
序号: response.data.rows[i].序号,
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
零件名称: response.data.rows[i].零件名称,
|
||||
加工数: response.data.rows[i].完成数量, // MES里采集 现在没有
|
||||
投产数量: response.data.rows[i].批次数量,
|
||||
// 完成日期: response.data.rows[i].完成日期,
|
||||
完成日期: response.data.rows[i].机加工实际完成时间 ? response.data.rows[i].机加工实际完成时间.split(' ')[0] : '', // 排产时间
|
||||
计划结束时间: response.data.rows[i].机加工结束时间 ? response.data.rows[i].机加工结束时间.split(' ')[0] : '',
|
||||
// 计划结束时间: response.data.rows[i].计划结束时间,
|
||||
客户名称: response.data.rows[i].客户名称 // 客户名
|
||||
})
|
||||
}
|
||||
}
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
}, // 获取工序表
|
||||
getCurrentRow(row) {
|
||||
// this.radio = row.序号
|
||||
this.radio = true
|
||||
this.tableData1 = []
|
||||
gettabledata1(row.工艺计划流水号).then(response => {
|
||||
console.log(response, 909090)
|
||||
if (response.data.length !== 0) {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
// while (response.data[i].计划日期.indexOf('-') >= 0) {
|
||||
// response.data[i].计划日期 = (response.data[i].计划日期.replace('-', '/'))
|
||||
// }
|
||||
// while (response.data[i].工序完成日期.indexOf('-') >= 0) {
|
||||
// response.data[i].工序完成日期 = (response.data[i].工序完成日期.replace('-', '/'))
|
||||
// }
|
||||
this.tableData1.push({
|
||||
工艺名称: response.data[i].工艺名称,
|
||||
序间质检: response.data[i].质检结果,
|
||||
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
|
||||
// 排产日期: response.data[i].计划日期,
|
||||
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
|
||||
操作者: response.data[i].操作者,
|
||||
不合格数量: response.data[i].不合格数量,
|
||||
质检数量: response.data[i].数量
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}, // 补加完成日期
|
||||
// EditData() {
|
||||
// editdata(this.processSerialNumber).then(response => {
|
||||
// if (response.data.result === '1') {
|
||||
// this.$message.success('编辑成功')
|
||||
// } else {
|
||||
// this.$message.error('编辑失败')
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// getRow(row) {
|
||||
// console.log(this.completeTime)
|
||||
// this.completeTime = row.完成日期
|
||||
// this.processSerialNumber = row.工序流水号
|
||||
// if (this.completeTime === null) {
|
||||
// this.isShow = false
|
||||
// } else {
|
||||
// this.isShow = true
|
||||
// }
|
||||
// },
|
||||
// 完成日期变色
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
if (row.完成日期 !== '') {
|
||||
return 'CompleteColor'
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.CompleteColor{
|
||||
background: #9bd7fc !important;
|
||||
}
|
||||
</style>
|
||||
@@ -48,7 +48,7 @@
|
||||
style="top: 1px;"
|
||||
placeholder="选择开始日期"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="变更零件加工开始和结束时间" placement="top">
|
||||
<el-button size="small" type="primary" style="margin: 10px" @click="PartPlan()">零件计划变更</el-button>
|
||||
<el-button size="small" type="primary" @click="PartPlan()">零件计划变更</el-button>
|
||||
</el-tooltip>
|
||||
<el-button v-if="false" size="small" type="primary" icon="el-icon-download" @click="Export()">导出Excel</el-button>
|
||||
<el-table
|
||||
@@ -65,12 +65,12 @@
|
||||
type="selection"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="零件图号" align="center" width="200">
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="300">
|
||||
<el-table-column label="零件名称" prop="零件名称" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -134,24 +134,25 @@
|
||||
</el-table>
|
||||
<div v-if="是否扫描 === false" class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
v-show="false"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:page-sizes="[10, 20, 30, 1000000]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="float:left"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="将选中零件自动排出加工工序" placement="top">
|
||||
<el-button type="warning" size="small" icon="el-icon-download" style="float:right;margin:5px 50px 10px 10px" @click="Selection">选入</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" @click="Selection">选入</el-button>
|
||||
</el-tooltip>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" style="float:right;margin:5px 20px 10px 10px" @click="SelectionAll">全部选入</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" @click="SelectionAll">全部选入</el-button>
|
||||
</div>
|
||||
<div v-if="是否扫描 === true" class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="currentPage5"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:page-sizes="[10, 20, 30, 1000000]"
|
||||
:page-size="pageSize5"
|
||||
:total="total5"
|
||||
style="float:left"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -424,7 +425,7 @@
|
||||
<el-pagination
|
||||
:current-page="currentPage1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="float:left"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -705,15 +706,15 @@ export default {
|
||||
tableData2: [], // 导出临时表
|
||||
length: 0, // 记TABLEDATA1的长度
|
||||
total: 0, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageSize: 1000000, // 每页显示条数
|
||||
pageList: 1, // 后台获取页
|
||||
currentPage: 1, // 显示当前页
|
||||
total1: 0, // 总条数
|
||||
pageSize1: 10, // 每页显示条数
|
||||
pageSize1: 1000000, // 每页显示条数
|
||||
pageList1: 1, // 后台获取页
|
||||
currentPage1: 1, // 显示当前页
|
||||
total5: 0, // 总条数
|
||||
pageSize5: 10, // 每页显示条数
|
||||
pageSize5: 1000000, // 每页显示条数
|
||||
pageList5: 1, // 后台获取页
|
||||
currentPage5: 1 // 显示当前页
|
||||
}
|
||||
|
||||
@@ -186,7 +186,8 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { SelectMachine } from '@/api/ManufacturingCenter/ParseQuery'
|
||||
<script>
|
||||
import { SelectMachine } from '@/api/ManufacturingCenter/ParseQuery'
|
||||
import request from '@/utils/request'
|
||||
export default {
|
||||
data() {
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择开始加工日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择加工完成日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
|
||||
<!-- <el-tooltip :open-delay="1000" content="导出人员工时统计表" placement="right">-->
|
||||
<!-- <el-button type="primary" size="small" icon="el-icon-download" style="margin:0px 10px" @click="exportUninquirySheet1()">导出</el-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col style="width: 400px">
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
stripe
|
||||
style="width: 100%;"
|
||||
height="800px"
|
||||
border
|
||||
element-loading-text="拼命加载中"
|
||||
@row-click="searchTable2">
|
||||
<el-table-column label="操作者" align="center" width="110px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工工时" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div>
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="margin-left: 0px;width: 830px">
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe highlight-current-row style="width: 100%;" height="800px" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="零件图号" align="center" width="150px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="130px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数量" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序间质检" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.质检结果 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.不合格数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划工时" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.理论加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工工时" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际加工时间段 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工完成时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div>
|
||||
<el-pagination
|
||||
v-if="!loading2"
|
||||
:current-page="pageCurrent2"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
layout="total"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, searchtable2 } from '@/api/ManufacturingCenter/ScheduleCompletionDetails'
|
||||
import { getNowTime } from '@/utils/tool'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
startTime: '', // 开始时间
|
||||
endTime: getNowTime(), // 结束时间
|
||||
tableData: [], // 操作者工时统计
|
||||
loading: '',
|
||||
tableData2: [], // 工序统计表
|
||||
loading2: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10000,
|
||||
total: '',
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10000,
|
||||
total2: '',
|
||||
timeCheck: '',
|
||||
operater: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
this.tableData2 = []
|
||||
this.total2 = 0
|
||||
if (this.startTime !== '' && this.startTime !== null && this.endTime !== null && this.endTime !== null) {
|
||||
this.timeCheck = 1
|
||||
} else {
|
||||
// this.startTime = ''
|
||||
// this.endTime = ''
|
||||
this.timeCheck = 0
|
||||
}
|
||||
searchtable(this.operater, this.timeCheck, this.startTime, this.endTime, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading = false
|
||||
} else {
|
||||
this.total = response.data.total
|
||||
this.tableData = response.data.rows
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}, // 获取工序表
|
||||
searchTable2(row) {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.pageCurrent2 = 1
|
||||
searchtable2(row.人员编号, this.timeCheck, this.startTime, this.endTime, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData2.push({
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
零件名称: response.data.rows[i].零件名称,
|
||||
工艺名称: response.data.rows[i].工艺名称,
|
||||
完成数量: response.data.rows[i].完成数量,
|
||||
质检结果: response.data.rows[i].质检结果,
|
||||
不合格数量: response.data.rows[i].不合格数量,
|
||||
理论加工时间段: response.data.rows[i].理论加工时间段,
|
||||
实际加工时间段: response.data.rows[i].实际加工时间段,
|
||||
加工完成时间: response.data.rows[i].加工完成时间 ? response.data.rows[i].加工完成时间.split(' ')[0] : ''
|
||||
})
|
||||
}
|
||||
}
|
||||
this.loading2 = false
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
306
src/views/ManufacturingCenter/ShopScheduling/index.vue
Normal file
306
src/views/ManufacturingCenter/ShopScheduling/index.vue
Normal file
@@ -0,0 +1,306 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col style="width: 650px">
|
||||
<el-card style="height: 800px">
|
||||
<el-row style="margin-top: 5px">
|
||||
<el-select v-model="PersonValue" filterable placeholder="操作者" size="small" style="width: 100px;float: right" @change="searchTableData2">
|
||||
<el-option
|
||||
v-for="item in Person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-row>
|
||||
<el-table v-loading="loading1" :data="tableData1" :row-class-name="tableData1ClassName" height="710" highlight-current-row size="mini" style="width: 100%" border @row-click="getGongxu">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="图号及规格" align="center" width="190px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号及规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="制品名称" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.投产数量 }}
|
||||
</template>
|
||||
</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.计划结束时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[50, 100, 200, 500, 1000]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
:pager-count="5"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width: 650px">
|
||||
<el-card style="height: 800px">
|
||||
<el-table :data="tableData2" height="380" highlight-current-row size="mini" style="width: 100%" border stripe @row-dblclick="XuanChu">
|
||||
<el-table-column label="零件图号" align="center" width="190px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="制品名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.投产数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作者" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="tableData3" :row-class-name="tableData3ClassName" height="393" size="mini" style="width: 100%" border @row-dblclick="XuanRu">
|
||||
<el-table-column label="序号" align="center" width="50px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</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="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.排产时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成日期" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getPerson, getParts, getGongxu, XuanRu, XuanChu, searchTableData2, panDuan } from '@/api/ManufacturingCenter/ShopScheduling'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
index: 0,
|
||||
工艺计划流水号: '',
|
||||
PersonValue: '',
|
||||
Person: [],
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
loading3: false,
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
total: 0, // 总条数
|
||||
pageSize: 500,
|
||||
pageCurrent: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getPerson()
|
||||
this.getParts()
|
||||
},
|
||||
methods: {
|
||||
getPerson() {
|
||||
this.PersonValue = ''
|
||||
this.Person = []
|
||||
getPerson().then(response => {
|
||||
response.data.map(v => {
|
||||
this.Person.push({
|
||||
label: v.姓名,
|
||||
value: v.人员编号
|
||||
})
|
||||
})
|
||||
this.PersonValue = this.Person[0].value
|
||||
this.searchTableData2()
|
||||
})
|
||||
},
|
||||
getParts() {
|
||||
this.tableData1 = []
|
||||
this.loading1 = true
|
||||
getParts(this.pageCurrent, this.pageSize).then(response => {
|
||||
response.data.rows.map(v => {
|
||||
this.tableData1.push({
|
||||
工艺计划流水号: v.工艺计划流水号,
|
||||
图号及规格: v.图号及规格,
|
||||
零件名称: v.零件名称,
|
||||
投产数量: v.投产数量,
|
||||
计划开始时间: v.计划开始时间 ? v.计划开始时间.split(' ')[0] : '',
|
||||
计划结束时间: v.计划结束时间 ? v.计划结束时间.split(' ')[0] : '',
|
||||
状态: v.状态
|
||||
})
|
||||
})
|
||||
this.total = response.data.total
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
getGongxu(row) {
|
||||
this.loading3 = true
|
||||
this.tableData3 = []
|
||||
this.index = row.index
|
||||
this.工艺计划流水号 = row.工艺计划流水号
|
||||
getGongxu(row.工艺计划流水号).then(response => {
|
||||
response.data.map(v => {
|
||||
this.tableData3.push({
|
||||
工序流水号: v.工序流水号,
|
||||
工序状态: v.工序状态,
|
||||
工序顺序: v.工序顺序,
|
||||
工艺名称: v.工艺名称,
|
||||
姓名: parseInt(v.工序间是否外协) === 2 ? '外协' : v.姓名,
|
||||
排产时间: v.排产时间 ? v.排产时间.split(' ')[0] : '',
|
||||
完成日期: v.完成日期 ? v.完成日期.split(' ')[0] : '',
|
||||
工序间是否外协: v.工序间是否外协
|
||||
})
|
||||
})
|
||||
this.loading3 = false
|
||||
})
|
||||
},
|
||||
tableData1ClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
if (row.状态 === '1') {
|
||||
return 'CJPClingjianjinxing'
|
||||
}
|
||||
},
|
||||
tableData3ClassName({ row, rowIndex }) {
|
||||
if (row.工序状态 === 4) {
|
||||
return 'CJPCgongxuwancheng'
|
||||
}
|
||||
if (row.工序间是否外协 === 2) {
|
||||
return 'CJPCxujianwaixie'
|
||||
}
|
||||
},
|
||||
searchTableData2() {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
searchTableData2(this.PersonValue).then(response => {
|
||||
this.tableData2 = response.data
|
||||
this.loading2 = false
|
||||
})
|
||||
},
|
||||
XuanRu(row) {
|
||||
if (row.工序状态 !== 4 && row.工序间是否外协 !== 2) {
|
||||
XuanRu(this.PersonValue, row.工序流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.tableData1[this.index].状态 = '1'
|
||||
this.loading3 = true
|
||||
this.tableData3 = []
|
||||
getGongxu(this.工艺计划流水号).then(response => {
|
||||
response.data.map(v => {
|
||||
this.tableData3.push({
|
||||
工序流水号: v.工序流水号,
|
||||
工序状态: v.工序状态,
|
||||
工序顺序: v.工序顺序,
|
||||
工艺名称: v.工艺名称,
|
||||
姓名: parseInt(v.工序间是否外协) === 2 ? '外协' : v.姓名,
|
||||
排产时间: v.排产时间 ? v.排产时间.split(' ')[0] : '',
|
||||
完成日期: v.完成日期 ? v.完成日期.split(' ')[0] : '',
|
||||
工序间是否外协: v.工序间是否外协
|
||||
})
|
||||
})
|
||||
this.loading3 = false
|
||||
})
|
||||
this.searchTableData2()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
XuanChu(row) {
|
||||
XuanChu(row.工序流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
panDuan(row.工艺计划流水号).then(res => {
|
||||
if (res.data[0].状态 === 0) {
|
||||
this.tableData1.map(v => {
|
||||
if (parseInt(v.工艺计划流水号) === parseInt(res.data[0].工艺计划流水号)) {
|
||||
v.状态 = ''
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.loading3 = true
|
||||
this.tableData3 = []
|
||||
getGongxu(this.工艺计划流水号).then(response => {
|
||||
response.data.map(v => {
|
||||
this.tableData3.push({
|
||||
工序流水号: v.工序流水号,
|
||||
工序状态: v.工序状态,
|
||||
工序顺序: v.工序顺序,
|
||||
工艺名称: v.工艺名称,
|
||||
姓名: parseInt(v.工序间是否外协) === 2 ? '外协' : v.姓名,
|
||||
排产时间: v.排产时间 ? v.排产时间.split(' ')[0] : '',
|
||||
完成日期: v.完成日期 ? v.完成日期.split(' ')[0] : '',
|
||||
工序间是否外协: v.工序间是否外协
|
||||
})
|
||||
})
|
||||
this.loading3 = false
|
||||
})
|
||||
this.searchTableData2()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableData3 = []
|
||||
this.pageSize = val
|
||||
this.getParts()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.tableData3 = []
|
||||
this.pageCurrent = val
|
||||
this.getParts()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.CJPCgongxuwancheng{
|
||||
background: #d8e5f6 !important;
|
||||
}
|
||||
.CJPClingjianjinxing{
|
||||
background: #9bd7fc !important;
|
||||
}
|
||||
.CJPCxujianwaixie{
|
||||
background: #e6eaee !important;
|
||||
}
|
||||
</style>
|
||||
@@ -49,14 +49,14 @@
|
||||
@current-change="fetchTableData2">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="province1"
|
||||
prop="零件图号"
|
||||
label="零件号"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.零件图号 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="province2"
|
||||
prop="零件名称"
|
||||
label="零件名称"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<!-- <span>项目名称:</span>-->
|
||||
<el-select
|
||||
v-model="entryNameValue"
|
||||
placeholder="项目名称"
|
||||
style="width:200px;margin-top: 10px"
|
||||
style="width:200px;margin: 10px 10px 0px 10px"
|
||||
size="small"
|
||||
clearable
|
||||
filterable
|
||||
@@ -17,20 +17,18 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" readonly clearable style="width:200px" @change="empty1">
|
||||
<!-- <span>机床图号:</span>-->
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" readonly clearable style="width:200px;margin: 10px 10px 0px 10px" @change="empty1">
|
||||
<el-button slot="append" icon="el-icon-search" @click="SearchMachine" />
|
||||
</el-input>
|
||||
<span>组号:</span>
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" readonly clearable style="width:200px">
|
||||
<!-- <span>组号:</span>-->
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" readonly clearable style="width:200px;margin: 10px 10px 0px 10px">
|
||||
<el-button slot="append" icon="el-icon-search" @click="searchGroupList" />
|
||||
</el-input>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width:200px;margin-top: 10px"/>
|
||||
<span>零件状态:</span>
|
||||
<el-select v-model="partStateValue" placeholder="零件状态" size="small" clearable style="width:200px">
|
||||
<!-- <span>零件图号:</span>-->
|
||||
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width:200px;margin: 10px 10px 0px 10px"/>
|
||||
<!-- <span>零件状态:</span>-->
|
||||
<el-select v-model="partStateValue" placeholder="零件状态" size="small" clearable style="width:200px;margin: 10px 10px 0px 10px">
|
||||
<el-option
|
||||
v-for="item in partState"
|
||||
:key="item.value"
|
||||
@@ -47,13 +45,15 @@
|
||||
<!--</el-select>-->
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button>
|
||||
</el-row>
|
||||
<!-- <el-row>-->
|
||||
<!-- </el-row>-->
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading0"
|
||||
:data="tableData"
|
||||
style="width: 100%;max-height: 600px"
|
||||
height="600"
|
||||
style="width: 100%"
|
||||
height="820"
|
||||
stripe
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
@@ -112,16 +112,16 @@
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<!-- <div class="block" style="margin-top: 10px;">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- :current-page="pageCurrent"-->
|
||||
<!-- :page-sizes="[10, 20, 30, 40, 50]"-->
|
||||
<!-- :page-size="pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!-- @size-change="handleSizeChange"-->
|
||||
<!-- @current-change="handleCurrentChange"/>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center style="min-height: 300px" width="400px">
|
||||
<el-form label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
@@ -272,8 +272,8 @@ export default {
|
||||
partState: [], // 零件状态数组
|
||||
partTypeValue: null, // 零件类型
|
||||
num: null,
|
||||
pageCurrent: 1,
|
||||
pageSize: 20,
|
||||
// pageCurrent: 1,
|
||||
// pageSize: 20,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 20,
|
||||
pageCurrent2: 1,
|
||||
@@ -282,7 +282,7 @@ export default {
|
||||
tableData6: [],
|
||||
tableData: [],
|
||||
state: null,
|
||||
total: null,
|
||||
// total: null,
|
||||
total1: null,
|
||||
total2: null,
|
||||
title: '',
|
||||
@@ -352,16 +352,15 @@ export default {
|
||||
this.check5 = 0
|
||||
}
|
||||
this.loading0 = true
|
||||
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.partNumber, this.check4, this.partStateValue, this.check5, this.partTypeValue, this.pageSize, this.pageCurrent).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].考核状态 = parseInt(response.data.rows[i].考核状态) - 2
|
||||
if (response.data.rows[i].传递时间 !== undefined || response.data.rows[i].hasOwnProperty('传递时间')) {
|
||||
response.data.rows[i].传递时间 = response.data.rows[i].传递时间.split(' ', 2)[0]
|
||||
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.partNumber, this.check4, this.partStateValue, this.check5, this.partTypeValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].考核状态 = parseInt(response.data[i].考核状态) - 2
|
||||
if (response.data[i].传递时间 !== undefined || response.data[i].hasOwnProperty('传递时间')) {
|
||||
response.data[i].传递时间 = response.data[i].传递时间.split(' ', 2)[0]
|
||||
}
|
||||
}
|
||||
this.loading0 = false
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
this.tableData = response.data
|
||||
})
|
||||
},
|
||||
getList() { // 初始化项目名称
|
||||
@@ -454,14 +453,14 @@ export default {
|
||||
cancel() { // 取消
|
||||
this.dialogFormVisible4 = false
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.searchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchData()
|
||||
},
|
||||
// handleSizeChange(val) {
|
||||
// this.pageSize = val
|
||||
// this.searchData()
|
||||
// },
|
||||
// handleCurrentChange(val) {
|
||||
// this.pageCurrent = val
|
||||
// this.searchData()
|
||||
// },
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.SearchMachine()
|
||||
|
||||
@@ -11,17 +11,17 @@
|
||||
|
||||
<el-card>
|
||||
<el-table :data="List" border size="small" stripe highlight-current-row height="500px">
|
||||
<el-table-column label="设备名称" align="center" >
|
||||
<el-table-column label="设备名称" prop="设备名称" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号" align="center" >
|
||||
<el-table-column label="设备编号" prop="设备编号" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备型号" align="center" >
|
||||
<el-table-column label="设备型号" rop="设备型号" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备型号 }}
|
||||
</template>
|
||||
@@ -32,7 +32,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备加工能力" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="scope">p
|
||||
{{ scope.row.设备加工能力工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -2,27 +2,26 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span style="margin-left: 10px">操作者:</span>
|
||||
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px"/>
|
||||
<span class="demonstration">完成加工时间:</span>
|
||||
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px;margin:0px 10px"/>
|
||||
<!-- <span class="demonstration">完成加工时间:</span>-->
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
placeholder="选择开始加工日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
|
||||
placeholder="选择加工完成日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
|
||||
<el-tooltip :open-delay="1000" content="导出人员工时统计表" placement="right">
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="exportUninquirySheet1()">导出</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin:0px 10px" @click="exportUninquirySheet1()">导出</el-button>
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -61,7 +60,7 @@
|
||||
:current-page="pageCurrent"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, prev, pager, next"
|
||||
layout="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
@@ -117,8 +116,8 @@
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<span style="margin-left: 10px">机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin-top: 10px" clearable @change="searchTable4();searchTable6()">
|
||||
<!-- <span style="margin-left: 10px">机床编号:</span>-->
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin:0px 10px" clearable @change="searchTable4();searchTable6()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
@@ -154,16 +153,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="margin: 10px">
|
||||
<el-pagination
|
||||
v-if="!loading3"
|
||||
:current-page="pageCurrent3"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
layout="total, prev, pager, next"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<!-- <div style="margin: 10px">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- v-if="!loading3"-->
|
||||
<!-- :current-page="pageCurrent3"-->
|
||||
<!-- :page-size="pageSize3"-->
|
||||
<!-- :total="total3"-->
|
||||
<!-- layout="total"-->
|
||||
<!-- @size-change="handleSizeChange3"-->
|
||||
<!-- @current-change="handleCurrentChange3"/>-->
|
||||
<!-- </div>-->
|
||||
</el-col>
|
||||
<el-col :span="17" style="margin-left: 30px;">
|
||||
<el-table v-loading="loading4" :data="tableData4" size="mini" height="380" stripe highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
@@ -188,16 +187,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="margin: 10px">
|
||||
<el-pagination
|
||||
v-if="!loading4"
|
||||
:current-page="pageCurrent4"
|
||||
:page-size="pageSize4"
|
||||
:total="total4"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange4"
|
||||
@current-change="handleCurrentChange4"/>
|
||||
</div>
|
||||
<!-- <div style="margin: 10px">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- v-if="!loading4"-->
|
||||
<!-- :current-page="pageCurrent4"-->
|
||||
<!-- :page-size="pageSize4"-->
|
||||
<!-- :total="total4"-->
|
||||
<!-- layout="total"-->
|
||||
<!-- @size-change="handleSizeChange4"-->
|
||||
<!-- @current-change="handleCurrentChange4"/>-->
|
||||
<!-- </div>-->
|
||||
</el-col>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -214,7 +213,7 @@ export default {
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageSize: 1000, // 每页显示条数
|
||||
pageCurrent: 1, // 后台获取页
|
||||
gongzuozhebianhao: '',
|
||||
machinenumber: '',
|
||||
@@ -224,17 +223,17 @@ export default {
|
||||
loading2: false,
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageSize2: 1000, // 每页显示条数
|
||||
pageCurrent2: 1, // 后台获取页
|
||||
loading3: false,
|
||||
tableData3: [], // 表格数据
|
||||
total3: null, // 总条数
|
||||
pageSize3: 10, // 每页显示条数
|
||||
pageSize3: 1000, // 每页显示条数
|
||||
pageCurrent3: 1, // 后台获取页
|
||||
loading4: false,
|
||||
tableData4: [], // 表格数据
|
||||
total4: null, // 总条数
|
||||
pageSize4: 10, // 每页显示条数
|
||||
pageSize4: 1000, // 每页显示条数
|
||||
pageCurrent4: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
@@ -414,12 +413,12 @@ export default {
|
||||
this.tableData4 = []
|
||||
this.total3 = 0
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
searchtable4(this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
searchtable4(this.check1, this.machineNumberValue).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading3 = false
|
||||
} else {
|
||||
this.total3 = response.data.total
|
||||
this.tableData3 = response.data.rows
|
||||
this.tableData3 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading3 = false
|
||||
@@ -430,12 +429,12 @@ export default {
|
||||
this.tableData4 = []
|
||||
this.pageCurrent4 = 1
|
||||
this.machineNumberValue = parseInt(row.机床流水号)
|
||||
searchtable5(this.machineNumberValue, this.pageCurrent4, this.pageSize4).then(response => {
|
||||
searchtable5(this.machineNumberValue).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading4 = false
|
||||
} else {
|
||||
this.total4 = response.data.total
|
||||
this.tableData4 = response.data.rows
|
||||
this.tableData4 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading4 = false
|
||||
@@ -473,26 +472,26 @@ export default {
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable3()
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange3(val) {
|
||||
this.pageCurrent3 = 1
|
||||
this.pageSize3 = val
|
||||
this.searchTable4()
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.pageCurrent3 = val
|
||||
this.searchTable4()
|
||||
},
|
||||
handleSizeChange4(val) {
|
||||
this.pageCurrent4 = 1
|
||||
this.pageSize4 = val
|
||||
this.searchTable6()
|
||||
},
|
||||
handleCurrentChange4(val) {
|
||||
this.pageCurrent4 = val
|
||||
this.searchTable6()
|
||||
}
|
||||
// 分页
|
||||
// handleSizeChange3(val) {
|
||||
// this.pageCurrent3 = 1
|
||||
// this.pageSize3 = val
|
||||
// this.searchTable4()
|
||||
// },
|
||||
// handleCurrentChange3(val) {
|
||||
// this.pageCurrent3 = val
|
||||
// this.searchTable4()
|
||||
// },
|
||||
// handleSizeChange4(val) {
|
||||
// this.pageCurrent4 = 1
|
||||
// this.pageSize4 = val
|
||||
// this.searchTable6()
|
||||
// },
|
||||
// handleCurrentChange4(val) {
|
||||
// this.pageCurrent4 = val
|
||||
// this.searchTable6()
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user