三检修改

This commit is contained in:
qianhao.xu
2024-04-22 10:00:33 +08:00
parent 41706f630f
commit e300bc6b5e
3 changed files with 75 additions and 49 deletions

View File

@@ -1,9 +1,9 @@
import request from '@/utils/request'
/**
* 成品入库检验分页查询
* @param {查询条件} data
*/
* 成品入库检验分页查询
* @param {查询条件} data
*/
export function listWmFgentryInspect(query) {
return request({
url: '/mes/wm/WmFgentryInspect/list',
@@ -12,13 +12,15 @@ export function listWmFgentryInspect(query) {
})
}
/**
* 成品入库检验分页查询 一级
* @param {查询条件} data
*/
* 成品入库检验分页查询 一级
* @param {查询条件} data
*/
export function listWmFgentryInspect_firstLevel(query) {
const moment = require('moment')
if (query.starttime != undefined || query.starttime != '') query.starttime = moment(query.starttime).format('YYYY-MM-DD HH:mm:ss')
if (query.endtime != undefined || query.endtime != '') query.endtime = moment(query.endtime).format('YYYY-MM-DD HH:mm:ss')
return request({
url: '/mes/wm/WmFgentryInspect/first_level_list',
method: 'get',
@@ -26,11 +28,10 @@ export function listWmFgentryInspect_firstLevel(query) {
})
}
/**
* 成品入库检验分页查询 二级级
* @param {查询条件} data
*/
* 成品入库检验分页查询 二级级
* @param {查询条件} data
*/
export function listWmFgentryInspect_secondLevel(query) {
return request({
url: '/mes/wm/WmFgentryInspect/second_level_list',
@@ -40,9 +41,9 @@ export function listWmFgentryInspect_secondLevel(query) {
}
/**
* 新增成品入库检验
* @param data
*/
* 新增成品入库检验
* @param data
*/
export function addWmFgentryInspect(data) {
return request({
url: '/mes/wm/WmFgentryInspect',
@@ -51,9 +52,9 @@ export function addWmFgentryInspect(data) {
})
}
/**
* 修改成品入库检验
* @param data
*/
* 修改成品入库检验
* @param data
*/
export function updateWmFgentryInspect(data) {
return request({
url: '/mes/wm/WmFgentryInspect',
@@ -62,28 +63,27 @@ export function updateWmFgentryInspect(data) {
})
}
/**
* 获取成品入库检验详情
* @param {Id}
*/
* 获取成品入库检验详情
* @param {Id}
*/
export function getWmFgentryInspect(id) {
return request({
url: '/mes/wm/WmFgentryInspect/' + id,
method: 'get'
method: 'get',
})
}
/**
* 删除成品入库检验
* @param {主键} pid
*/
* 删除成品入库检验
* @param {主键} pid
*/
export function delWmFgentryInspect(pid) {
return request({
url: '/mes/wm/WmFgentryInspect/' + pid,
method: 'delete'
method: 'delete',
})
}
/*
批量修改合格
@@ -98,8 +98,8 @@ export function setTheBoxToBeQualified(data) {
/**
* 设置全部合格
* @param {*} query
* @returns
* @param {*} query
* @returns
*/
export function setAllQualified(query) {
return request({
@@ -110,8 +110,8 @@ export function setAllQualified(query) {
}
/**
* 设置全部合格
* @param {*} query
* @returns
* @param {*} query
* @returns
*/
export function setAllUnQualified(query) {
return request({
@@ -134,8 +134,8 @@ export function setTheBoxToBeUnQualified(data) {
/**
* 把包装数据转换为检验数据
* @param {*} query
* @returns
* @param {*} query
* @returns
*/
export function convertToIncomingInspectionData(query) {
return request({
@@ -143,4 +143,4 @@ export function convertToIncomingInspectionData(query) {
method: 'get',
params: query,
})
}
}

View File

@@ -753,7 +753,14 @@
if (res.code == 200) {
this.$notify.success('质量统计表生成成功')
}
// 入库检验数据转换
const quest={ workorder: saveWorkorderInfo.clientWorkorder }
return convertToIncomingInspectionData(quest)
}).then((res)=>{
if(res.code==200){
this.$notify.success("生成入库检验数量为"+res.data);
}
})
},
//todo 获取下一个工单号
@@ -793,13 +800,7 @@
this.team = result.data.team
this.$loading().close()
}
// 入库检验数据转换
const quest={ workorder: this.CurrentWorkorder.clientWorkorder }
return convertToIncomingInspectionData(quest)
}).then((res)=>{
if(res.code==200){
this.$notify.success("生成入库检验数量为"+res.data);
}
})
},
//todo 获取上一个工单号

View File

@@ -18,6 +18,7 @@
placeholder="选择日期时间"
align="right"
:picker-options="pickerOptions"
value-format="yyyy-MM-dd hh:mm:ss"
>
</el-date-picker>
</el-form-item>
@@ -29,23 +30,28 @@
placeholder="选择日期时间"
align="right"
:picker-options="pickerOptions"
value-format="yyyy-MM-dd hh:mm:ss"
>
</el-date-picker>
</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>
<el-button type="danger" round size="mini" @click="forceGeneration">强制生成</el-button>
</el-form-item>
</el-form>
<!-- 一级菜单区 -->
<el-table :data="firstLevel_dataList" v-loading="loading" ref="table" border highlight-current-row>
<!-- <el-table-column prop="id" label="主键" align="center" /> -->
<el-table-column prop="workorder" label="工单号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="partnumber" label="零件号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="productDescription" label="产品描述" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="specifications" label="规格" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="colour" label="颜色" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="productionNum" label="箱子里产品个数" align="center" />
<el-table-column prop="partnumber" label="零件号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="packnum" label="箱子个数" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="previousNumber" label="上件数" align="center" />
<el-table-column prop="productionNum" label="已打印产品总数" align="center" />
<el-table-column label="检验结果" align="center">
<template slot-scope="scope">
<el-progress
@@ -67,6 +73,7 @@
></el-button>
</template>
</el-table-column>
<el-table-column prop="createdTime" label="创建时间" align="center" :show-overflow-tooltip="true" />
</el-table>
<pagination
class="mt10"
@@ -111,13 +118,13 @@
>
<el-table-column type="selection" width="50" align="center" label="合格" />
<el-table-column prop="workorder" label="工单号" align="center" width="150" :show-overflow-tooltip="true" />
<el-table-column prop="partnumber" label="零件号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="packcode" label="外箱标签" align="center" width="190" :show-overflow-tooltip="true" />
<el-table-column prop="machine" label="工位" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="productionNum" label="箱子里产品个数" align="center" />
<el-table-column prop="productDescription" label="产品描述" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="specifications" label="规格" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="colour" label="颜色" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="partnumber" label="零件号" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="bfilled" label="是否满箱" align="center" />
<el-table-column label="检验结果" align="center">
<template slot-scope="scope">
@@ -157,6 +164,7 @@ import {
getWmFgentryInspect,
} from '@/api/wmsManagement/wmFgentryInspect.js'
import { convertToIncomingInspectionData } from '@/api/wmsManagement/wmFgentryInspect.js'
export default {
name: 'wmfgentryinspect',
data() {
@@ -203,8 +211,8 @@ export default {
showSearch: true,
// 查询参数
queryParams: {
starttime: new Date(new Date(new Date().toLocaleDateString()).getTime()),
endtime: new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1),
starttime: null,
endtime: null,
workorder: '',
partnumber: '',
packcode: '',
@@ -266,6 +274,10 @@ export default {
}
},
created() {
const now = new Date()
this.queryParams.starttime = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0)
this.queryParams.endtime = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999)
// 列表数据查询
this.getList_first()
},
@@ -275,9 +287,6 @@ export default {
if (result_good + result_bad == 0) {
return 0
}
console.log('result_good', result_good)
console.log('result_bad', result_bad)
console.log('result_null', result_null)
return Math.floor((result_good / (result_good + result_bad + result_null)) * 100)
},
//todo 一级菜单调 二级
@@ -294,6 +303,7 @@ export default {
// 获取二级菜单目录
this.getList_second(workorder)
},
//todo 获取一级菜单目录
getList_first() {
this.loading = true
@@ -305,6 +315,7 @@ export default {
}
})
},
// 获取二级菜单目录
getList_second() {
this.full_loading.close()
@@ -389,6 +400,20 @@ export default {
this.first_level.open = false
this.getList_first()
},
// 强制生成报表
forceGeneration() {
if (this.queryParams.workorder == '' || this.queryParams.workorder == undefined) {
this.$notify.warning('工单号为空 ,不能生成报表')
return
}
// 入库检验数据转换
const quest = { workorder: this.queryParams.workorder }
convertToIncomingInspectionData(quest).then((res) => {
if (res.code == 200) {
this.$alert('生成报表' + res.data + '数据')
}
})
},
},
}
</script>