Merge remote-tracking branch 'origin/master'

master
夜笙歌 12 months ago
commit 56645b2b17

@ -0,0 +1,19 @@
import request from '@/utils/request'
// 查询清单率报表
export function inventoryRateReportList(query) {
return request({
url: '/report/productionReport/inventoryRateReportList',
method: 'get',
params: query
})
}
// 查询生产执行报表
export function productionExecutionReportList(query) {
return request({
url: '/report/productionReport/productionExecutionReportList',
method: 'get',
params: query
})
}

@ -111,14 +111,14 @@
v-hasPermi="['base:customData:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['base:customData:remove']"
>删除
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['base:customData:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>

@ -111,14 +111,14 @@
v-hasPermi="['base:customData:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['base:customData:remove']"
>删除
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['base:customData:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>

@ -111,14 +111,14 @@
v-hasPermi="['base:customData:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['base:customData:remove']"
>删除
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['base:customData:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>

@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="工作中心" prop="workCenterCode" >
<el-select v-model="queryParams.workCenterCode" placeholder="请选择工作中心" >
<el-option
v-for="item in productLineList"
:key="item.workCenterCode"
:label="item.workCenterName"
:value="item.workCenterCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="SAP计划编号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
@ -117,7 +127,13 @@
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="完成日期" align="center" prop="completeDate" width="180" v-if="columns[19].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.completeDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="工厂编码" align="center" prop="factoryCode" v-if="columns[13].visible"/>
<el-table-column label="工作中心编码" align="center" prop="workCenterCode" v-if="columns[13].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[14].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
@ -135,11 +151,7 @@
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="完成日期" align="center" prop="completeDate" width="180" v-if="columns[19].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.completeDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
@ -275,6 +287,7 @@ import {
updateOrderInfo,
releaseOrderPlan
} from '@/api/base/orderInfo'
import { findProductLineList } from '@//api/base/productLine'
export default {
name: "OrderInfo",
@ -351,7 +364,9 @@ export default {
{ key: 18, label: `更新时间`, visible: false },
{ key: 19, label: `完成日期`, visible: true },
{ key: 20, label: `是否已下达生产计划`, visible: true },
]
],
// 线
productLineList: [],
};
},
created() {
@ -366,6 +381,9 @@ export default {
this.total = response.total;
this.loading = false;
});
findProductLineList({productLineType: 1}).then(response => {
this.productLineList = response.data;
});
},
//
cancel() {

@ -109,6 +109,7 @@
<dict-tag :options="dict.type.station_type" :value="scope.row.stationType"/>
</template>
</el-table-column>
<el-table-column label="工位顺序" align="center" prop="executionSort" v-if="columns[11].visible"/>
<el-table-column label="所属工厂" align="center" prop="plantName" v-if="columns[4].visible"/>
<el-table-column label="所属产线" align="center" prop="parentName" v-if="columns[10].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[5].visible" >
@ -165,6 +166,9 @@
<el-form-item label="工位名称" prop="productLineName">
<el-input v-model="form.productLineName" placeholder="请输入工位名称" />
</el-form-item>
<el-form-item label="工位顺序" prop="executionSort">
<el-input v-model="form.executionSort" placeholder="请输入工位顺序" />
</el-form-item>
<el-form-item label="工位类型" prop="stationType">
<el-radio-group v-model="form.stationType">
<el-radio
@ -249,6 +253,7 @@ export default {
stationType: null,
createdBy: null,
createdTime: null,
executionSort: null,
updatedBy: null,
updatedTime: null,
processCode: null
@ -270,6 +275,7 @@ export default {
{ key: 8, label: `更新人`, visible: false },
{ key: 9, label: `更新时间`, visible: true },
{ key: 10, label: `所属产线`, visible: true },
{ key: 11, label: `工位顺序`, visible: true },
],
//
factoryList: [],
@ -320,6 +326,7 @@ export default {
createdBy: null,
createdTime: null,
updatedBy: null,
executionSort: null,
updatedTime: null,
parentId: null
};

@ -69,8 +69,6 @@
<el-table-column label="产线编号" align="center" prop="productionLine" v-if="columns[5].visible"/>
<el-table-column label="质检工位编号" align="center" prop="stationCode" v-if="columns[1].visible"/>
<el-table-column label="质检工位名称" align="center" prop="stationName" v-if="columns[2].visible"/>
<el-table-column label="缺陷编号" align="center" prop="defectCode" v-if="columns[3].visible"/>
<el-table-column label="缺陷名称" align="center" prop="defectName" v-if="columns[4].visible"/>
<el-table-column label="缺陷大类" align="center" prop="materialCategories" v-if="columns[11].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.defect_categories" :value="scope.row.materialCategories"/>
@ -81,6 +79,8 @@
<dict-tag :options="dict.type.defect_subclass" :value="scope.row.materialSubclass"/>
</template>
</el-table-column>
<el-table-column label="缺陷编号" align="center" prop="defectCode" v-if="columns[3].visible"/>
<el-table-column label="缺陷名称" align="center" prop="defectName" v-if="columns[4].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[6].visible"/>
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[7].visible"/>
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[8].visible">

@ -109,6 +109,7 @@
</el-table-column>
<el-table-column label="仓库区域" align="center" prop="storeArea" v-if="columns[4].visible"/>
<el-table-column label="所属工厂" align="center" prop="plantName" v-if="columns[11].visible"/>
<el-table-column label="产线" align="center" prop="productLineName" v-if="columns[11].visible"/>
<el-table-column label="仓库状态" align="center" prop="storeStatus" v-if="columns[5].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.store_status" :value="scope.row.storeStatus"/>
@ -202,6 +203,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属产线">
<el-select v-model="form.productLineCode" placeholder="请选择产线工位">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="仓库状态" prop="storeStatus">
<el-radio-group v-model="form.storeStatus">
<el-radio
@ -232,6 +243,7 @@
<script>
import { listStoreInfo, getStoreInfo, delStoreInfo, addStoreInfo, updateStoreInfo } from "@/api/base/storeInfo";
import { findFactoryList } from "@/api/base/factory";
import { findProductLineList } from '@//api/base/productLine'
export default {
name: "StoreInfo",
@ -265,6 +277,7 @@ export default {
storeType: null,
storeArea: null,
storeStatus: null,
productLineCode: null,
isFlag: null,
createdBy: null,
createdTime: null,
@ -292,6 +305,8 @@ export default {
],
//
factoryList: [],
// 线
productLineList: [],
};
},
created() {
@ -299,6 +314,9 @@ export default {
findFactoryList().then(response => {
this.factoryList = response.data;
});
findProductLineList({productLineType: 1}).then(response => {
this.productLineList = response.data;
});
},
methods: {
/** 查询仓库信息列表 */
@ -327,6 +345,7 @@ export default {
isFlag: 0,
createdBy: null,
createdTime: null,
productLineCode: null,
updatedBy: null,
updatedTime: null
};

@ -0,0 +1,260 @@
<template>
<div class="app-container">
<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-select v-model="queryParams.WORK_CENTER_CODE" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.workCenterCode"
:label="item.workCenterName"
:value="item.workCenterCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="MATERIAL_CODE">
<el-input
v-model="queryParams.MATERIAL_CODE"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="MATERIAL_NAME">
<el-input
v-model="queryParams.MATERIAL_NAME"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="SAP订单编号" prop="ORDER_CODE">
<el-input
v-model="queryParams.ORDER_CODE"
placeholder="请输入SAP计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工位">
<el-select v-model="queryParams.stationCode" placeholder="请选择工位">
<el-option
v-for="item in findStationList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="起止时间">
<el-date-picker
v-model="daterangeBeginTime"
style="width: 340px"
value-format="yyyy-MM-dd"
type="datetimerange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
></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-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<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="PRODUCT_STATION" 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="MATERIAL_CODE" v-if="columns[3].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" v-if="columns[4].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">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleOrderDetails(scope.row)"
v-hasPermi="['report:pointDnb:edit']"
>查看订单明细</el-button>
</template>
</el-table-column>
</el-table>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
</div>
</template>
<script>
import {
productionExecutionReportList
} from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi'
import { getPointDnb } from '@//api/report/pointDnb'
export default {
name: 'ReportInfo',
dicts: ['is_flag'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
reportList: [],
//
title: '',
//
open: false,
//
daterangeBeginTime: [],
//
queryParams: {
// pageNum: 1,
// pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
},
//
form: {},
//
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `工位`, visible: true },
{ key: 2, label: `订单编号`, visible: true },
{ key: 3, label: `物料编码`, visible: true },
{ key: 4, label: `物料名称`, visible: true },
{ key: 5, label: `产品编码`, visible: true },
{ key: 6, label: `产品型号`, visible: true },
{ key: 7, label: `数量`, visible: true },
],
// 线
productLineList: [],
//
findStationList: []
}
},
created() {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
})
findProductLineList({productLineType: 2}).then(response => {
this.findStationList = response.data;
});
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate
this.daterangeBeginTime[1] = nowDate
this.getList()
},
methods: {
/** 查询工单信息列表 */
getList() {
this.loading = true
if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
this.queryParams.endBeginTime = this.daterangeBeginTime[1]
} else {
this.queryParams.beginBeginTime = null
this.queryParams.endBeginTime = null
}
productionExecutionReportList(this.queryParams).then(response => {
this.reportList = response.data
// this.total = response.total;
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.daterangeBeginTime = []
this.form = {
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
// this.queryParams.pageNum = 1;
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
/** 查看明细 */
handleOrderDetails(row) {
this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 导出按钮操作 */
handleExport() {
this.download('/report/productionReport/export', {
...this.queryParams
}, `report_${new Date().getTime()}.xlsx`)
}
}
}
</script>

@ -0,0 +1,231 @@
<template>
<div class="app-container">
<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-select v-model="queryParams.WORK_CENTER_CODE" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.workCenterCode"
:label="item.workCenterName"
:value="item.workCenterCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="MATERIAL_CODE">
<el-input
v-model="queryParams.MATERIAL_CODE"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="MATERIAL_NAME">
<el-input
v-model="queryParams.MATERIAL_NAME"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="SAP订单编号" prop="ORDER_CODE">
<el-input
v-model="queryParams.ORDER_CODE"
placeholder="请输入SAP计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划日期">
<el-date-picker
v-model="daterangeBeginTime"
style="width: 340px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
></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-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<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="PRODUCT_LINE_NAME" v-if="columns[1].visible"/>
<el-table-column label="SAP订单编号" align="center" prop="ORDER_CODE" v-if="columns[2].visible"/>
<el-table-column label="计划日期" align="center" prop="BEGIN_DATE" v-if="columns[3].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="产品编码" align="center" prop="MATERIAL_CODE" v-if="columns[4].visible"/>
<el-table-column label="产品名称" align="center" prop="MATERIAL_NAME" v-if="columns[5].visible"/>
<el-table-column label="计划数量" align="center" prop="ORDER_AMOUNT" 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" prop="ORDER_RATE" v-if="columns[8].visible"/>
</el-table>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
</div>
</template>
<script>
import {
inventoryRateReportList
} from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi'
export default {
name: 'ReportInfo',
dicts: ['is_flag'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
reportList: [],
//
title: '',
//
open: false,
//
daterangeBeginTime: [],
//
queryParams: {
// pageNum: 1,
// pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
},
//
form: {},
//
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `产线`, visible: true },
{ key: 2, label: `SAP订单编号`, visible: true },
{ key: 3, label: `计划日期`, visible: true },
{ key: 4, label: `产品编码`, visible: true },
{ key: 5, label: `产品名称`, visible: true },
{ key: 6, label: `计划数量`, visible: true },
{ key: 7, label: `已下线数量`, visible: true },
{ key: 8, label: `完成率`, visible: true }
],
// 线
productLineList: []
}
},
created() {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
})
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate
this.daterangeBeginTime[1] = nowDate
this.getList()
},
methods: {
/** 查询工单信息列表 */
getList() {
this.loading = true
if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
this.queryParams.endBeginTime = this.daterangeBeginTime[1]
} else {
this.queryParams.beginBeginTime = null
this.queryParams.endBeginTime = null
}
inventoryRateReportList(this.queryParams).then(response => {
this.reportList = response.data
// this.total = response.total;
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.daterangeBeginTime = []
this.form = {
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
// this.queryParams.pageNum = 1;
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 导出按钮操作 */
handleExport() {
this.download('/report/productionReport/export', {
...this.queryParams
}, `report_${new Date().getTime()}.xlsx`)
}
}
}
</script>

@ -0,0 +1,260 @@
<template>
<div class="app-container">
<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-select v-model="queryParams.WORK_CENTER_CODE" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.workCenterCode"
:label="item.workCenterName"
:value="item.workCenterCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="MATERIAL_CODE">
<el-input
v-model="queryParams.MATERIAL_CODE"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="MATERIAL_NAME">
<el-input
v-model="queryParams.MATERIAL_NAME"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="SAP订单编号" prop="ORDER_CODE">
<el-input
v-model="queryParams.ORDER_CODE"
placeholder="请输入SAP计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工位">
<el-select v-model="queryParams.stationCode" placeholder="请选择工位">
<el-option
v-for="item in findStationList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="起止时间">
<el-date-picker
v-model="daterangeBeginTime"
style="width: 340px"
value-format="yyyy-MM-dd"
type="datetimerange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
></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-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<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="PRODUCT_STATION" 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="MATERIAL_CODE" v-if="columns[3].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" v-if="columns[4].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">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleOrderDetails(scope.row)"
v-hasPermi="['report:pointDnb:edit']"
>查看订单明细</el-button>
</template>
</el-table-column>
</el-table>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
</div>
</template>
<script>
import {
productionExecutionReportList
} from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi'
import { getPointDnb } from '@//api/report/pointDnb'
export default {
name: 'ReportInfo',
dicts: ['is_flag'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
reportList: [],
//
title: '',
//
open: false,
//
daterangeBeginTime: [],
//
queryParams: {
// pageNum: 1,
// pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
},
//
form: {},
//
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `工位`, visible: true },
{ key: 2, label: `订单编号`, visible: true },
{ key: 3, label: `物料编码`, visible: true },
{ key: 4, label: `物料名称`, visible: true },
{ key: 5, label: `产品编码`, visible: true },
{ key: 6, label: `产品型号`, visible: true },
{ key: 7, label: `数量`, visible: true },
],
// 线
productLineList: [],
//
findStationList: []
}
},
created() {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
})
findProductLineList({productLineType: 2}).then(response => {
this.findStationList = response.data;
});
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate
this.daterangeBeginTime[1] = nowDate
this.getList()
},
methods: {
/** 查询工单信息列表 */
getList() {
this.loading = true
if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
this.queryParams.endBeginTime = this.daterangeBeginTime[1]
} else {
this.queryParams.beginBeginTime = null
this.queryParams.endBeginTime = null
}
productionExecutionReportList(this.queryParams).then(response => {
this.reportList = response.data
// this.total = response.total;
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.daterangeBeginTime = []
this.form = {
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
// this.queryParams.pageNum = 1;
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
/** 查看明细 */
handleOrderDetails(row) {
this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 导出按钮操作 */
handleExport() {
this.download('/report/productionReport/export', {
...this.queryParams
}, `report_${new Date().getTime()}.xlsx`)
}
}
}
</script>
Loading…
Cancel
Save