This commit is contained in:
liushuai
2020-02-25 13:38:33 +08:00
18 changed files with 519 additions and 567 deletions

View File

@@ -1,7 +1,6 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称</span>
<el-select v-model="projectValue" filterable clearable size="small" style="margin-right:10px;width: 150px" placeholder="项目名称" @change="typeChange">
<el-option
v-for="item in project"
@@ -9,7 +8,6 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床名称</span>
<el-select v-model="machineValue" clearable filterable size="small" style="margin-right:10px;width: 150px" placeholder="机床名称">
<el-option
v-for="item in machine"
@@ -17,20 +15,6 @@
:label="item.label"
:value="item.value"/>
</el-select>
<!-- <span>分组</span>-->
<!-- <el-select v-model="partValue" clearable filterable size="small" style="margin-right:10px;width: 80px" placeholder="分组">-->
<!-- <el-option-->
<!-- v-for="item in part"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"/>-->
<!-- </el-select>-->
<!-- <span>规格及型号</span>-->
<!-- <el-input v-model="specificationValue" clearable size="small" style="margin-right:10px;width: 150px" placeholder="规格型号"/>-->
<!--<span>加工总工时小时:</span>-->
<!--<el-input v-model="totalProcessingHours" clearable size="small" style="margin-right:10px;width: 100px"/>-->
<!--<span>计划总工时小时:</span>-->
<!--<el-input v-model="totalPlannedHours" clearable size="small" style="margin-right:10px;width: 100px"/>-->
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" style="margin: 0 0 0 10px" plain @click="exportExcel()">导出</el-button>
</el-card>
@@ -122,6 +106,17 @@
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[50, 100, 200, 300]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
@@ -141,7 +136,10 @@ export default {
specificationValue: '', // 规格型号
totalProcessingHours: '', // 加工总工时
totalPlannedHours: '', // 计划总工时
tableData: [] // 详情表
tableData: [], // 详情表
total: 0, // 总条数
pageSize: 50, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
created() {
@@ -151,6 +149,7 @@ export default {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
// 查询按钮
typeChange() {
this.machineValue = ''
this.machine = []
@@ -162,64 +161,67 @@ export default {
})
}
})
}, // 查询按钮
},
// 分页查询
searchTable() {
this.tableData = []
if (this.machineValue) {
this.loading = true
searchatabledata(this.projectValue, this.machineValue).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
searchatabledata(this.projectValue, this.machineValue, this.pageCurrent, this.pageSize).then(response => {
this.loading = false
if (response.data.result.length !== 0) {
for (let i = 0; i < response.data.result.length; i++) {
this.tableData.push({
跟单号: response.data[i].跟单号,
序号: response.data[i].工序顺序,
工序名: response.data[i].工艺名称,
计划数量: response.data[i].批次数量,
计划准备工时: response.data[i].准结定额工时,
单件计划工时: response.data[i].单件定额工时,
计划工时: response.data[i].计划工时,
计划加工日期: response.data[i].计划日期.split(' ')[0],
加工数量: response.data[i].完成数量,
加工准备工时: response.data[i].修补准结工时,
加工工时: response.data[i].设备工时,
扫码工时: response.data[i].扫码工时,
辅助工时: response.data[i].辅助工时,
工时比值: Number(response.data[i].计划工时) === 0 ? 0 : Math.round(response.data[i].扫码工时 / Number(response.data[i].计划工时) * 100) / 100.00,
加工日期: response.data[i].操作时间,
图号及规格: response.data[i].零件图号_零件工艺计划,
制品名称: response.data[i].零件名称
跟单号: response.data.result[i].跟单号,
序号: response.data.result[i].工序顺序,
工序名: response.data.result[i].工艺名称,
计划数量: response.data.result[i].批次数量,
计划准备工时: response.data.result[i].准结定额工时,
单件计划工时: response.data.result[i].单件定额工时,
计划工时: response.data.result[i].计划工时,
计划加工日期: response.data.result[i].计划日期.split(' ')[0],
加工数量: response.data.result[i].完成数量,
加工准备工时: response.data.result[i].修补准结工时,
加工工时: response.data.result[i].设备工时,
扫码工时: response.data.result[i].扫码工时,
辅助工时: response.data.result[i].辅助工时,
工时比值: Number(response.data.result[i].计划工时) === 0 ? 0 : Math.round(response.data.result[i].扫码工时 / Number(response.data.result[i].计划工时) * 100) / 100.00,
加工日期: response.data.result[i].操作时间,
图号及规格: response.data.result[i].零件图号_零件工艺计划,
制品名称: response.data.result[i].零件名称
})
}
this.loading = false
}
this.total = parseInt(response.data.output[0].ItemCount)
})
} else {
this.$message.warning('请选择要查询的机床')
}
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('请查询出要导出的数据')
return
}
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['跟单号', '工序', '工序名', '计划件数', '计划准结(分)', '计划定额(分)', '计划工时(分)', '计划加工日期', '加工件数', '录入准结(分)', '加工工时(分)', '扫码工时(分)', '辅助工时(分)', '工时比值', '加工日期', '图号及规格', '制品名称']
const filterVal = ['跟单号', '序号', '工序名', '计划数量', '计划准备工时', '单件计划工时', '计划工时', '计划加工日期', '加工数量', '加工准备工时', '加工工时', '扫码工时', '辅助工时', '工时比值', '加工日期', '图号及规格', '制品名称']
const list = this.tableData
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '机床工时表',
autoWidth: true,
bookType: 'xlsx'
})
})
var param = []
param[0] = ['项目流水号', this.projectValue]
param[1] = ['机床流水号', this.machineValue]
param[2] = ['PageCurrent', 1]
param[3] = ['PageSize', 999999]
param[4] = ['PageCount', '1111', 'int', '1']
param[5] = ['ItemCount', '1111', 'int', '1']
var Data = this.CreateData('2001', '报表_机床工时统计_查询', param)
this.exportExcel_NPOI(Data)
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}

