Commit d33264c9 authored by 沈翠玲's avatar 沈翠玲

生产报工

parent 49e50954
...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询生产报工记录列表 // 查询生产报工记录列表
export function listFeedback(query) { export function listFeedback(query) {
return request({ return request({
url: '/mes/pro/feedback/list', url: '/mes/pro/feedback/listRePort',
method: 'get', method: 'get',
params: query params: query
}) })
......
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
:value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="编排单号" prop="arrangeCode">
<el-input v-model="queryParams.arrangeCode" placeholder="请输入编排单号" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="工作中心名称" prop="workstationName"> <el-form-item label="工作中心名称" prop="workstationName">
<el-input v-model="queryParams.workstationName" placeholder="请输入工作中心名称" clearable <el-input v-model="queryParams.workstationName" placeholder="请输入工作中心名称" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
...@@ -57,13 +61,14 @@ ...@@ -57,13 +61,14 @@
--> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="feedbackList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="feedbackList" @selection-change="handleSelectionChange" show-summary :summary-method="getSummaries">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="报工类型" align="center" width="80" prop="feedbackType"> <el-table-column label="报工类型" align="center" width="80" prop="feedbackType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.mes_feedback_type" :value="scope.row.feedbackType" /> <dict-tag :options="dict.type.mes_feedback_type" :value="scope.row.feedbackType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编排单号" width="120" align="center" prop="arrangeCode" />
<el-table-column label="工作中心" width="120" align="center" prop="workstationName" /> <el-table-column label="工作中心" width="120" align="center" prop="workstationName" />
<el-table-column label="工作单元" width="120" align="center" prop="workunitName" /> <el-table-column label="工作单元" width="120" align="center" prop="workunitName" />
<el-table-column label="外协单号" width="150" align="center" prop="assistProcessCode" /> <el-table-column label="外协单号" width="150" align="center" prop="assistProcessCode" />
...@@ -282,7 +287,7 @@ export default { ...@@ -282,7 +287,7 @@ export default {
total: 0, total: 0,
// 生产报工记录表格数据 // 生产报工记录表格数据
feedbackList: [], feedbackList: [],
totalSum: [],
selectRow: [], selectRow: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
...@@ -316,6 +321,7 @@ export default { ...@@ -316,6 +321,7 @@ export default {
userName: null, userName: null,
nickName: null, nickName: null,
feedbackChannel: null, feedbackChannel: null,
arrangeCode: null,
machineTime: 0, machineTime: 0,
recordUser: null, recordUser: null,
recordNick: null, recordNick: null,
...@@ -353,6 +359,23 @@ export default { ...@@ -353,6 +359,23 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
getSummaries(param){
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = '合计'
} else if (['quantityQualify', 'quantityUnqualify'].indexOf(column.property) > -1) {
sums[index] = this.totalSum[column.property]
} else if (column.label === '报工数量') {
sums[index] = (this.totalSum['quantityQualify'] ? Number(this.totalSum['quantityQualify']) : 0) + (this.totalSum['quantityUnqualify'] ? Number(this.totalSum['quantityUnqualify']) : 0)
} else {
sums[index] = ''
}
})
return sums
},
getSumNumber(row) { getSumNumber(row) {
const first = row.quantityQualify ? Number(row.quantityQualify) : 0 const first = row.quantityQualify ? Number(row.quantityQualify) : 0
const last = row.quantityUnqualify ? Number(row.quantityUnqualify) : 0 const last = row.quantityUnqualify ? Number(row.quantityUnqualify) : 0
...@@ -362,7 +385,8 @@ export default { ...@@ -362,7 +385,8 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
listFeedback(this.queryParams).then(response => { listFeedback(this.queryParams).then(response => {
this.feedbackList = response.rows; this.feedbackList = response.rows.slice(0, response.rows.length - 1);
this.totalSum = response.rows[response.rows.length - 1]
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment