三检修改

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

@@ -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>