View File

@@ -25,7 +25,7 @@
type="month"
size="small"
value-format="yyyy-MM"
style="margin-left: 400px; width: 140px"
style="margin-left: 280px; width: 140px"
placeholder="选择月"/>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-top: 10px;margin-bottom: 10px" @click="fetchDate">查询</el-button>
</el-row>

View File

@@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-card>
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 185px;" placeholder="机床号" @change="searchGroupList">
<el-select v-model="Machine" filterable clearable size="small" style="margin: 10px 10px 5px 0px;width: 150px;" placeholder="机床号" @change="searchGroupList">
<el-option
v-for="item in Machines"
:key="item.value"
@@ -11,7 +11,7 @@
<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: 100px;" @change="total=0;pageSize=1000;pageCurrent=1;searchData();searchTable()">
<el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 150px;" @change="total=0;pageSize=1000;pageCurrent=1;searchData();searchTable()">
<el-option
v-for="item in Groups"
:key="item.value"
@@ -21,7 +21,7 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option>
</el-select>
<el-button type="primary" plain 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-button type="primary" plain icon="el-icon-search" size="small" style="margin-left: 20px" @click="total=0;pageSize=1000;pageCurrent=1;searchData();searchTable()">查询</el-button>
</el-card>
<el-card>
<h3 style="text-align: center;">车间生产</h3>
@@ -77,7 +77,7 @@
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<div class="block">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-card style="width: 685px;">
<el-card style="width: 720px;">
<el-date-picker
v-model="startTime"
value-format="yyyy-MM-dd"
@@ -21,8 +21,8 @@
<el-button type="primary" size="small" plain icon="el-icon-download" @click="exportTable()">导出</el-button>
</el-tooltip>
</el-card>
<el-card style="width: 685px">
<el-table v-loading="loading" :data="tableData" size="mini" stripe style="width: 685px" height="650px" border element-loading-text="拼命加载中">
<el-card style="width: 720px">
<el-table v-loading="loading" :data="tableData" size="mini" stripe height="650px" border element-loading-text="拼命加载中">
<el-table-column label="操作者" align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.姓名 }}

