update - 扫描下线报表

master
yinq 9 months ago
parent 586ed69b88
commit 7c3b7030a2

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询扫描下线记录报表列表
export function listProductOffLine(query) {
return request({
url: '/report/productOffLine/list',
method: 'get',
params: query
})
}

@ -1,55 +1,53 @@
<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="90px">
<el-form-item label="产线" prop="PRODUCT_LINE_NAME"> <el-form-item label="产线" prop="productLineCode">
<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="productSncode">
<el-input <el-input
v-model="queryParams.MATERIAL_CODE" v-model="queryParams.productSncode"
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="MES工单号" prop="productOrderNo">
<el-input <el-input
v-model="queryParams.MATERIAL_NAME" v-model="queryParams.productOrderNo"
placeholder="请输入产品名称" placeholder="请输入工单号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="SAP订单编号" prop="ORDER_CODE"> <el-form-item label="物料编码" prop="productCode">
<el-input <el-input
v-model="queryParams.ORDER_CODE" v-model="queryParams.productCode"
placeholder="请输入SAP计划编号" placeholder="请输入物料编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工位"> <el-form-item label="箱体码" prop="boxCode">
<el-select v-model="queryParams.stationCode" placeholder="请选择工位"> <el-input
<el-option v-model="queryParams.boxCode"
v-for="item in findStationList" placeholder="请输入箱体码"
:key="item.productLineCode" clearable
:label="item.productLineName" @keyup.enter.native="handleQuery"
:value="item.productLineCode" />
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="起止时间"> <el-form-item label="扫描时间">
<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="开始时间"
@ -63,78 +61,65 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">--> <el-col :span="1.5">
<!-- <el-button--> <el-button
<!-- type="warning"--> type="warning"
<!-- plain--> plain
<!-- icon="el-icon-download"--> icon="el-icon-download"
<!-- size="mini"--> size="mini"
<!-- @click="handleExport"--> @click="handleExport"
<!-- >导出--> >导出</el-button>
<!-- </el-button>--> </el-col>
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="productOffLineList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center" v-if="false"/>
<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_FACTORY_CODE" v-if="columns[1].visible"/> <el-table-column label="工厂" align="center" prop="factoryName" v-if="columns[1].visible" width="110"/>
<el-table-column label="产线" align="center" prop="ORDER_CODE" v-if="columns[2].visible"/> <el-table-column label="产线" align="center" prop="productLineName" v-if="columns[20].visible"/>
<el-table-column label="SAP计划编号" align="center" prop="PRODUCT_ORDER_NO" v-if="columns[3].visible"/> <el-table-column label="公司条码" align="center" prop="productSncode" v-if="columns[2].visible" width="120"/>
<el-table-column label="MES工单号" align="center" prop="productOrderNo" v-if="columns[3].visible" width="90"/>
<el-table-column label="销售订单号" align="center" prop="PRODUCT_SALE_NO" v-if="columns[4].visible"/> <el-table-column label="销售订单号" align="center" prop="productSaleNo" v-if="columns[4].visible"/>
<el-table-column label="销售订单行号" align="center" prop="PRODUCT_SALE_LINE_NO" v-if="columns[5].visible"/> <el-table-column label="销售行号" align="center" prop="productSaleLineNo" v-if="columns[5].visible"/>
<el-table-column label="物料编码" align="center" prop="PRODUCT_CODE" width="100" v-if="columns[6].visible"/> <el-table-column label="物料编码" align="center" prop="productCode" v-if="columns[6].visible" width="100"/>
<el-table-column label="产品型号" align="center" prop="PRODUCT_MODEL" width="190" v-if="columns[7].visible"/> <el-table-column label="产品型号" align="center" prop="productModel" v-if="columns[7].visible" width="140"/>
<el-table-column label="物料描述" align="center" prop="PRODUCT_NAME" width="200" v-if="columns[8].visible"/> <el-table-column label="物料描述" align="center" prop="productName" v-if="columns[8].visible" width="160"/>
<el-table-column label="产品类型" align="center" prop="PRODUCT_TYPE" v-if="columns[9].visible"/> <el-table-column label="生成日期" align="center" prop="productCreatedate" v-if="columns[17].visible" width="100"/>
<el-table-column label="产品条码编码" align="center" prop="PRODUCT_BAR_NO" v-if="columns[10].visible"/> <el-table-column label="扫描时间" align="center" prop="productScantime" width="180" v-if="columns[18].visible">
<el-table-column label="生成日期" align="center" prop="PRODUCT_CREATEDATE" v-if="columns[11].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.productScantime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="扫描时间" align="center" prop="PRODUCT_SCANTIME" v-if="columns[12].visible"> <el-table-column label="产品类型" align="center" prop="productType" v-if="columns[9].visible"/>
<template slot-scope="scope"> <el-table-column label="验证组合" align="center" prop="productCheckInfo" v-if="columns[10].visible"/>
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d}') }}</span> <el-table-column label="标签特征" align="center" prop="productRemark" v-if="columns[11].visible"/>
</template> <el-table-column label="产品条码编码" align="center" prop="productBarNo" v-if="columns[12].visible" width="100"/>
</el-table-column> <el-table-column label="主型号" align="center" prop="productMasterModel" v-if="columns[13].visible"/>
<el-table-column label="箱体码" align="center" prop="BOX_CODE" v-if="columns[13].visible"/> <el-table-column label="版本号" align="center" prop="productVersion" v-if="columns[14].visible"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">--> <el-table-column label="用途位" align="center" prop="productUserinfo" v-if="columns[15].visible"/>
<!-- <template slot-scope="scope">--> <el-table-column label="流通特性" align="center" prop="productCirculate" v-if="columns[16].visible"/>
<!-- <el-button--> <el-table-column label="箱体码" align="center" prop="boxCode" v-if="columns[19].visible"/>
<!-- 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> </el-table>
<!-- <pagination-->
<!-- v-show="total>0"--> <pagination
<!-- :total="total"--> v-show="total>0"
<!-- :page.sync="queryParams.pageNum"--> :total="total"
<!-- :limit.sync="queryParams.pageSize"--> :page.sync="queryParams.pageNum"
<!-- @pagination="getList"--> :limit.sync="queryParams.pageSize"
<!-- />--> @pagination="getList"
/>
</div> </div>
</template> </template>
<script> <script>
import { import { listProductOffLine } from "@/api/report/productOffLine";
ScanOfflineRecordReportList
} 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: "ProductOffLine",
dicts: ['is_flag'],
data() { data() {
return { return {
// //
@ -149,69 +134,86 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// // 线
reportList: [], productOffLineList: [],
// //
title: '', title: "",
// //
open: false, open: false,
//
daterangeBeginTime: [],
// //
queryParams: { queryParams: {
// pageNum: 1, pageNum: 1,
// pageSize: 10, pageSize: 10,
productFactoryCode: null,
productSncode: null,
productOrderNo: null,
productSaleNo: null,
productSaleLineNo: null,
productCode: null,
productModel: null,
productName: null,
productType: null,
productCheckInfo: null,
productRemark: null,
productBarNo: null,
productMasterModel: null,
productVersion: null,
productUserinfo: null,
productCirculate: null,
productCreatedate: null,
productScantime: null,
boxCode: null,
beginBeginTime: null, beginBeginTime: null,
endBeginTime: null, endBeginTime: null,
WORK_CENTER_CODE: null, productLineCode: 'CX_02'
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
}, },
//
daterangeBeginTime: [],
// //
form: {}, form: {},
// //
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: false },
{ key: 5, label: `产品编码`, visible: true }, { key: 5, label: `销售行号`, visible: false },
{ 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: 8, label: `物料描述`, visible: true },
{ key: 9, label: `数量`, visible: true }, { key: 9, label: `产品类型`, visible: true },
{ key: 10, label: `数量`, visible: true }, { key: 10, label: `验证组合`, visible: true },
{ key: 11, label: `数量`, visible: true }, { key: 11, label: `标签特征`, visible: true },
{ key: 12, label: `数量`, visible: true }, { key: 12, label: `产品条码编码`, visible: true },
{ key: 13, label: `数量`, visible: true }, { key: 13, label: `主型号`, visible: true },
{ key: 14, label: `版本号`, visible: true },
{ key: 15, label: `用途位`, visible: true },
{ key: 16, label: `流通特性`, visible: true },
{ key: 17, label: `生成日期`, visible: true },
{ key: 18, label: `扫描时间`, visible: true },
{ key: 19, label: `箱体码`, visible: true },
{ key: 20, label: `产线`, visible: true },
], ],
// 线 // 线
productLineList: [], productLineList: [],
// };
findStationList: []
}
}, },
created() { created() {
findProductLineList({ productLineType: 1 }).then(response => { findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data this.productLineList = 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: {
/** 查询工单信息列表 */ /** 查询扫描下线记录报表列表 */
getList() { getList() {
this.loading = true this.loading = true;
if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) { if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
this.queryParams.beginBeginTime = this.daterangeBeginTime[0] this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
this.queryParams.endBeginTime = this.daterangeBeginTime[1] this.queryParams.endBeginTime = this.daterangeBeginTime[1]
@ -219,59 +221,66 @@ export default {
this.queryParams.beginBeginTime = null this.queryParams.beginBeginTime = null
this.queryParams.endBeginTime = null this.queryParams.endBeginTime = null
} }
ScanOfflineRecordReportList(this.queryParams).then(response => { listProductOffLine(this.queryParams).then(response => {
this.reportList = response.data this.productOffLineList = response.rows;
// this.total = response.total; this.total = response.total;
this.loading = false this.loading = false;
}) });
}, },
// //
cancel() { cancel() {
this.open = false this.open = false;
this.reset() this.reset();
}, },
// //
reset() { reset() {
this.daterangeBeginTime = []
this.form = { this.form = {
WORK_CENTER_CODE: null, objId: null,
PRODUCT_LINE_NAME: null, productFactoryCode: null,
ORDER_CODE: null, productSncode: null,
MATERIAL_CODE: null, productOrderNo: null,
MATERIAL_NAME: null, productSaleNo: null,
BEGIN_DATE: null productSaleLineNo: null,
} productCode: null,
this.resetForm('form') productModel: null,
productName: null,
productType: null,
productCheckInfo: null,
productRemark: null,
productBarNo: null,
productMasterModel: null,
productVersion: null,
productUserinfo: null,
productCirculate: null,
productCreatedate: null,
productScantime: null,
boxCode: null,
productLineCode: null
};
this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
// this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList() this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm("queryForm");
this.handleQuery() this.handleQuery();
},
/** 查看明细 */
handleOrderDetails(row) {
this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE});
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId) this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('/report/productionReport/export', { this.download('report/productOffLine/export', {
...this.queryParams ...this.queryParams
}, `report_${new Date().getTime()}.xlsx`) }, `productOffLine_${new Date().getTime()}.xlsx`)
} }
} }
} };
</script> </script>

Loading…
Cancel
Save