Commit 50acdf0f authored by 沈翠玲's avatar 沈翠玲

优化界面

parent 785bed3b
import request from '@/utils/request'
// 生产进度:明细界面
export function getList(query) {
return request({
url: "/report/pro/workOrderProgress/getList",
method: "get",
params: query,
});
}
// 生产进度:报工明细
export function getListByProcess(query) {
return request({
url: '/report/pro/workOrderProgress/getFeedbackList',
method: "get",
params: query
});
}
// 生产进度:工序明细
export function getListByUser(query) {
return request({
url: '/report/pro/workOrderProgress/getProcessList',
method: "get",
params: query
});
}
\ No newline at end of file
......@@ -3002,5 +3002,31 @@
"完工作业": "ดำเนินการแล้วเสร็จ",
"完工作业成功": "ความสำเร็จของงาน",
"取消排产": "ยกเลิกการปล่อยก๊าซ",
"工单是否确认取消排产": "ไม่ว่าจะเป็นใบสั่งงานยืนยันการยกเลิกการปล่อย"
"工单是否确认取消排产": "ไม่ว่าจะเป็นใบสั่งงานยืนยันการยกเลิกการปล่อย",
"车间选择": "การเลือกเวิร์คช็อป",
"请选择状态": "กรุณาเลือกสถานะ",
"请输入项目号": "กรุณากรอกหมายเลขสินค้า",
"请输入订单号": "กรุณากรอกหมายเลขการสั่งซื้อ",
"请输入生产工单": "กรุณากรอกแบบฟอร์มการผลิต",
"请输入任务号": "กรุณากรอกหมายเลขงาน",
"请输入产品编码": "โปรดป้อนรหัสผลิตภัณฑ์",
"明细": "รายละเอียดและรายละเอียด",
"统计": "สถิติ",
"统计方式": "วิธีการทางสถิติ",
"请选择统计方式": "กรุณาเลือกทางสถิติ",
"工单": "ใบสั่งงาน",
"工序任务": "งานกระบวนการ",
"工作中心编码": "การเข้ารหัสศูนย์การทำงาน",
"工作单元编码": "การเข้ารหัสเซลล์งาน",
"工作单元名称": "ชื่อเซลล์งาน",
"报工人员编码": "รหัสพนักงานหนังสือพิมพ์",
"报工人员名称": "ชื่อพนักงานหนังสือพิมพ์",
"派工数量": "จำนวนพนักงานส่ง",
"不合格原因": "สาเหตุที่ไม่ได้รับสิทธิ์",
"实际工时": "ชั่วโมงทำงานจริง",
"计划完成时间": "กำหนดเวลาเสร็จสิ้น",
"合格率": "อัตราคุณสมบัติ",
"车间编号": "หมายเลขร้านค้า",
"不合格时间": "เวลาที่ไม่เหมาะสม",
"不合格备注": "ข้อสังเกตที่ไม่ผ่านการรับรอง"
}
......@@ -35,13 +35,8 @@
<el-tabs type="border-card" @tab-click="tabClick">
<el-tab-pane :label="$t('明细')">
<el-table v-loading="loading" :data="tbodys">
<!-- <el-table-column :label="$t('工单类型')" align="center" prop="workorderType" v-if="item.value==='workorderType'">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" />
</template>
</el-table-column> -->
<el-table-column :label="item.label" align="center" :prop="item.value" v-for="(item, index) in theaders" :key="index">
<el-table v-loading="loading" :data="tbodys" :max-height="tableHeight">
<el-table-column :label="item.label" :width="item.width" align="center" :prop="item.value" v-for="(item, index) in theaders" :key="index">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
<div v-else>{{ scope.row[item.value] }}</div>
......@@ -73,7 +68,7 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('查询')}}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="tbodys">
<el-table v-loading="loading" :data="tbodys" :max-height="tableHeight">
<el-table-column :label="item.label" align="center" :prop="item.value" v-for="(item, index) in theaders" :key="index">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
......@@ -101,17 +96,12 @@
import i18n from '../../../../i18n/index'
import { getList, getListByProcess, getListByUser, getListByWorkshop, getListByDefect, getListByWorkOrder, getListByWorkstation, getListByWorkunit } from "@/api/mes/proTable/statistAnaly";
import ProcessSelect from "@/components/process/taskSelectSingle.vue";
import ItemSelect from "@/components/itemSelect/single.vue";
import workshopSelect from "@/components/workshopSelect/single.vue";
import WorkuintSelect from "@/components/workunitSelect/single.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue"
import UserSingleSelect from "@/components/userSelect/single.vue"
import reasonSelect from "@/components/reasonSelect/single.vue"
export default {
name: "ScheduleSetupRule",
components: {UserSingleSelect,ProcessSelect, ItemSelect, workshopSelect, WorkuintSelect, WorkstationSelect,reasonSelect},
components: {ItemSelect,reasonSelect},
dicts: [
"mes_workorder_type",
],
......@@ -143,6 +133,7 @@ export default {
statisisList: [i18n.t('不合格原因'), i18n.t('工单'), i18n.t('车间'), i18n.t('工作中心'), i18n.t('工作单元'), i18n.t('工序'), i18n.t('人员')],
// 是否显示弹出层
open: false,
tableHeight: 0,
daterangePurchaseDate: [],
// 查询参数
queryParams: {
......@@ -177,31 +168,43 @@ export default {
created() {
this.getList();
},
mounted(){
this.$nextTick(()=>{
this._resizeHandler()
})
this._resizeHandler = () => {
this.tableHeight = window.innerHeight - 350
}
window.addEventListener('resize', this._resizeHandler)
},
beforeDestroy() {
window.removeEventListener('resize', this._resizeHandler)
},
watch: {
tabIndex: {
handler(val){
if(Number(val) === 0) {
this.theaders = [
{label: i18n.t('工单类型'), value: 'workorderType'},
{label: i18n.t('项目号'), value: 'customerProjectNo'},
{label: i18n.t('订单号'), value: 'orderCode'},
{label: i18n.t('生产工单'), value: 'workorderCode'},
{label: i18n.t('产品编码'), value: 'productCode'},
{label: i18n.t('产品名称'), value: 'productName'},
{label: i18n.t('工序任务'), value: 'taskCode'},
{label: i18n.t('工序名称'), value: 'processName'},
{label: i18n.t('工作中心编码'), value: 'workstationCode'},
{label: i18n.t('工作中心名称'), value: 'workstationName'},
{label: i18n.t('工作单元编码'), value: 'workunitCode'},
{label: i18n.t('工作单元名称'), value: 'workunitName'},
{label: i18n.t('报工人员编码'), value: 'userName'},
{label: i18n.t('报工人员名称'), value: 'nickName'},
{label: i18n.t('派工数量'), value: 'quantity'},
{label: i18n.t('报工数量'), value: 'quantityFeedback'},
{label: i18n.t('合格数量'), value: 'quantityQualify'},
{label: i18n.t('不合格数量'), value: 'quantityUnqualify'},
{label: i18n.t('不合格原因'), value: 'abnormalReason'},
{label: i18n.t('不合格时间'), value: 'feedbackTime'}
{label: i18n.t('工单类型'), value: 'workorderType', width: '80px'},
{label: i18n.t('项目号'), value: 'customerProjectNo', width: '80px'},
{label: i18n.t('订单号'), value: 'orderCode', width: '80px'},
{label: i18n.t('生产工单'), value: 'workorderCode', width: '140px'},
{label: i18n.t('产品编码'), value: 'productCode', width: '120px'},
{label: i18n.t('产品名称'), value: 'productName', width: '120px'},
{label: i18n.t('工序任务'), value: 'taskCode', width: '120px'},
{label: i18n.t('工序名称'), value: 'processName', width: '80px'},
{label: i18n.t('工作中心编码'), value: 'workstationCode', width: '100px'},
{label: i18n.t('工作中心名称'), value: 'workstationName', width: '140px'},
{label: i18n.t('工作单元编码'), value: 'workunitCode', width: '100px'},
{label: i18n.t('工作单元名称'), value: 'workunitName', width: '140px'},
{label: i18n.t('报工人员编码'), value: 'userName', width: '140px'},
{label: i18n.t('报工人员名称'), value: 'nickName', width: '140px'},
{label: i18n.t('派工数量'), value: 'quantity', width: '80px'},
{label: i18n.t('报工数量'), value: 'quantityFeedback', width: '80px'},
{label: i18n.t('合格数量'), value: 'quantityQualify', width: '80px'},
{label: i18n.t('不合格数量'), value: 'quantityUnqualify', width: '90px'},
{label: i18n.t('不合格原因'), value: 'abnormalReason', width: '90px'},
{label: i18n.t('不合格时间'), value: 'feedbackTime', width: '100px'}
]
this.handleQuery()
} else {
......
<template>
<div class="app-container">
<el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item :label="$t('项目号')" prop="customerProjectNo">
<el-input v-model="queryParams.customerProjectNo" :placeholder="$t('请输入项目号')" />
</el-form-item>
<el-form-item :label="$t('订单号')" prop="orderCode">
<el-input v-model="queryParams.orderCode" :placeholder="$t('请输入订单号')" />
</el-form-item>
<el-form-item :label="$t('生产工单')" prop="workorderCode">
<el-input v-model="queryParams.workorderCode" :placeholder="$t('请输入生产工单')" />
</el-form-item>
<el-form-item :label="$t('产品编码')" prop="productCode">
<el-input v-model="queryParams.productCode" :placeholder="$t('请输入产品编码')" />
</el-form-item>
<el-form-item :label="$t('产品名称')" prop="productName">
<el-input v-model="queryParams.productName" >
<el-button slot="append" icon="el-icon-search" @click="$refs['ItemSelectRef'].showFlag = true" ></el-button>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{$t('重置')}}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tbodys" @row-click="mainTableClick">
<el-table-column label="项目号" align="center" prop="customerProjectNo"></el-table-column>
<el-table-column label="订单号" align="center" prop="orderCode"></el-table-column>
<el-table-column label="生产工单" align="center" prop="workorderCode"></el-table-column>
<el-table-column label="工单类型" align="center" prop="workorderType">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" />
</template>
</el-table-column>
<el-table-column label="产品编码" align="center" prop="productCode"></el-table-column>
<el-table-column label="产品名称" align="center" prop="productName"></el-table-column>
<el-table-column label="计划数量" align="center" prop="quantity"></el-table-column>
<el-table-column label="完工数量" align="center" prop="quantityProduced"></el-table-column>
<el-table-column label="在制进度" align="center" prop="customerProjectNo">
<template slot-scope="scope">
<el-progress :text-inside="true" :stroke-width="26" :percentage="scope.row.quantityMu" />
</template>
</el-table-column>
<el-table-column label="需求时间" align="center" prop="requestDate"></el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="second-box"></div>
<ItemSelect ref="ItemSelectRef" @onSelected="onItemSelect"/>
</div>
</template>
<script>
import i18n from '../../../../i18n/index'
import { getList, getListByProcess, getListByUser, getListByWorkshop, getListByDefect, getListByWorkOrder, getListByWorkstation, getListByWorkunit } from "@/api/mes/proTable/productProcess";
import ItemSelect from "@/components/itemSelect/single.vue";
export default {
name: "ScheduleSetupRule",
components: {ItemSelect},
dicts: [
"mes_workorder_type",
],
data() {
return {
showQueryLPN: false,
// 遮罩层
loading: true,
selectedRows: [],
tabIndex: 0,
// 选中数组
ids: [],
//dta列表
dtaOptions: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 排产换型对照信息表格数据
tbodys: [],
theaders: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
daterangePurchaseDate: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
defectStatus: true,
"customerProjectNo": null,
"endDate": null,
"orderCode": null,
"processName": null,
"processCode": null,
"processId": null,
"productCode": null,
"productId": null,
"productName": null,
"startDate": null,
"taskCode": null,
"abnormalReason": null,
"workorderCode": null,
"workorderType": null,
"workshopId": null,
"workshopName": null,
"workstationId": null,
"workstationName": null,
"workunitId": null,
"workunitName": null
},
// 表单参数
form: {},
};
},
created() {
this.getList();
},
watch: {
},
methods: {
mainTableClick(){
},
onItemSelect(row) {
if (row != undefined) {
this.queryParams.productName = row.itemName;
}
},
/** 查询排产换型对照信息列表 */
getList() {
this.loading = true;
this.queryParams['defectStatus'] = true
if (this.daterangePurchaseDate && this.daterangePurchaseDate.length > 0) {
this.queryParams['startDate'] = this.daterangePurchaseDate[0]
this.queryParams['endDate'] = this.daterangePurchaseDate[1]
}
getList(this.queryParams).then(response => {
this.tbodys = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
onBrandSelected(row){
if (Object.values(row).length > 0) {
this.queryParams.itemTypeId = row.itemTypeId;
this.queryParams.itemTypeName = row.itemTypeName;
}
},
onBrandProcess(row){
if (Object.values(row).length > 0) {
this.queryParams.processName = row.processName;
}
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.selectedRows = selection
this.ids = selection.map(item => item.ruleId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 导出按钮操作 */
handleExport() {
const row = this.selectedRows[0]
this.download('pro/serial/lpn/record/export', {
salesVoucher: row.salesVoucher,
salesVoucherItem: row.salesVoucherItem,
}, `dta_${new Date().getTime()}.xlsx`)
}
}
};
</script>
......@@ -81,18 +81,13 @@
<el-tabs type="border-card" @tab-click="tabClick">
<el-tab-pane :label="$t('明细')">
<el-table v-loading="loading" :data="tbodys">
<!-- <el-table-column :label="$t('工单类型')" align="center" prop="workorderType" v-if="item.value==='workorderType'">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" />
</template>
</el-table-column> -->
<el-table-column :label="item.label" align="center" :prop="item.value" v-for="(item, index) in theaders" :key="index">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
<div v-else>{{ scope.row[item.value] }}</div>
</template>
</el-table-column>
<el-table v-loading="loading" :max-height="tableHeight" :data="tbodys" >
<el-table-column :label="item.label" align="center" :prop="item.value" :width="item.width" v-for="(item, index) in theaders" :key="index">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
<div v-else>{{ item.value === 'machineTime' ? scope.row[item.value] ? Number(scope.row[item.value]).toFixed(2) : scope.row[item.value] : scope.row[item.value] }}</div>
</template>
</el-table-column>
</el-table>
<pagination
......@@ -119,11 +114,11 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{$t('查询')}}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="tbodys">
<el-table v-loading="loading" :max-height="tableHeight" :data="tbodys">
<el-table-column :label="item.label" align="center" :prop="item.value" v-for="(item, index) in theaders" :key="index">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
<div v-else>{{ scope.row[item.value] }}</div>
<div v-else>{{ item.value === 'machineTime' ? scope.row[item.value] ? Number(scope.row[item.value]).toFixed(2) : scope.row[item.value] : scope.row[item.value] }}</div>
</template>
</el-table-column>
</el-table>
......@@ -204,6 +199,7 @@ import i18n from '../../../../i18n/index'
statisisList: [i18n.t('工单'), i18n.t('车间'), i18n.t('工作中心'), i18n.t('工作单元'), i18n.t('工序'), i18n.t('人员')],
// 是否显示弹出层
open: false,
tableHeight: 0,
daterangePurchaseDate: [],
// 查询参数
queryParams: {
......@@ -235,6 +231,18 @@ import i18n from '../../../../i18n/index'
form: {},
};
},
mounted(){
this.$nextTick(()=>{
this._resizeHandler()
})
this._resizeHandler = () => {
this.tableHeight = window.innerHeight - 400
}
window.addEventListener('resize', this._resizeHandler)
},
beforeDestroy() {
window.removeEventListener('resize', this._resizeHandler)
},
created() {
this.getList();
},
......@@ -243,29 +251,29 @@ import i18n from '../../../../i18n/index'
handler(val){
if(Number(val) === 0) {
this.theaders = [
{label: i18n.t('工单类型'), value: 'workorderType'},
{label: i18n.t('项目号'), value: 'customerProjectNo'},
{label: i18n.t('订单号'), value: 'orderCode'},
{label: i18n.t('生产工单'), value: 'workorderCode'},
{label: i18n.t('产品编码'), value: 'productCode'},
{label: i18n.t('产品名称'), value: 'productName'},
{label: i18n.t('工序任务'), value: 'taskCode'},
{label: i18n.t('工序名称'), value: 'processName'},
{label: i18n.t('工作中心编码'), value: 'workstationCode'},
{label: i18n.t('工作中心名称'), value: 'workstationName'},
{label: i18n.t('工作单元编码'), value: 'workunitCode'},
{label: i18n.t('工作单元名称'), value: 'workunitName'},
{label: i18n.t('报工人员编码'), value: 'userName'},
{label: i18n.t('报工人员名称'), value: 'nickName'},
{label: i18n.t('派工数量'), value: 'quantity'},
{label: i18n.t('报工数量'), value: 'quantityFeedback'},
{label: i18n.t('合格数量'), value: 'quantityQualify'},
{label: i18n.t('不合格数量'), value: 'quantityUnqualify'},
{label: i18n.t('不合格原因'), value: 'abnormalReason'},
{label: i18n.t('标准工时'), value: 'stdWorkingTime'},
{label: i18n.t('实际工时'), value: 'machineTime'},
{label: i18n.t('计划完成时间'), value: 'scheduleEndDate'},
{label: i18n.t('报工时间'), value: 'feedbackTime'}
{label: i18n.t('工单类型'), value: 'workorderType', width: '80px'},
{label: i18n.t('项目号'), value: 'customerProjectNo', width: '80px'},
{label: i18n.t('订单号'), value: 'orderCode', width: '80px'},
{label: i18n.t('生产工单'), value: 'workorderCode', width: '140px'},
{label: i18n.t('产品编码'), value: 'productCode', width: '120px'},
{label: i18n.t('产品名称'), value: 'productName', width: '120px'},
{label: i18n.t('工序任务'), value: 'taskCode', width: '120px'},
{label: i18n.t('工序名称'), value: 'processName', width: '80px'},
{label: i18n.t('工作中心编码'), value: 'workstationCode', width: '100px'},
{label: i18n.t('工作中心名称'), value: 'workstationName', width: '140px'},
{label: i18n.t('工作单元编码'), value: 'workunitCode', width: '100px'},
{label: i18n.t('工作单元名称'), value: 'workunitName', width: '140px'},
{label: i18n.t('报工人员编码'), value: 'userName', width: '140px'},
{label: i18n.t('报工人员名称'), value: 'nickName', width: '140px'},
{label: i18n.t('派工数量'), value: 'quantity', width: '80px'},
{label: i18n.t('报工数量'), value: 'quantityFeedback', width: '80px'},
{label: i18n.t('合格数量'), value: 'quantityQualify', width: '80px'},
{label: i18n.t('不合格数量'), value: 'quantityUnqualify', width: '90px'},
{label: i18n.t('不合格原因'), value: 'abnormalReason', width: '90px'},
{label: i18n.t('标准工时'), value: 'stdWorkingTime', width: '80px'},
{label: i18n.t('实际工时'), value: 'machineTime', width: '80px'},
{label: i18n.t('计划完成时间'), value: 'scheduleEndDate', width: '100px'},
{label: i18n.t('报工时间'), value: 'feedbackTime', width: '100px'}
]
this.handleQuery()
} else {
......
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