Commit 785bed3b authored by 沈翠玲's avatar 沈翠玲

第一个报表和第二个报表

parent e391393f
import request from '@/utils/request'
// 生产报工记录:明细界面
export function getList(query) {
return request({
url: "/report/pro/feedback/getList",
method: "get",
params: query,
});
}
// 生产报工记录:统计方式工序
export function getListByProcess(query) {
return request({
url: '/report/pro/feedback/getListByProcess',
method: "get",
params: query
});
}
// 生产报工记录:统计方式用户
export function getListByUser(query) {
return request({
url: '/report/pro/feedback/getListByUser',
method: "get",
params: query
});
}
// 生产报工记录:统计方式车间
export function getListByWorkshop(query) {
return request({
url: '/report/pro/feedback/getListByWorkshop',
method: "get",
params: query
});
}
// 生产报工记录:统计方式工单
export function getListByWorkOrder(query) {
return request({
url: '/report/pro/feedback/getListByWorkOrder',
method: "get",
params: query
});
}
// 生产报工记录:统计方式工作中心
export function getListByWorkstation(query) {
return request({
url: '/report/pro/feedback/getListByWorkstation',
method: "get",
params: query
});
}
// 生产报工记录:统计方式工作单元
export function getListByWorkunit(query) {
return request({
url: '/report/pro/feedback/getListByWorkunit',
method: "get",
params: query
});
}
// 生产报工记录:统计方式不合格原因
export function getListByDefect(query) {
return request({
url: '/report/pro/feedback/getListByDefect',
method: "get",
params: query
});
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<el-dialog :title="$t('工序查询页面')"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
:modal= showModal
width="80%"
>
<el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
......@@ -79,7 +79,11 @@
processId: null,
processCode: null,
workstationId: null,
workstationCode: null
workstationCode: null,
showModal: {
type: Boolean,
default: false
}
},
watch: {
workorderId(v){
......
<template>
<el-dialog :title="$t('不合格原因')"
v-if="showFlag"
:visible.sync="showFlag"
:modal="showModal"
width="80%"
center
>
<el-row :gutter="20">
<!--设备数据-->
<el-col :span="24" :xs="24">
<el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('不合格原因')" prop="abnormalReason">
<el-input
v-model="queryParams.abnormalReason"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="machineryList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
<el-table-column width="50" align="center" >
<template v-slot="scope">
<el-radio v-model="selectedMachineryId" :label="scope.row.abnormalId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template>
</el-table-column>
<el-table-column :label="$t('不合格原因')" width = "120" align="center" key="abnormalReason" prop="abnormalReason">
</el-table-column>
<el-table-column :label="$t('备注')" min-width="120" align="left" key="remark" prop="remark" :show-overflow-tooltip="true" />
<el-table-column :label="$t('创建人')" min-width="120" align="left" key="createBy" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column :label="$t('创建时间')" min-width="120" align="left" key="createTime" prop="createTime" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">{{ $t('common.confirm') }}</el-button>
<el-button @click="showFlag=false">{{ $t('common.cancel') }}</el-button>
</div>
</el-dialog>
</template>
<script>
import { listInformation } from "@/api/mes/qc/abnormal";
import { getToken } from "@/utils/auth";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "MachinerySelectSingle",
dicts: ['sys_yes_no','mes_machinery_status'],
props: {
showModal: {
type: Boolean,
default: false
}
},
data() {
return {
showFlag: false,
// 遮罩层
loading: true,
// 选中数组
selectedMachineryId: undefined,
selectedRows: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 物料产品表格数据
machineryList: [],
// 弹出层标题
title: "",
// 设备类型树选项
machineryTypeOptions: [],
//车间选项
workshopOptions:[],
// 是否显示弹出层
open: false,
// 设备类型名称
machineryTypeName: undefined,
//自动生成物料编码标识
autoGenFlag: false,
// 表单参数
form: {},
defaultProps: {
children: "children",
label: "machineryTypeName"
},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
abnormalReason: null
}
};
},
watch: {
// 根据设备分类名称筛选分类树
machineryTypeName(val) {
this.$refs.tree.filter(val);
}
},
created() {
this.getList();
},
methods: {
/** 查询物料编码列表 */
getList() {
this.loading = true;
const params = {
...this.queryParams,
abnormalType: 'UNQUALIFIED_REASON'
}
listInformation(this.queryParams).then(response => {
this.machineryList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 转换设备类型数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.machineryTypeId,
label: node.machineryTypeName,
children: node.children
};
},
// 筛选节点
filterNode(value, data) {
if (!value) return true;
return data.machineryTypeName.indexOf(value) !== -1;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row){
if(row){
this.selectedRows = row;
}
},
//双击选中
handleRowDbClick(row){
if(row){
this.selectedRows = row;
this.$emit('onSelected',this.selectedRows);
this.showFlag = false;
}
},
// 单选选中数据
handleRowChange(row) {
if(row){
this.selectedRows = row;
}
},
//确定选中
confirmSelect(){
if(this.selectedMachineryId == null || this.selectedMachineryId == 0){
this.$notify({
title:this.$t('提示'),
type:'warning',
message: this.$t('请至少选择一条数据!')
});
return;
}
this.$emit('onSelected',this.selectedRows);
this.showFlag = false;
}
}
};
</script>
\ No newline at end of file
<template>
<el-dialog :title="$t('车间选择')"
v-if="showFlag"
:visible.sync="showFlag"
:modal="showModal"
width="80%"
center
>
<el-row :gutter="20">
<!--设备数据-->
<el-col :span="24" :xs="24">
<el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('车间编码')" prop="workshopCode">
<el-input
v-model="queryParams.workshopCode"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('车间名称')" prop="workshopName">
<el-input
v-model="queryParams.workshopName"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('common.search') }}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('common.reset') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="machineryList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
<el-table-column width="50" align="center" >
<template v-slot="scope">
<el-radio v-model="selectedMachineryId" :label="scope.row.workshopId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template>
</el-table-column>
<el-table-column :label="$t('车间编码')" width = "120" align="center" key="workshopCode" prop="workshopCode">
</el-table-column>
<el-table-column :label="$t('车间名称')" min-width="120" align="left" key="workshopName" prop="workshopName" :show-overflow-tooltip="true" />
<el-table-column :label="$t('创建人')" min-width="120" align="left" key="createBy" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column :label="$t('创建时间')" min-width="120" align="left" key="createTime" prop="createTime" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelect">{{ $t('common.confirm') }}</el-button>
<el-button @click="showFlag=false">{{ $t('common.cancel') }}</el-button>
</div>
</el-dialog>
</template>
<script>
import { listWorkshop } from "@/api/mes/md/workshop";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "MachinerySelectSingle",
dicts: ['sys_yes_no','mes_machinery_status'],
components: { Treeselect },
props: {
showModal: {
type: Boolean,
default: false
}
},
data() {
return {
showFlag: false,
// 遮罩层
loading: true,
// 选中数组
selectedMachineryId: undefined,
selectedRows: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 物料产品表格数据
machineryList: [],
// 弹出层标题
title: "",
// 设备类型树选项
machineryTypeOptions: [],
//车间选项
workshopOptions:[],
// 是否显示弹出层
open: false,
// 设备类型名称
machineryTypeName: undefined,
//自动生成物料编码标识
autoGenFlag: false,
// 表单参数
form: {},
defaultProps: {
children: "children",
label: "machineryTypeName"
},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
workshopCode: null,
workshopName: null,
machineryBrand: null,
machinerySpec: null,
machineryTypeId: null,
machineryTypeCode: null,
machineryTypeName: null,
workshopId: null,
status: null
}
};
},
watch: {
// 根据设备分类名称筛选分类树
machineryTypeName(val) {
this.$refs.tree.filter(val);
}
},
created() {
this.getList();
},
methods: {
/** 查询物料编码列表 */
getList() {
this.loading = true;
listWorkshop(this.queryParams).then(response => {
this.machineryList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 转换设备类型数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.machineryTypeId,
label: node.machineryTypeName,
children: node.children
};
},
// 筛选节点
filterNode(value, data) {
if (!value) return true;
return data.machineryTypeName.indexOf(value) !== -1;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
handleCurrent(row){
if(row){
this.selectedRows = row;
}
},
//双击选中
handleRowDbClick(row){
if(row){
this.selectedRows = row;
this.$emit('onSelected',this.selectedRows);
this.showFlag = false;
}
},
// 单选选中数据
handleRowChange(row) {
if(row){
this.selectedRows = row;
}
},
//确定选中
confirmSelect(){
if(this.selectedMachineryId == null || this.selectedMachineryId == 0){
this.$notify({
title:this.$t('提示'),
type:'warning',
message: this.$t('请至少选择一条数据!')
});
return;
}
this.$emit('onSelected',this.selectedRows);
this.showFlag = false;
}
}
};
</script>
\ No newline at end of file
<template>
<el-dialog :title="$t('工作中心选择')" v-if="showFlag" :visible.sync="showFlag" :modal="false" width="80%" center>
<el-dialog :title="$t('工作中心选择')" v-if="showFlag" :visible.sync="showFlag" :modal="showModal" width="80%" center>
<el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-row>
......@@ -135,6 +135,10 @@ export default {
type: Number | undefined,
default: undefined,
},
showModal: {
type: Boolean,
default: false
}
},
created() {
this.getList();
......
......@@ -3,7 +3,7 @@
:title="$t('common.choose_workunit')"
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
:modal="showModal"
width="80%"
>
<el-form
......@@ -108,6 +108,10 @@ export default {
type: String | Number,
default: "",
},
showModal: {
type: Boolean,
default: false,
},
workunitId: {
type: Number | undefined,
default: undefined,
......
......@@ -3002,5 +3002,31 @@
"完工作业": "完工作业",
"完工作业成功": "完工作业成功",
"取消排产": "取消排产",
"工单是否确认取消排产": "工单是否确认取消排产"
"工单是否确认取消排产": "工单是否确认取消排产",
"车间选择": "车间选择",
"请选择状态": "请选择状态",
"请输入项目号": "请输入项目号",
"请输入订单号": "请输入订单号",
"请输入生产工单": "请输入生产工单",
"请输入任务号": "请输入任务号",
"请输入产品编码": "请输入产品编码",
"明细": "明细",
"统计": "统计",
"统计方式": "统计方式",
"请选择统计方式": "请选择统计方式",
"工单": "工单",
"工序任务": "工序任务",
"工作中心编码": "工作中心编码",
"工作单元编码": "工作单元编码",
"工作单元名称": "工作单元名称",
"报工人员编码": "报工人员编码",
"报工人员名称": "报工人员名称",
"派工数量": "派工数量",
"不合格原因": "不合格原因",
"实际工时": "实际工时",
"计划完成时间": "计划完成时间",
"合格率": "合格率",
"车间编号": "车间编号",
"不合格时间": "不合格时间",
"不合格备注": "不合格备注"
}
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment