质量检验方案1
This commit is contained in:
parent
3d4f387f25
commit
b82a0d89a4
34
src/api/warehouseManagement/labelSetting.js
Normal file
34
src/api/warehouseManagement/labelSetting.js
Normal file
@ -0,0 +1,34 @@
|
||||
import request from '@/utils/request'
|
||||
import { downFile } from '@/utils/request'
|
||||
|
||||
export function queryLabelList(query) {
|
||||
return request({
|
||||
url: '/mes/wm/return/getmaterialreturn',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function AddHandle(query) {
|
||||
return request({
|
||||
url: '/mes/wm/return/getmaterialreturn',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function UpdateHandle(query) {
|
||||
return request({
|
||||
url: '/mes/wm/return/getmaterialreturn',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function handleDelete(query) {
|
||||
return request({
|
||||
url: '/mes/wm/return/getmaterialreturn',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="animate__animated animate__shakeX title">车镜油漆缺陷采集系统(二检)</div>
|
||||
<div class="animate__animated animate__shakeX title">车镜油漆缺陷采集系统(抛光)</div>
|
||||
<el-row>
|
||||
<el-col :span="1">
|
||||
<div style="height: 225px">
|
||||
|
||||
@ -22,10 +22,11 @@
|
||||
<div class="grid_sub">
|
||||
<div class="a_11" v-for="(item, index) of paint" :key="index">
|
||||
<div @click="Accumulator(item, index)" class="button_">
|
||||
<el-badge :value="item.counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
|
||||
<div class="context">{{ item.inspectionName }}</div>
|
||||
<el-input-number style="margin-bottom: 0px;" size="mini" v-model="item.counter" @change="handleChange"></el-input-number>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -34,9 +35,8 @@
|
||||
<div class="grid_sub">
|
||||
<div class="a_11" v-for="(item, index) of device" :key="index">
|
||||
<div @click="Accumulator(item, index)" class="button_">
|
||||
<el-badge :value="item.counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
<div class="context">{{ item.inspectionName }}</div>
|
||||
<span role="button" class="el-input-number__decrease"><i class="el-icon-minus"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -267,6 +267,21 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-input-number {
|
||||
width: 68px;
|
||||
}
|
||||
::v-deep .el-input-number__decrease {
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
::v-deep .el-input-number__increase {
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
::v-deep .el-input > .el-input__inner {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 30px;
|
||||
@ -359,14 +374,14 @@ export default {
|
||||
}
|
||||
}
|
||||
.grid > * {
|
||||
height: 250px;
|
||||
height: 300px;
|
||||
background-color: #ebeef5;
|
||||
color: white;
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
|
||||
.grid_sub > * {
|
||||
height: 60px;
|
||||
height: 80px;
|
||||
background-color: #11a983;
|
||||
color: white;
|
||||
border-radius: 0.2em;
|
||||
|
||||
@ -53,27 +53,27 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-colgroup>
|
||||
<vxe-colgroup title="二检">
|
||||
<vxe-column field="qualifiedNum02" title="二检合格数量"></vxe-column>
|
||||
<vxe-column title="二检打磨数量">
|
||||
<vxe-colgroup title="抛光">
|
||||
<vxe-column field="qualifiedNum02" title="抛光合格数量"></vxe-column>
|
||||
<vxe-column title="抛光打磨数量">
|
||||
<template #default="{ row }">
|
||||
<el-link type="warning" @click="QualityAnalysis(row.fkWorkorderId, 4)">{{ row.polishNum02 }}</el-link>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="二检报废数量">
|
||||
<vxe-column title="抛光报废数量">
|
||||
<template #default="{ row }">
|
||||
<el-link type="danger" @click="QualityAnalysis(row.fkWorkorderId, 5)">{{ row.scrapNum02 }}</el-link>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-colgroup>
|
||||
<vxe-colgroup title="三检">
|
||||
<vxe-column field="qualifiedNum03" title="三检合格数量"></vxe-column>
|
||||
<vxe-column title="三检打磨数量">
|
||||
<vxe-colgroup title="包装检验">
|
||||
<vxe-column field="qualifiedNum03" title="包装检验合格数量"></vxe-column>
|
||||
<vxe-column title="包装检验打磨数量">
|
||||
<template #default="{ row }">
|
||||
<el-link type="warning" @click="QualityAnalysis(row.fkWorkorderId, 6)">{{ row.polishNum03 }}</el-link>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="三检报废数量">
|
||||
<vxe-column title="包装检验报废数量">
|
||||
<template #default="{ row }">
|
||||
<el-link type="danger" @click="QualityAnalysis(row.fkWorkorderId, 7)">{{ row.scrapNum03 }}</el-link>
|
||||
</template>
|
||||
@ -117,7 +117,7 @@
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import { QueryQualityStatisticsTable, GetDetailsOfDetectionItems } from '@/api/operationManagement/quality/qualityStatistics.js'
|
||||
import { QueryQualityStatisticsTable, GetDetailsOfDetectionItems } from '@/api/qualityManagement/qualityStatistics.js'
|
||||
export default {
|
||||
name: 'qualityStatistics',
|
||||
data() {
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="animate__animated animate__shakeX title">车镜油漆缺陷采集系统(三检)</div>
|
||||
<div class="animate__animated animate__shakeX title">车镜油漆缺陷采集系统(包装检验)</div>
|
||||
<el-row>
|
||||
<el-col :span="1">
|
||||
<div style="height: 225px">
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<vxe-table stripe border>
|
||||
<vxe-column type="seq" width="60"></vxe-column>
|
||||
<vxe-column field="id" title="流水号"></vxe-column>
|
||||
<vxe-column field="rawMaterialPartNumber" title="原材料零件号"></vxe-column>
|
||||
<vxe-column field="warehouseNumber" title="仓库号"></vxe-column>
|
||||
<vxe-column field="shelfNumber" title="货架号"></vxe-column>
|
||||
<vxe-column field="layerNumber" title="层号"></vxe-column>
|
||||
<vxe-column field="locationNumber" title="库位号"></vxe-column>
|
||||
<vxe-column field="barCode" title="条码"></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'define',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
164
src/views/warehouseManagement/material_check.vue
Normal file
164
src/views/warehouseManagement/material_check.vue
Normal file
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form :model="search" inline>
|
||||
<el-form-item label="年">
|
||||
<el-input v-model="search.year" placeholder="输入年份"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="周">
|
||||
<el-input v-model="search.week" placeholder="输入周"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" style="float: right">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="searchDate(1)">周一</el-button>
|
||||
<el-button type="primary" @click="searchDate(2)">周二</el-button>
|
||||
<el-button type="primary" @click="searchDate(3)">周三</el-button>
|
||||
<el-button type="primary" @click="searchDate(4)">周四</el-button>
|
||||
<el-button type="primary" @click="searchDate(5)">周五</el-button>
|
||||
<el-button type="primary" @click="searchDate(6)">周六</el-button>
|
||||
<el-button type="primary" @click="searchDate(7)">周日</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<pagination
|
||||
:total="pagination.total"
|
||||
:page.sync="pagination.pageNum"
|
||||
:limit.sync="pagination.pageSize"
|
||||
@pagination="GetInspectionStatisticsList"
|
||||
/>
|
||||
<vxe-table :data="IQCList" stripe :edit-config="{ trigger: 'click', mode: 'row' }" @edit-closed="editClosedEvent" ref="xTable" keep-source>
|
||||
<vxe-column type="seq" width="60"></vxe-column>
|
||||
<vxe-column field="year" title="年"></vxe-column>
|
||||
<vxe-column field="week" title="周"></vxe-column>
|
||||
<vxe-column field="date" title="日"></vxe-column>
|
||||
<vxe-column field="id" title="流水号"></vxe-column>
|
||||
<vxe-column field="fkMaterialrequisitionId" title="领料单id"></vxe-column>
|
||||
<vxe-column field="workblankpartnumber" title="毛坯零件号"></vxe-column>
|
||||
<vxe-column field="requireNum" title="应到数量"></vxe-column>
|
||||
<vxe-column field="actualNumber" title="实际到达数量" :edit-render="{}">
|
||||
<template #edit="{ row }">
|
||||
<vxe-input v-model="row.actualNumber" placeholder="请输入实际到达数量" type="number"></vxe-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="randomRate" title="抽检比例%" :edit-render="{}">
|
||||
<template #edit="{ row }">
|
||||
<vxe-input v-model="row.randomRate" placeholder="请输入抽检比例" type="number"></vxe-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="ngs" title="不合格数" :edit-render="{}">
|
||||
<template #edit="{ row }">
|
||||
<vxe-input v-model="row.ngs" placeholder="请输入不合格数" type="number"></vxe-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="oksRatio" title="合格率">
|
||||
<template #default="{ row }">
|
||||
<span>{{ CalculateQualificationRate(row) }}</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column title="是否合格" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<vxe-button v-if="row.Isqualified == 1" content="合格" status="success" round></vxe-button>
|
||||
<vxe-button v-if="row.Isqualified == 0" content="不合格,退料" status="danger" round></vxe-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getStatisticslist, UpdateStatisticsTable } from '@/api/qualityManagement/IQC.js'
|
||||
export default {
|
||||
name: 'material_check',
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
year: new Date().getFullYear(),
|
||||
week: 1,
|
||||
date: 0,
|
||||
},
|
||||
pagination: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
},
|
||||
IQCList: [], //领料单list
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.GetInspectionStatisticsList()
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
//todo 获取检验统计表
|
||||
GetInspectionStatisticsList() {
|
||||
const query = { ...this.search, ...this.pagination }
|
||||
getStatisticslist(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.IQCList = res.data.item1
|
||||
this.pagination.total = res.data.item2
|
||||
}
|
||||
})
|
||||
},
|
||||
searchDate(item) {
|
||||
this.search.date = item
|
||||
this.GetInspectionStatisticsList()
|
||||
},
|
||||
// todo 计算合格率
|
||||
CalculateQualificationRate(row) {
|
||||
if (row.actualNumber == undefined || row.actualNumber == '') {
|
||||
return ''
|
||||
}
|
||||
if (row.ngs == undefined || row.ngs == '') {
|
||||
return ''
|
||||
}
|
||||
let rate = (((row.actualNumber - row.ngs) / row.actualNumber) * 100).toFixed(4)
|
||||
row.oksRatio = rate
|
||||
|
||||
this.IQCList.filter((it) => it.id == row.id).forEach((item, index) => {
|
||||
item.oksRatio = rate
|
||||
item.oks = row.actualNumber - row.ngs
|
||||
if (rate >= 90) item.Isqualified = 1
|
||||
else if (rate > 0 && rate < 90) item.Isqualified = 0
|
||||
else item.Isqualified = -1
|
||||
})
|
||||
|
||||
return rate
|
||||
},
|
||||
|
||||
//todo 实时保存
|
||||
editClosedEvent({ row, column }) {
|
||||
const $table = this.$refs.xTable
|
||||
const field = column.property
|
||||
const cellValue = row[field]
|
||||
// 判断单元格值是否被修改
|
||||
if ($table.isUpdateByRow(row, field)) {
|
||||
//todo 更新统计表
|
||||
const query = {
|
||||
id: row.id,
|
||||
actualNumber: row.actualNumber,
|
||||
randomRate: row.randomRate,
|
||||
ngs: row.ngs,
|
||||
oks: row.oks,
|
||||
oksRatio: row.oksRatio,
|
||||
Isqualified:row.Isqualified
|
||||
}
|
||||
console.log('query', query)
|
||||
UpdateStatisticsTable(query).then((res) => {
|
||||
if ((res.code == 200) & (res.data == 1)) {
|
||||
this.$notify.success('更新成功')
|
||||
} else {
|
||||
this.$notify.error('异常错误')
|
||||
}
|
||||
// 局部更新单元格为已保存状态
|
||||
$table.reloadRow(row, null, field)
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@ -5,10 +5,11 @@
|
||||
<el-form-item label="年">
|
||||
<el-input v-model="search.year" placeholder="输入年份"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="周">
|
||||
<el-form-item label="第">
|
||||
<el-input v-model="search.week" placeholder="输入周"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" style="float: right">
|
||||
<el-form-item label="周"></el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="searchDate(1)">周一</el-button>
|
||||
<el-button type="primary" @click="searchDate(2)">周二</el-button>
|
||||
@ -28,17 +29,29 @@
|
||||
:limit.sync="pagination.pageSize"
|
||||
@pagination="getMaterialRequisitionList"
|
||||
/>
|
||||
<vxe-table :data="MaterialRequisitionList" stripe>
|
||||
<vxe-table :data="MaterialRequisitionList" stripe border>
|
||||
<vxe-column type="seq" width="60"></vxe-column>
|
||||
<vxe-column field="year" title="年"></vxe-column>
|
||||
<vxe-column field="week" title="周"></vxe-column>
|
||||
<vxe-column field="date" title="日"></vxe-column>
|
||||
<vxe-column field="id" title="流水号"></vxe-column>
|
||||
<vxe-column field="workblankpartnumber" title="毛坯零件号"></vxe-column>
|
||||
<vxe-column field="requirenum" title="需要的数量"></vxe-column>
|
||||
<vxe-column field="year" title="年" width="60"></vxe-column>
|
||||
<vxe-column field="week" title="周次" width="60"></vxe-column>
|
||||
<vxe-column field="date" title="星期" width="60"></vxe-column>
|
||||
<vxe-column field="workblankpartnumber" title="原材料零件号" width="120"></vxe-column>
|
||||
<vxe-column field="supplierCode" title="供应商代码" width="70"></vxe-column>
|
||||
<vxe-colgroup title="仓库" align="center">
|
||||
<vxe-column field="warehouseNumber" title="仓库号" width="80"></vxe-column>
|
||||
<vxe-column field="ShelfNumber" title="货架号"></vxe-column>
|
||||
<vxe-column field="layerNumber" title="层号"></vxe-column>
|
||||
<vxe-column field="warehouseLocationNumber" title="库位号"></vxe-column>
|
||||
</vxe-colgroup>
|
||||
|
||||
<vxe-column field="demandQuantity" title="需求数量"></vxe-column>
|
||||
<vxe-column field="receivedQuantity" title="已收数量"></vxe-column>
|
||||
<vxe-column field="returnQuantity" title="退货数量"></vxe-column>
|
||||
<vxe-column field="qualificationRate" title="合格率"></vxe-column>
|
||||
|
||||
<vxe-column title="状态" fixed="right">
|
||||
<template>
|
||||
<vxe-button type="text" status="primary" content="未领料"></vxe-button>
|
||||
<vxe-button type="text" status="warning" content="未入库"></vxe-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user