update - 生产执行报表

master
yinq 11 months ago
parent b9e731f427
commit 9f931cd706

@ -1,10 +1,10 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="计划编号" prop="orderCode"> <el-form-item label="SAP计划编号" prop="orderCode">
<el-input <el-input
v-model="queryParams.orderCode" v-model="queryParams.orderCode"
placeholder="请输入计划编号" placeholder="请输入SAP计划编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -17,6 +17,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料编号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="物料名称" prop="materialName">
<el-input <el-input
v-model="queryParams.materialName" v-model="queryParams.materialName"
@ -73,21 +81,21 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['production:planInfo:edit']" v-hasPermi="['production:planInfo:edit']"
>修改 >修改计划
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['production:planInfo:remove']"
>删除
</el-button> </el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['production:planInfo:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -117,6 +125,8 @@
<el-table-column label="计划工位名称" align="center" prop="stationName" width="100" v-if="columns[10].visible"/> <el-table-column label="计划工位名称" align="center" prop="stationName" width="100" v-if="columns[10].visible"/>
<el-table-column label="计划数量" align="center" prop="planAmount" v-if="columns[11].visible"/> <el-table-column label="计划数量" align="center" prop="planAmount" v-if="columns[11].visible"/>
<el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[12].visible"/> <el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[12].visible"/>
<el-table-column label="计划开始日期" align="center" prop="planBeginTime" width="100" v-if="columns[20].visible"/>
<el-table-column label="计划完成日期" align="center" prop="planEndTime" width="100" v-if="columns[21].visible"/>
<el-table-column label="实际开始时间" align="center" prop="beginTime" width="100" v-if="columns[13].visible"> <el-table-column label="实际开始时间" align="center" prop="beginTime" width="100" v-if="columns[13].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.beginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.beginTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -144,25 +154,25 @@
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button <!-- <el-button-->
size="mini" <!-- size="mini"-->
type="text" <!-- type="text"-->
icon="el-icon-edit" <!-- icon="el-icon-edit"-->
@click="handleUpdate(scope.row)" <!-- @click="handleUpdate(scope.row)"-->
v-hasPermi="['production:planInfo:edit']" <!-- v-hasPermi="['production:planInfo:edit']"-->
>修改计划 <!-- >修改计划-->
</el-button> <!-- </el-button>-->
<!-- <el-button--> <!-- &lt;!&ndash; <el-button&ndash;&gt;-->
<!-- size="mini"--> <!-- &lt;!&ndash; size="mini"&ndash;&gt;-->
<!-- type="text"--> <!-- &lt;!&ndash; type="text"&ndash;&gt;-->
<!-- icon="el-icon-delete"--> <!-- &lt;!&ndash; icon="el-icon-delete"&ndash;&gt;-->
<!-- @click="handleDelete(scope.row)"--> <!-- &lt;!&ndash; @click="handleDelete(scope.row)"&ndash;&gt;-->
<!-- v-hasPermi="['production:planInfo:remove']"--> <!-- &lt;!&ndash; v-hasPermi="['production:planInfo:remove']"&ndash;&gt;-->
<!-- >删除</el-button>--> <!-- &lt;!&ndash; >删除</el-button>&ndash;&gt;-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination
@ -216,10 +226,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="计划数量" prop="planAmount"> <el-form-item label="计划数量" prop="planAmount">
<el-input v-model="form.planAmount" placeholder="请输入计划数量"/> <el-input v-model="form.planAmount" placeholder="请输入计划数量" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="完成数量" prop="completeAmount"> <el-form-item label="完成数量" prop="completeAmount">
<el-input v-model="form.completeAmount" placeholder="请输入完成数量"/> <el-input v-model="form.completeAmount" placeholder="请输入完成数量" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="实际开始时间" prop="beginTime"> <el-form-item label="实际开始时间" prop="beginTime">
<el-date-picker clearable <el-date-picker clearable
@ -317,20 +327,25 @@ export default {
{ key: 9, label: `计划工位编号`, visible: false }, { key: 9, label: `计划工位编号`, visible: false },
{ key: 10, label: `计划工位名称`, visible: true }, { key: 10, label: `计划工位名称`, visible: true },
{ key: 11, label: `计划数量`, visible: true }, { key: 11, label: `计划数量`, visible: true },
{ key: 12, label: `完成数量`, visible: false }, { key: 12, label: `完成数量`, visible: true },
{ key: 13, label: `实际开始时间`, visible: true }, { key: 13, label: `实际开始时间`, visible: true },
{ key: 14, label: `实际结束时间`, visible: true }, { key: 14, label: `实际结束时间`, visible: true },
{ key: 15, label: `是否标识`, visible: false }, { key: 15, label: `是否标识`, visible: false },
{ key: 16, label: `创建人`, visible: false }, { key: 16, label: `创建人`, visible: false },
{ key: 17, label: `创建时间`, visible: false }, { key: 17, label: `创建时间`, visible: false },
{ key: 18, label: `更新人`, visible: false }, { key: 18, label: `更新人`, visible: false },
{ key: 19, label: `更新时间`, visible: false } { key: 19, label: `更新时间`, visible: false },
{ key: 20, label: `计划开始日期`, visible: true },
{ key: 21, label: `计划完成日期`, visible: true },
], ],
// 线 // 线
productLineList: [] productLineList: []
} }
}, },
created() { created() {
if (this.$route.query.orderCode != null){
this.queryParams.orderCode = this.$route.query.orderCode;
}
this.getList() this.getList()
findProductLineList().then(response => { findProductLineList().then(response => {
this.productLineList = response.data this.productLineList = response.data

@ -2,26 +2,26 @@
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="产线" prop="PRODUCT_LINE_NAME"> <el-form-item label="产线" prop="PRODUCT_LINE_NAME">
<el-select v-model="queryParams.WORK_CENTER_CODE" placeholder="请选择产线"> <el-select v-model="queryParams.productLineCode" placeholder="请选择产线" clearable>
<el-option <el-option
v-for="item in productLineList" v-for="item in productLineList"
:key="item.workCenterCode" :key="item.productLineCode"
:label="item.workCenterName" :label="item.productLineName"
:value="item.workCenterCode" :value="item.productLineCode"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="产品编码" prop="MATERIAL_CODE"> <el-form-item label="产品编号" prop="PRODUCT_CODE">
<el-input <el-input
v-model="queryParams.MATERIAL_CODE" v-model="queryParams.PRODUCT_CODE"
placeholder="请输入产品编" placeholder="请输入产品编"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="产品名称" prop="MATERIAL_NAME"> <el-form-item label="产品名称" prop="PRODUCT_NAME">
<el-input <el-input
v-model="queryParams.MATERIAL_NAME" v-model="queryParams.PRODUCT_NAME"
placeholder="请输入产品名称" placeholder="请输入产品名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -36,7 +36,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="工位"> <el-form-item label="工位">
<el-select v-model="queryParams.stationCode" placeholder="请选择工位"> <el-select v-model="queryParams.stationCode" placeholder="请选择工位" clearable>
<el-option <el-option
v-for="item in findStationList" v-for="item in findStationList"
:key="item.productLineCode" :key="item.productLineCode"
@ -49,7 +49,7 @@
<el-date-picker <el-date-picker
v-model="daterangeBeginTime" v-model="daterangeBeginTime"
style="width: 340px" style="width: 340px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" type="datetimerange"
range-separator="-" range-separator="-"
start-placeholder="开始时间" start-placeholder="开始时间"
@ -79,17 +79,14 @@
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/> <el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="工位" align="center" prop="PRODUCT_STATION" v-if="columns[1].visible"/> <el-table-column label="产线" align="center" prop="PRODUCT_LINE_NAME" v-if="columns[1].visible"/>
<el-table-column label="订单编号" align="center" prop="ORDER_CODE" v-if="columns[2].visible"/> <el-table-column label="工位" align="center" prop="STATION_NAME" v-if="columns[2].visible"/>
<el-table-column label="物料编码" align="center" prop="MATERIAL_CODE" v-if="columns[3].visible"> <el-table-column label="订单编号" align="center" prop="ORDER_CODE" v-if="columns[3].visible"/>
<template slot-scope="scope"> <el-table-column label="物料编号" align="center" prop="MATERIAL_CODE" v-if="columns[4].visible"/>
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span> <el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" v-if="columns[5].visible"/>
</template> <el-table-column label="产品编号" align="center" prop="PRODUCT_CODE" v-if="columns[6].visible"/>
</el-table-column> <el-table-column label="产品名称" align="center" prop="PRODUCT_NAME" v-if="columns[7].visible"/>
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" v-if="columns[4].visible"/> <el-table-column label="数量" align="center" prop="COMP_AMOUNT" v-if="columns[8].visible"/>
<el-table-column label="产品编码" align="center" prop="PRODUCT_CODE" v-if="columns[5].visible"/>
<el-table-column label="产品型号" align="center" prop="PRODUCT_NAME" v-if="columns[6].visible"/>
<el-table-column label="数量" align="center" prop="COMPLETE_AMOUNT" v-if="columns[7].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -97,18 +94,18 @@
type="text" type="text"
icon="el-icon-search" icon="el-icon-search"
@click="handleOrderDetails(scope.row)" @click="handleOrderDetails(scope.row)"
v-hasPermi="['report:pointDnb:edit']" >查看工单明细
>查看订单明细</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination--> <pagination
<!-- v-show="total>0"--> v-show="total>0"
<!-- :total="total"--> :total="total"
<!-- :page.sync="queryParams.pageNum"--> :page.sync="queryParams.pageNum"
<!-- :limit.sync="queryParams.pageSize"--> :limit.sync="queryParams.pageSize"
<!-- @pagination="getList"--> @pagination="getList"
<!-- />--> />
</div> </div>
</template> </template>
@ -119,7 +116,6 @@ import {
} from '@/api/report/reportAPI' } from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine' import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi' import { parseTime } from '@//utils/ruoyi'
import { getPointDnb } from '@//api/report/pointDnb'
export default { export default {
name: 'ReportInfo', name: 'ReportInfo',
@ -148,15 +144,17 @@ export default {
daterangeBeginTime: [], daterangeBeginTime: [],
// //
queryParams: { queryParams: {
// pageNum: 1, pageNum: 1,
// pageSize: 10, pageSize: 10,
beginBeginTime: null, beginBeginTime: null,
endBeginTime: null, endBeginTime: null,
WORK_CENTER_CODE: null, productLineCode: 'CX_02',
PRODUCT_LINE_NAME: null, stationCode: null,
ORDER_CODE: null, ORDER_CODE: null,
MATERIAL_CODE: null, MATERIAL_CODE: null,
MATERIAL_NAME: null, MATERIAL_NAME: null,
PRODUCT_CODE: null,
PRODUCT_NAME: null,
BEGIN_DATE: null BEGIN_DATE: null
}, },
// //
@ -165,13 +163,15 @@ export default {
rules: {}, rules: {},
columns: [ columns: [
{ key: 0, label: `主键标识`, visible: false }, { key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `工位`, visible: true }, { key: 1, label: `产线`, visible: true },
{ key: 2, label: `订单编号`, visible: true }, { key: 2, label: `工位`, visible: true },
{ key: 3, label: `物料编码`, visible: true }, { key: 3, label: `订单编号`, visible: true },
{ key: 4, label: `物料名称`, visible: true }, { key: 4, label: `物料编号`, visible: true },
{ key: 5, label: `产品编码`, visible: true }, { key: 5, label: `物料名称`, visible: true },
{ key: 6, label: `产品型号`, visible: true }, { key: 6, label: `产品编号`, visible: true },
{ key: 7, label: `数量`, visible: true }, { key: 7, label: `产品名称`, visible: true },
{ key: 8, label: `数量`, visible: true },
{ key: 9, label: `数量`, visible: true }
], ],
// 线 // 线
productLineList: [], productLineList: [],
@ -179,16 +179,23 @@ export default {
findStationList: [] findStationList: []
} }
}, },
watch: {
'queryParams.productLineCode': function(newVal, oldVal) {
//
this.getStationList()
}
},
created() { created() {
findProductLineList({ productLineType: 1 }).then(response => { findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data this.productLineList = response.data
}).then(() => {
return findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode })
}).then(response => {
this.findStationList = response.data
}) })
findProductLineList({productLineType: 2}).then(response => {
this.findStationList = response.data;
});
const nowDate = parseTime(new Date(), '{y}-{m}-{d}') const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate this.daterangeBeginTime[0] = nowDate + ' 00:00:00'
this.daterangeBeginTime[1] = nowDate this.daterangeBeginTime[1] = nowDate + ' 23:59:59'
this.getList() this.getList()
}, },
methods: { methods: {
@ -203,8 +210,8 @@ export default {
this.queryParams.endBeginTime = null this.queryParams.endBeginTime = null
} }
productionExecutionReportList(this.queryParams).then(response => { productionExecutionReportList(this.queryParams).then(response => {
this.reportList = response.data this.reportList = response.rows
// this.total = response.total; this.total = response.total
this.loading = false this.loading = false
}) })
}, },
@ -217,11 +224,12 @@ export default {
reset() { reset() {
this.daterangeBeginTime = [] this.daterangeBeginTime = []
this.form = { this.form = {
WORK_CENTER_CODE: null, stationCode: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null, ORDER_CODE: null,
MATERIAL_CODE: null, MATERIAL_CODE: null,
MATERIAL_NAME: null, MATERIAL_NAME: null,
PRODUCT_CODE: null,
PRODUCT_NAME: null,
BEGIN_DATE: null BEGIN_DATE: null
} }
this.resetForm('form') this.resetForm('form')
@ -238,7 +246,14 @@ export default {
}, },
/** 查看明细 */ /** 查看明细 */
handleOrderDetails(row) { handleOrderDetails(row) {
this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE}); this.$tab.openPage('生产计划', '/product/planInfo', { orderCode: row.ORDER_CODE })
},
/** 获取工位方法 */
getStationList() {
findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode })
.then(response => {
this.findStationList = response.data
})
}, },
// //

Loading…
Cancel
Save