View File

@@ -12,12 +12,12 @@
style="width:250px;margin-left: 5px;margin-top: 10px;margin-bottom: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="searchTable">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border>
<el-table-column align="center" label="姓名" width="70px">
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border @sort-change="sortChange">
<el-table-column align="center" label="姓名" width="80px" sortable="custom" prop="姓名">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
@@ -77,16 +77,16 @@
{{ scope.row.不合格数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="加工日期" width="110px" sortable="custom" prop="操作时间">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" width="100px">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="加工日期" width="100px">
<template slot-scope="scope">
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划准结(分)" width="110px">
<template slot-scope="scope">
{{ scope.row.准结定额工时 }}
@@ -128,6 +128,17 @@
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[50, 100, 200, 300]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
@@ -136,49 +147,67 @@ import { searchTable } from '@/api/ManufacturingCenter/MonthEndHourAccounting'
export default {
data() {
return {
tableData: [],
orderName: 0,
order: 0,
startTime: '',
loading: false
tableData: [],
loading: false,
total: 0, // 总条数
pageSize: 50, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
methods: {
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('请查询出要导出的数据')
return
}
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['日期', '姓名', '图号', '跟单号', '工序', '工序名', '录入准结(分)', '实际工时(分)', '扫码工时(分)', '辅助工时(分)', '工时比值', '合格件数', '废品件数', '备注', '计划准结(分)', '计划定额(分)', '计划工时(分)', '项目名称', '机床图号', '组号', '设计', '材料']
const filterVal = ['操作时间', '姓名', '零件图号_零件工艺计划', '跟单号', '工序顺序', '工艺名称', '修补准结工时', '设备工时', '扫码工时', '辅助工时', '工时比值', '合格数量', '不合格数量', '备注', '准结定额工时', '单件定额工时', '计划工时', '项目名称', '机床图号', '组号', '设计者', '材料']
const list = this.tableData
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '月工时核算表',
autoWidth: true,
bookType: 'xlsx'
})
})
var param = []
param[0] = ['开始时间', this.startTime[0]]
param[1] = ['结束时间', this.startTime[1]]
param[2] = ['排序名称', this.orderName]
param[3] = ['排序方式', this.order]
var Data = this.CreateData('2001', '报表_工艺月底工时核算_查询数据', param)
this.exportExcel_NPOI(Data)
},
sortChange(column, prop, order) {
if (column.prop === '姓名') {
this.orderName = 1
} else if (column.prop === '操作时间') { this.orderName = 2 } else {
this.orderName = 2
}
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
this.order = 0
}
this.searchTable()
},
searchTable() {
if (this.startTime[0] && this.startTime[1]) {
this.loading = true
searchTable(this.startTime[0], this.startTime[1]).then(response => {
response.data.map(v => {
searchTable(this.startTime[0], this.startTime[1], this.orderName, this.order, this.pageCurrent, this.pageSize).then(response => {
response.data.rows.map(v => {
this.$set(v, '工时比值', v.计划工时 === 0 ? 0 : Math.round(v.扫码工时 / v.计划工时 * 100) / 100.00)
})
this.tableData = response.data
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
} else {
this.$message.warning('请选择时间段')
}
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}

View File

@@ -28,63 +28,66 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-date-picker
v-model="finishTime"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margin-left: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" size="small" style="margin: 0px 10px" icon="el-icon-search" plain @click="pageCurrent=1;pageSize=300;total=0;searchData()">查询</el-button>
<el-tooltip effect="dark" content="将零件打回,重新编制工艺定额" placement="top">
<el-button v-show="true" type="danger" plain style="margin-left: 0px;margin-top: 3px" icon="el-icon-edit" size="small" @click="returnEdit">零件工艺调整</el-button>
<el-button v-show="true" type="danger" plain style="margin-left: 0px;margin-top: 3px" icon="el-icon-back" size="small" @click="returnEdit">打回重新编制</el-button>
</el-tooltip>
</el-row>
</div>
</el-card>
<el-row>
<el-col style="width: 670px">
<el-col style="width: 750px">
<el-card>
<el-table
v-loading="loading"
:data="tableData"
size="mini"
height="740"
style="width: 650px"
border
stripe
highlight-current-row
@selection-change="handleSelectionChange"
@row-click="click">
<el-table-column
type="selection"
align="center"
width="55"/>
<el-table-column label="机床号" prop="机床图号" align="center" width="120px">
<el-table v-loading="loading" :data="tableData" size="mini" height="740" style="width: 750px" border stripe highlight-current-row @selection-change="handleSelectionChange" @row-click="click">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="机床号" prop="机床图号" align="center" width="95px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="70px">
<el-table-column label="组号" prop="组号" align="center" width="50px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" prop="零件图号" show-overflow-tooltip align="center" min-width="140px">
<el-table-column label="零件图号" prop="零件图号" show-overflow-tooltip align="center" width="175px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" prop="零件名称" show-overflow-tooltip align="center" width="100px">
<el-table-column label="零件名称" prop="零件名称" show-overflow-tooltip align="center" width="130px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="50px">
<el-table-column label="数量" align="center" width="52px">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="工艺员" prop="工艺员" align="center" width="75px">
<el-table-column label="工艺员" prop="工艺员" align="center" width="67px">
<template slot-scope="scope">
{{ scope.row.工艺员 }}
</template>
</el-table-column>
<el-table-column label="编制时间" prop="工艺完成" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.工艺完成 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<div class="block">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[5, 10, 20, 300]"
@@ -167,85 +170,16 @@
</el-card>
</el-col>
</el-row>
<!-- <el-dialog v-el-drag-dialog :visible.sync="dialogFormVisiblePeople" :title="title" center>-->
<!-- <div v-if="tableData2.length">-->
<!-- <table class="tg">-->
<!-- <tr>-->
<!-- <td class="tg-x61c" colspan="4" rowspan="2">江苏高精</td>-->
<!-- <td class="tg-c3ow" colspan="2" rowspan="2">零件条码</td>-->
<!-- <td class="tg-c3ow" colspan="3">零件图号</td>-->
<!-- <td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].零件图号 : '' }}</td>-->
<!-- <td class="tg-c3ow">数量</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td class="tg-c3ow" colspan="3">零件名称</td>-->
<!-- <td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].零件名称 : '' }}</td>-->
<!-- <td class="tg-c3ow" rowspan="3">{{ tableData2[0] ? tableData2[0].投产数量 : '' }}</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td class="tg-c3ow" colspan="2">项目名称</td>-->
<!-- <td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].项目名称 : '' }}</td>-->
<!-- <td class="tg-c3ow" colspan="2" rowspan="2">{{ tableData2[0] ? 'P' + tableData2[0].工艺计划流水号 : '' }}</td>-->
<!-- <td class="tg-c3ow" colspan="3">机床</td>-->
<!-- <td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机床图号 : '' }}</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td class="tg-c3ow">材质</td>-->
<!-- <td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].材料 : '' }}</td>-->
<!-- <td class="tg-c3ow">规格</td>-->
<!-- <td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].原材料规格 : '' }}</td>-->
<!-- <td class="tg-c3ow" colspan="3">组号</td>-->
<!-- <td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].组号 : '' }}</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td class="tg-c3ow">序次</td>-->
<!-- <td class="tg-c3ow">工艺名称</td>-->
<!-- <td class="tg-c3ow" colspan="3">工艺要求</td>-->
<!-- <td class="tg-c3ow">难度系数</td>-->
<!-- <td class="tg-c3ow">工作者</td>-->
<!-- <td class="tg-c3ow">单件</td>-->
<!-- <td class="tg-c3ow">准结</td>-->
<!-- <td class="tg-c3ow">检查结果</td>-->
<!-- <td class="tg-c3ow">计划完成日期</td>-->
<!-- <td class="tg-c3ow">工序条码</td>-->
<!-- </tr>-->
<!-- <tr v-for="(value,key) in tableData2" :id="key" :key="key">-->
<!-- <td class="tg-c3ow">{{ key + 1 }}</td>-->
<!-- <td class="tg-c3ow">{{ value.工艺名称 }}</td>-->
<!-- <td class="tg-c3ow" colspan="3">{{ value.工艺要求 }}</td>-->
<!-- <td class="tg-c3ow">{{ value.工艺难度等级 }}</td>-->
<!-- <td class="tg-c3ow"/>-->
<!-- <td class="tg-c3ow">{{ value.单件定额工时 }}</td>-->
<!-- <td class="tg-c3ow">{{ value.准结定额工时 }}</td>-->
<!-- <td class="tg-c3ow"/>-->
<!-- <td class="tg-c3ow">{{ value.计划日期 }}</td>-->
<!-- <td class="tg-c3ow">{{ value.工序流水号 }}</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td class="tg-c3ow">工艺员</td>-->
<!-- <td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].工艺员 : '' }}</td>-->
<!-- <td class="tg-c3ow">定额员</td>-->
<!-- <td class="tg-c3ow">{{ tableData2[0] ? tableData2[0].定额员 : '' }}</td>-->
<!-- <td class="tg-c3ow">工艺完成</td>-->
<!-- <td class="tg-c3ow">{{ tableData2[0].工艺实际完成时间 ? tableData2[0].工艺实际完成时间.split(' ')[0] : '' }}</td>-->
<!-- <td class="tg-c3ow">加工开始</td>-->
<!-- <td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机加工开始时间 : '' }}</td>-->
<!-- <td class="tg-c3ow">加工结束</td>-->
<!-- <td class="tg-c3ow" colspan="2">{{ tableData2[0] ? tableData2[0].机加工结束时间 : '' }}</td>-->
<!-- </tr>-->
<!-- </table>-->
<!-- </div>-->
<!-- </el-dialog>-->
</div>
</template>
<script>
import { initMachineProject, searchgroup, initPerson, search, searchtable1,
returnEdit } from '@/api/ManufacturingCenter/PartWorkCraftSelect_rdlc'
import { initMachineProject, searchgroup, initPerson, search, searchtable1, returnEdit } from '@/api/ManufacturingCenter/PartWorkCraftSelect_rdlc'
export default {
data() {
return {
finishTime: '',
partNumValue: [],
machineNumberValue: '',
machineNumber: [],
@@ -277,7 +211,7 @@ export default {
},
created() {
this.fetchData()
this.searchData()
// this.searchData()
},
methods: {
returnEdit() { // 在制零件工艺修改
@@ -340,12 +274,13 @@ export default {
},
searchData() {
this.loading = true
let check1, check2, check3, check4
let check1, check2, check3, check4, check5
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
this.PrNum ? check3 = 1 : check3 = 0
this.personValue ? check4 = 1 : check4 = 0
search(this.pageCurrent, this.pageSize, check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.PrNum, check4, this.personValue).then(response => {
this.finishTime ? check5 = 1 : (check5 = 0, this.finishTime = '')
search(this.pageCurrent, this.pageSize, check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.PrNum, check4, this.personValue, check5, this.finishTime[0], this.finishTime[1]).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false

View File

@@ -2,13 +2,12 @@
<div class="app-container">
<el-card>
<el-row>
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px;margin:0px 10px"/>
<!-- <span class="demonstration">完成加工时间:</span>-->
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width: 150px;margin:10px 10px 3px 0"/>
<el-date-picker
v-model="startTime"
value-format="yyyy-MM-dd"
size="small"
style="width: 170px;margin:0px 10px"
style="width: 150px"
type="date"
placeholder="选择开始加工日期"/>
<span class="demonstration">~</span>
@@ -16,188 +15,159 @@
v-model="endTime"
value-format="yyyy-MM-dd"
size="small"
style="width: 170px;margin:0px 10px"
style="width: 150px"
type="date"
placeholder="选择加工完成日期"/>
<el-button type="primary" plain class="el-icon-search" size="small" style="margin:0px 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
<el-button type="primary" plain class="el-icon-search" size="small" style="margin-left: 20px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
<el-tooltip :open-delay="1000" content="导出人员工时统计表" placement="right">
<el-button type="primary" plain size="small" icon="el-icon-download" style="margin:0px 10px" @click="exportUninquirySheet1()">导出</el-button>
</el-tooltip>
</el-row>
<el-row>
<el-col :span="6">
<el-table v-loading="loading" :data="tableData" highlight-current-row height="370" size="mini" stripe style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable2">
<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>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-size="pageSize"
:total="total"
layout="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-col>
<el-col :span="17">
<el-table v-loading="loading2" :data="tableData2" height="370" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="零件图号" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="130px">
<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="100px">
<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="100px">
<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 class="block">
<el-pagination
v-if="!loading2"
:current-page="pageCurrent2"
:page-size="pageSize2"
:total="total2"
layout="total, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-col>
</el-row>
</el-card>
<el-card>
<el-col :span="6">
<el-table
v-loading="loading"
:data="tableData"
highlight-current-row
height="380"
size="mini"
stripe
style="width: 100%;"
border
element-loading-text="拼命加载中"
@row-click="searchTable2">
<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>
<div style="margin: 10px">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-size="pageSize"
:total="total"
layout="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-col>
<el-col :span="17" style="margin-left: 30px;">
<el-table v-loading="loading2" :data="tableData2" height="380" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="零件图号" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="130px">
<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="100px">
<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="100px">
<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 style="margin: 10px">
<el-pagination
v-if="!loading2"
:current-page="pageCurrent2"
:page-size="pageSize2"
:total="total2"
layout="total, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-col>
</el-card>
<el-card>
<!-- <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"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-tooltip :open-delay="1000" content="导出机床工时统计明细表" placement="top">
<el-button type="primary" size="mini" icon="el-icon-download" plain style="margin-left:10px" @click="exportUninquirySheet2()">机床导出</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" content="导出组件工时统计明细表" placement="top">
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px" plain @click="exportUninquirySheet3()">组件导出</el-button>
</el-tooltip>
</el-card>
<el-card>
<el-col :span="6">
<el-table v-loading="loading3" :data="tableData3" stripe size="mini" highlight-current-row height="380" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable5">
<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>
<!-- <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" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
<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" width="120px">
<template slot-scope="scope">
{{ scope.row.实际加工时间段 }}
</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"-->
<!-- @size-change="handleSizeChange4"-->
<!-- @current-change="handleCurrentChange4"/>-->
<!-- </div>-->
</el-col>
<el-row>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="width: 150px;margin:10px 0px 3px 0" clearable @change="searchTable4();searchTable6()">
<el-option
v-for="item in machineNumber"
: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.name }}</div>
</el-option>
</el-select>
<el-tooltip :open-delay="1000" content="导出机床工时统计明细表" placement="top">
<el-button type="primary" size="mini" icon="el-icon-download" plain style="margin-left:20px" @click="exportUninquirySheet2()">机床导出</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" content="导出组件工时统计明细表" placement="top">
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px" plain @click="exportUninquirySheet3()">组件导出</el-button>
</el-tooltip>
</el-row>
<el-row>
<el-col :span="6">
<el-table v-loading="loading3" :data="tableData3" stripe size="mini" highlight-current-row height="335" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable5">
<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>
</el-col>
<el-col :span="17">
<el-table v-loading="loading4" :data="tableData4" size="mini" height="335" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
<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" width="120px">
<template slot-scope="scope">
{{ scope.row.实际加工时间段 }}
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
</div>
</template>
@@ -207,6 +177,7 @@ import { searchtable, searchtable2, searchtable4, searchtable5, initProject, sea
export default {
data() {
return {
AmountInputBox: 231,
workerName: '',
startTime: '',
endTime: '',