一次合格品与GP12质检报告功能完善
This commit is contained in:
57
src/api/wmsManagement/wmGp12QualityStatistics.js
Normal file
57
src/api/wmsManagement/wmGp12QualityStatistics.js
Normal file
@@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* GP12质检记录表分页查询
|
||||
* @param {查询条件} data
|
||||
*/
|
||||
export function listWmGp12QualityStatistics(query) {
|
||||
return request({
|
||||
url: '/mes/wm/WmGp12QualityStatistics/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增GP12质检记录表
|
||||
* @param data
|
||||
*/
|
||||
export function addWmGp12QualityStatistics(data) {
|
||||
return request({
|
||||
url: '/mes/wm/WmGp12QualityStatistics',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 修改GP12质检记录表
|
||||
* @param data
|
||||
*/
|
||||
export function updateWmGp12QualityStatistics(data) {
|
||||
return request({
|
||||
url: '/mes/wm/WmGp12QualityStatistics',
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取GP12质检记录表详情
|
||||
* @param {Id}
|
||||
*/
|
||||
export function getWmGp12QualityStatistics(id) {
|
||||
return request({
|
||||
url: '/mes/wm/WmGp12QualityStatistics/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除GP12质检记录表
|
||||
* @param {主键} pid
|
||||
*/
|
||||
export function delWmGp12QualityStatistics(pid) {
|
||||
return request({
|
||||
url: '/mes/wm/WmGp12QualityStatistics/' + pid,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
* @Descripttion: (抛光管理-后道质量统计/wm_polish_quality_statistics)
|
||||
* @Descripttion: (GP12质检管理)
|
||||
* @version: (1.0)
|
||||
* @Author: (admin)
|
||||
* @Date: (2024-08-07)
|
||||
@@ -82,6 +82,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="workorderId" label="工单号" min-width="160" align="center" :show-overflow-tooltip="true" />
|
||||
<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" />
|
||||
<el-table-column prop="specification" label="规格" align="center" :show-overflow-tooltip="true" />
|
||||
@@ -132,9 +133,14 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改抛光管理-质量统计对话框 -->
|
||||
<!-- 添加或修改 -->
|
||||
<el-dialog :title="title" :lock-scroll="false" :visible.sync="open" width="70%" @opened="dialogOpened" :close-on-click-modal="false">
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" :label-width="formLabelWidth">
|
||||
<div>
|
||||
<el-form-item label="工单号" prop="workorderId">
|
||||
<el-input v-model="form.workorderId" placeholder="请输入工单号" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<el-form-item label="零件搜索">
|
||||
<ThePartNumberSelect ref="ThePartNumberSelectRef" @selected="PartNumberSelect"></ThePartNumberSelect>
|
||||
@@ -156,7 +162,7 @@
|
||||
<el-input-number v-model="form.requireNumber" placeholder="请输入投入数" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<div class="red-text">需要满足:抛光投入数 = 合格数 + 抛光数 + 打磨数 + 报废数</div>
|
||||
<div class="red-text">投入数 = 合格数 + 抛光数 + 打磨数 + 报废数</div>
|
||||
<div class="red-text">合格率会自动计算</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -165,8 +171,8 @@
|
||||
<el-input-number v-model="form.qualifiedNumber" placeholder="请输入合格数" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<span v-if="opertype === 1" class="red-text">合格数:合格品将进入一次合格品仓库,门把手将进入成品库</span>
|
||||
<span v-if="opertype === 2" class="red-text">修改不会影响抛光仓库数据</span>
|
||||
<span v-if="opertype === 1" class="red-text">合格数:合格品将进入成品仓库</span>
|
||||
<span v-if="opertype === 2" class="red-text">修改不会影响仓库数据</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
@@ -175,7 +181,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<span v-if="opertype === 1" class="red-text">抛光数:将重新进入抛光仓库</span>
|
||||
<span v-if="opertype === 2" class="red-text">修改不会影响抛光仓库数据</span>
|
||||
<span v-if="opertype === 2" class="red-text">修改不会影响仓库数据</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
@@ -183,8 +189,8 @@
|
||||
<el-input-number v-model="form.damoTotal" placeholder="请输入打磨数" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<span v-if="opertype === 1" class="red-text">打磨数:将扣除抛光仓库库存</span>
|
||||
<span v-if="opertype === 2" class="red-text">修改不会影响抛光仓库数据</span>
|
||||
<span v-if="opertype === 1" class="red-text">打磨数:将扣除一次合格品仓库库存</span>
|
||||
<span v-if="opertype === 2" class="red-text">修改不会影响仓库数据</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
@@ -192,8 +198,8 @@
|
||||
<el-input-number v-model="form.baofeiTotal" placeholder="请输入报废数" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<span v-if="opertype === 1" class="red-text">报废数:将扣除抛光仓库库存</span>
|
||||
<span v-if="opertype === 2" class="red-text">修改不会影响抛光仓库数据</span>
|
||||
<span v-if="opertype === 1" class="red-text">报废数:将扣除一次合格品仓库库存</span>
|
||||
<span v-if="opertype === 2" class="red-text">修改不会影响仓库数据</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
@@ -219,15 +225,15 @@
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
listWmPolishQualityStatistics,
|
||||
addWmPolishQualityStatistics,
|
||||
delWmPolishQualityStatistics,
|
||||
updateWmPolishQualityStatistics,
|
||||
getWmPolishQualityStatistics,
|
||||
} from '@/api/wmsManagement/wmPolishQualityStatistics.js'
|
||||
listWmGp12QualityStatistics,
|
||||
addWmGp12QualityStatistics,
|
||||
delWmGp12QualityStatistics,
|
||||
updateWmGp12QualityStatistics,
|
||||
getWmGp12QualityStatistics,
|
||||
} from '@/api/wmsManagement/wmGp12QualityStatistics.js'
|
||||
import ThePartNumberSelect from './ThePartNumberSelect.vue'
|
||||
export default {
|
||||
name: 'wmpolishqualitystatistics',
|
||||
name: 'wmGp12qualitystatistics',
|
||||
components: {
|
||||
ThePartNumberSelect,
|
||||
},
|
||||
@@ -322,6 +328,7 @@ export default {
|
||||
btnSubmitVisible: true,
|
||||
// 表单校验
|
||||
rules: {
|
||||
workorderId: [{ required: true, message: '工单号不能为空', trigger: 'blur' }],
|
||||
partnumber: [{ required: true, message: '零件号不能为空', trigger: 'blur' }],
|
||||
requireNumber: [{ required: true, message: '投入数不可为空', trigger: 'blur' }],
|
||||
qualifiedNumber: [{ required: true, message: '合格数不可为空', trigger: 'blur' }],
|
||||
@@ -340,7 +347,7 @@ export default {
|
||||
// 查询数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
listWmPolishQualityStatistics(this.queryParams).then((res) => {
|
||||
listWmGp12QualityStatistics(this.queryParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.dataList = res.data.result
|
||||
this.total = res.data.totalNum
|
||||
@@ -420,7 +427,7 @@ export default {
|
||||
|
||||
this.$confirm('是否确认删除参数数据项?')
|
||||
.then(function () {
|
||||
return delWmPolishQualityStatistics(Ids)
|
||||
return delWmGp12QualityStatistics(Ids)
|
||||
})
|
||||
.then(() => {
|
||||
this.handleQuery()
|
||||
@@ -432,7 +439,7 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const id = row.id || this.ids
|
||||
getWmPolishQualityStatistics(id).then((res) => {
|
||||
getWmGp12QualityStatistics(id).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
this.open = true
|
||||
@@ -454,7 +461,7 @@ export default {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined && this.opertype === 2) {
|
||||
updateWmPolishQualityStatistics(this.form)
|
||||
updateWmGp12QualityStatistics(this.form)
|
||||
.then((res) => {
|
||||
this.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
@@ -464,7 +471,7 @@ export default {
|
||||
//TODO 错误逻辑
|
||||
})
|
||||
} else {
|
||||
addWmPolishQualityStatistics(this.form)
|
||||
addWmGp12QualityStatistics(this.form)
|
||||
.then((res) => {
|
||||
this.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
|
||||
Reference in New Issue
Block a user