涂装抛光流程变更

This commit is contained in:
2024-10-18 20:07:46 +08:00
parent 7a2205fa42
commit 5572376c18
9 changed files with 373 additions and 83 deletions

View File

@@ -37,6 +37,13 @@
<el-form-item label="创建人" prop="createBy">
<el-input v-model.trim="queryParams.createBy" placeholder="请输入创建人" clearable />
</el-form-item>
<el-form-item label="类别" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择类别" @change="handleQuery">
<el-option label="全部" :value="-1"></el-option>
<el-option label="非抛光" :value="0"></el-option>
<el-option label="抛光品" :value="1"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="班组" prop="team">
<el-input v-model.trim="queryParams.team" placeholder="请输入班组" clearable />
</el-form-item> -->
@@ -68,9 +75,19 @@
>批量删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出 </el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 10px">
<span style="font-size: 18px; font-weight: 600">投入数:{{ totalQuantity }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">合格数:{{ totalQualifiedNumber }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">合格率:{{ passRate }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">抛光数:{{ totalPaoguangTotal }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">打磨数:{{ totalDamoTotal }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">报废数:{{ totalBaofeiTotal }}</span>
</div>
<!-- 数据区域 -->
<el-table
:data="dataList"
@@ -100,6 +117,12 @@
<el-tag effect="plain" v-if="scope.row.isReturnWorkpiece" type="warning">返工件</el-tag>
</template>
</el-table-column>
<el-table-column prop="type" label="抛光品" align="center">
<template slot-scope="scope">
<el-tag effect="plain" v-if="scope.row.type === 0" type="info"></el-tag>
<el-tag effect="plain" v-if="scope.row.type === 1" type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column prop="startTime" label="开始时间" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="endTime" label="结束时间" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" />
@@ -156,6 +179,9 @@
<el-form-item label="是否为返工件" prop="isReturnWorkpiece">
<el-switch v-model="form.isReturnWorkpiece" active-color="#13ce66"> </el-switch>
</el-form-item>
<el-form-item label="是否为抛光品" prop="isPolish">
<el-switch v-model="form.isPolish" active-color="#13ce66"> </el-switch>
</el-form-item>
</div>
<div>
<el-form-item label="投入数" prop="requireNumber">
@@ -230,6 +256,7 @@ import {
delWmGp12QualityStatistics,
updateWmGp12QualityStatistics,
getWmGp12QualityStatistics,
exportTableData
} from '@/api/wmsManagement/wmGp12QualityStatistics.js'
import ThePartNumberSelect from './ThePartNumberSelect.vue'
export default {
@@ -257,6 +284,7 @@ export default {
pageSize: 10,
startTime: null,
endTime: null,
type:-1,
sort: 'createdTime',
sortType: 'desc',
},
@@ -322,6 +350,7 @@ export default {
typeOptions: [],
// 数据列表
dataList: [],
allDataList:[],
// 总记录数
total: 0,
// 提交按钮是否显示
@@ -337,6 +366,36 @@ export default {
ThePartNumberSelectRef: null,
}
},
computed: {
// 投入数
totalQuantity() {
return this.allDataList.reduce((acc, data) => acc + data.requireNumber, 0)
},
// 合格数
totalQualifiedNumber() {
return this.allDataList.reduce((acc, data) => acc + data.qualifiedNumber, 0)
},
// 抛光数
totalPaoguangTotal() {
return this.allDataList.reduce((acc, data) => acc + data.paoguangTotal, 0)
},
// 打磨数
totalDamoTotal() {
return this.allDataList.reduce((acc, data) => acc + data.damoTotal, 0)
},
// 报废数
totalBaofeiTotal() {
return this.allDataList.reduce((acc, data) => acc + data.baofeiTotal, 0)
},
// 总合格率
passRate() {
if (this.totalQuantity > 0) {
return Math.floor((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%'
} else {
return '0%'
}
},
},
created() {
// 列表数据查询
this.getList()
@@ -354,6 +413,14 @@ export default {
this.loading = false
}
})
let params = JSON.parse(JSON.stringify(this.queryParams))
params.pageNum = 1
params.pageSize = 100000
listWmGp12QualityStatistics(params).then((res) => {
if (res.code == 200) {
this.allDataList = res.data.result
}
})
},
// 取消按钮
cancel() {
@@ -369,6 +436,7 @@ export default {
requireNumber: 0,
team: 'GP12',
isReturnWorkpiece: false,
isPolish:false,
qualifiedNumber: 0,
qualifiedRate: 0,
paoguangTotal: 0,
@@ -487,6 +555,17 @@ export default {
PartNumberSelect(value) {
this.form.partnumber = value
},
/** 导出按钮操作 **/
handleExport() {
const queryParams = this.queryParams
this.$confirm('是否确认导出所查询数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
await exportTableData(queryParams)
}).catch()
},
},
}
</script>

View File

@@ -60,6 +60,7 @@
<!-- 仓库零件数 -->
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 10px">
<span style="font-size: 18px; font-weight: 600">一次合格品仓库零件数:{{ partTotal }}</span>
<span style="font-size: 18px; font-weight: 600;margin-left: 20px;">当前查询结果零件数:{{ totalQuantity }}</span>
</div>
<!-- 数据区域 -->
<el-table
@@ -378,6 +379,7 @@ export default {
statusOptions: [],
// 数据列表
dataList: [],
allDataList:[],
// 总记录数
total: 0,
// 提交按钮是否显示
@@ -416,6 +418,12 @@ export default {
],
}
},
computed: {
// 当前查询库存数量
totalQuantity() {
return this.allDataList.reduce((acc, data) => acc + data.quantity, 0)
},
},
created() {
// 列表数据查询
this.getList()
@@ -433,6 +441,14 @@ export default {
this.loading = false
}
})
let params = JSON.parse(JSON.stringify(this.queryParams))
params.pageNum = 1
params.pageSize = 100000
listWmOneTimeInventory(params).then((res) => {
if (res.code == 200) {
this.allDataList = res.data.result
}
})
getPartNumber().then((res) => {
if (res.code === 200) {
this.partTotal = res.data

View File

@@ -40,6 +40,13 @@
<el-form-item label="班组" prop="team">
<el-input v-model.trim="queryParams.team" placeholder="请输入班组" clearable />
</el-form-item>
<el-form-item label="记录类别" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择记录类别" @change="handleQuery">
<el-option label="全部" :value="-1"></el-option>
<el-option label="正常" :value="0"></el-option>
<el-option label="直接出库" :value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -68,9 +75,19 @@
>批量删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出 </el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 10px">
<span style="font-size: 18px; font-weight: 600">投入数:{{ totalQuantity }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">合格数:{{ totalQualifiedNumber }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">合格率:{{ passRate }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">抛光数:{{ totalPaoguangTotal }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">打磨数:{{ totalDamoTotal }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">报废数:{{ totalBaofeiTotal }}</span>
</div>
<!-- 数据区域 -->
<el-table
:data="dataList"
@@ -99,6 +116,12 @@
<el-tag effect="plain" v-if="scope.row.isReturnWorkpiece" type="warning">返工件</el-tag>
</template>
</el-table-column>
<el-table-column prop="type" label="类别" width="120" align="center">
<template slot-scope="scope">
<el-tag effect="plain" v-if="scope.row.type === 0" type="info">进入一次合格</el-tag>
<el-tag effect="plain" v-if="scope.row.type === 1" type="danger">直接出库</el-tag>
</template>
</el-table-column>
<el-table-column prop="startTime" label="开始时间" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="endTime" label="结束时间" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true" />
@@ -150,6 +173,9 @@
<el-form-item label="是否为返工件" prop="isReturnWorkpiece">
<el-switch v-model="form.isReturnWorkpiece" active-color="#13ce66"> </el-switch>
</el-form-item>
<el-form-item label="是否直接出库" prop="isOver">
<el-switch v-model="form.isOver" active-color="#13ce66"> </el-switch>
</el-form-item>
</div>
<div>
<el-form-item label="投入数" prop="requireNumber">
@@ -224,6 +250,7 @@ import {
delWmPolishQualityStatistics,
updateWmPolishQualityStatistics,
getWmPolishQualityStatistics,
exportTableData
} from '@/api/wmsManagement/wmPolishQualityStatistics.js'
import ThePartNumberSelect from './ThePartNumberSelect.vue'
export default {
@@ -316,6 +343,7 @@ export default {
typeOptions: [],
// 数据列表
dataList: [],
allDataList:[],
// 总记录数
total: 0,
// 提交按钮是否显示
@@ -330,6 +358,36 @@ export default {
ThePartNumberSelectRef: null,
}
},
computed: {
// 投入数
totalQuantity() {
return this.allDataList.reduce((acc, data) => acc + data.requireNumber, 0)
},
// 合格数
totalQualifiedNumber() {
return this.allDataList.reduce((acc, data) => acc + data.qualifiedNumber, 0)
},
// 抛光数
totalPaoguangTotal() {
return this.allDataList.reduce((acc, data) => acc + data.paoguangTotal, 0)
},
// 打磨数
totalDamoTotal() {
return this.allDataList.reduce((acc, data) => acc + data.damoTotal, 0)
},
// 报废数
totalBaofeiTotal() {
return this.allDataList.reduce((acc, data) => acc + data.baofeiTotal, 0)
},
// 总合格率
passRate() {
if (this.totalQuantity > 0) {
return Math.floor((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%'
} else {
return '0%'
}
},
},
created() {
// 列表数据查询
this.getList()
@@ -347,6 +405,14 @@ export default {
this.loading = false
}
})
let params = JSON.parse(JSON.stringify(this.queryParams))
params.pageNum = 1
params.pageSize = 100000
listWmPolishQualityStatistics(params).then((res) => {
if (res.code == 200) {
this.allDataList = res.data.result
}
})
},
// 取消按钮
cancel() {
@@ -362,6 +428,7 @@ export default {
requireNumber: 0,
team: 'A',
isReturnWorkpiece: false,
isOver:false,
qualifiedNumber: 0,
qualifiedRate: 0,
paoguangTotal: 0,
@@ -480,6 +547,17 @@ export default {
PartNumberSelect(value) {
this.form.partnumber = value
},
/** 导出按钮操作 **/
handleExport() {
const queryParams = this.queryParams
this.$confirm('是否确认导出所查询数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
await exportTableData(queryParams)
}).catch()
},
},
}
</script>

View File

@@ -9,27 +9,12 @@
<template>
<div class="app-container">
<!-- :model属性用于表单验证使用 比如下面的el-form-item prop属性用于对表单值进行验证操作 -->
<el-form
:model="queryParams"
size="small"
label-position="right"
inline
ref="queryForm"
:label-width="labelWidth"
v-show="showSearch"
@submit.native.prevent
>
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth" v-show="showSearch" @submit.native.prevent>
<el-form-item label="开始时间" prop="startTime">
<el-date-picker v-model="queryParams.startTime" type="datetime" :clearable="true" placeholder="开始时间"></el-date-picker>
</el-form-item>
<el-form-item label-width="40" label="至" prop="endTime">
<el-date-picker
v-model="queryParams.endTime"
type="datetime"
:clearable="true"
placeholder="结束时间"
default-time="23:59:59"
></el-date-picker>
<el-date-picker v-model="queryParams.endTime" type="datetime" :clearable="true" placeholder="结束时间" default-time="23:59:59"></el-date-picker>
</el-form-item>
<el-form-item label="零件号" prop="partnumber">
<el-input v-model.trim="queryParams.partnumber" placeholder="请输入零件号" clearable />
@@ -40,6 +25,13 @@
<el-form-item label="班组" prop="team">
<el-input v-model.trim="queryParams.team" placeholder="请输入班组" clearable />
</el-form-item>
<!-- <el-form-item label="记录类别" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择记录类别" @change="handleQuery">
<el-option label="全部" :value="-1"></el-option>
<el-option label="正常" :value="0"></el-option>
<el-option label="直接出库" :value="1"></el-option>
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -48,39 +40,25 @@
<!-- 工具区域 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增记录</el-button
>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增记录</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
:disabled="multiple"
plain
icon="el-icon-delete"
size="mini"
@click="handleDelete"
>批量删除</el-button
>
<el-button type="danger" :disabled="multiple" plain icon="el-icon-delete" size="mini" @click="handleDelete">批量删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出 </el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 10px">
<span style="font-size: 18px; font-weight: 600">投入数:{{ totalQuantity }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">合格数:{{ totalQualifiedNumber }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">合格率:{{ passRate }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">打磨数:{{ totalDamoTotal }}</span>
<span style="font-size: 18px; font-weight: 600; margin-left: 20px">报废数:{{ totalBaofeiTotal }}</span>
</div>
<!-- 数据区域 -->
<el-table
:data="dataList"
v-loading="loading"
ref="table"
border
highlight-current-row
@sort-change="sortChange"
@selection-change="handleSelectionChange"
>
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column prop="partnumber" label="零件号" min-width="160" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="description" label="描述" min-width="200" align="center" :show-overflow-tooltip="true" />
@@ -105,31 +83,12 @@
<el-table-column label="操作" align="center" fixed="right" width="140">
<template slot-scope="scope">
<el-button
size="mini"
type="success"
icon="el-icon-edit"
title="编辑"
@click="handleUpdate(scope.row)"
></el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
title="删除"
@click="handleDelete(scope.row)"
></el-button>
<el-button size="mini" type="success" icon="el-icon-edit" title="编辑" @click="handleUpdate(scope.row)"></el-button>
<el-button size="mini" type="danger" icon="el-icon-delete" title="删除" @click="handleDelete(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<pagination
class="mt10"
background
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改抛光管理-质量统计对话框 -->
<el-dialog :title="title" :lock-scroll="false" :visible.sync="open" width="70%" @opened="dialogOpened" :close-on-click-modal="false">
@@ -149,6 +108,9 @@
<el-form-item label="是否为返工件" prop="isReturnWorkpiece">
<el-switch v-model="form.isReturnWorkpiece" active-color="#13ce66"> </el-switch>
</el-form-item>
<el-form-item label="是否跳过后道" prop="isOutbound">
<el-switch v-model="form.isOutbound" active-color="#13ce66"> </el-switch>
</el-form-item>
</div>
<div>
<el-form-item label="投入数" prop="requireNumber">
@@ -214,6 +176,7 @@ import {
delWmPolishWorkQualityStatistics,
updateWmPolishWorkQualityStatistics,
getWmPolishWorkQualityStatistics,
exportTableData,
} from '@/api/wmsManagement/wmPolishWorkQualityStatistics.js'
import ThePartNumberSelect from './ThePartNumberSelect.vue'
export default {
@@ -241,6 +204,7 @@ export default {
pageSize: 10,
startTime: null,
endTime: null,
type:-1,
sort: 'createdTime',
sortType: 'desc',
},
@@ -306,6 +270,7 @@ export default {
typeOptions: [],
// 数据列表
dataList: [],
allDataList: [],
// 总记录数
total: 0,
// 提交按钮是否显示
@@ -320,6 +285,36 @@ export default {
ThePartNumberSelectRef: null,
}
},
computed: {
// 投入数
totalQuantity() {
return this.allDataList.reduce((acc, data) => acc + data.requireNumber, 0)
},
// 合格数
totalQualifiedNumber() {
return this.allDataList.reduce((acc, data) => acc + data.qualifiedNumber, 0)
},
// 抛光数
// totalPaoguangTotal() {
// return this.allDataList.reduce((acc, data) => acc + data.paoguangTotal, 0)
// },
// 打磨数
totalDamoTotal() {
return this.allDataList.reduce((acc, data) => acc + data.damoTotal, 0)
},
// 报废数
totalBaofeiTotal() {
return this.allDataList.reduce((acc, data) => acc + data.baofeiTotal, 0)
},
// 总合格率
passRate() {
if (this.totalQuantity > 0) {
return Math.floor((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%'
} else {
return '0%'
}
},
},
created() {
// 列表数据查询
this.getList()
@@ -337,6 +332,14 @@ export default {
this.loading = false
}
})
let params = JSON.parse(JSON.stringify(this.queryParams))
params.pageNum = 1
params.pageSize = 100000
listWmPolishWorkQualityStatistics(params).then((res) => {
if (res.code == 200) {
this.allDataList = res.data.result
}
})
},
// 取消按钮
cancel() {
@@ -352,6 +355,7 @@ export default {
requireNumber: 0,
team: 'A',
isReturnWorkpiece: false,
isOutbound:false,
qualifiedNumber: 0,
qualifiedRate: 0,
// paoguangTotal: 0,
@@ -470,6 +474,19 @@ export default {
PartNumberSelect(value) {
this.form.partnumber = value
},
/** 导出按钮操作 **/
handleExport() {
const queryParams = this.queryParams
this.$confirm('是否确认导出所查询数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
await exportTableData(queryParams)
})
.catch()
},
},
}
</script>

View File

@@ -44,7 +44,8 @@
<right-toolbar :columns="columns" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 10px">
<span style="font-size: 18px; font-weight: 600">抛光仓库零件数:{{ partTotal }}</span>
<span style="font-size: 18px; font-weight: 600">抛光仓库零件数:{{ partTotal }}</span>
<span style="font-size: 18px; font-weight: 600;margin-left: 20px;">当前查询结果零件数:{{ totalQuantity }}</span>
</div>
<!-- 数据区域 -->
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange" @selection-change="handleSelectionChange">
@@ -197,7 +198,7 @@ import {
doWmPolishStocktaking,
getWmPolishRecordList,
getPartNumber,
exportPolish
exportPolish,
} from '@/api/wmsManagement/wmPolishInventory.js'
import ThePartNumberSelect from './ThePartNumberSelect.vue'
export default {
@@ -270,6 +271,7 @@ export default {
statusOptions: [],
// 数据列表
dataList: [],
allDataList: [],
// 总记录数
total: 0,
// 提交按钮是否显示
@@ -307,6 +309,12 @@ export default {
],
}
},
computed: {
// 当前查询库存数量
totalQuantity() {
return this.allDataList.reduce((acc, data) => acc + data.quantity, 0)
},
},
created() {
// 列表数据查询
this.getList()
@@ -324,6 +332,14 @@ export default {
this.loading = false
}
})
let params = JSON.parse(JSON.stringify(this.queryParams))
params.pageNum = 1
params.pageSize = 100000
listWmPolishInventory(params).then((res) => {
if (res.code == 200) {
this.allDataList = res.data.result
}
})
getPartNumber().then((res) => {
if (res.code === 200) {
this.partTotal = res.data
@@ -501,11 +517,13 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
await exportPolish(queryParams)
}).catch()
})
.then(async () => {
await exportPolish(queryParams)
})
.catch()
},
// 类别(1-正常 2-返工件)字典翻译
// typeFormat(row, column) {
// return this.selectDictLabel(this.typeOptions, row.type)