Merge remote-tracking branch 'origin/master'

master
夜笙歌 11 months ago
commit aa3d0cac58

@ -71,3 +71,22 @@ export function productTraceabilityReportList(query) {
params: query params: query
}) })
} }
// 测温记录报表
export function temperatureRecordReportList(query) {
return request({
url: '/report/qualityReport/temperatureRecordReportList',
method: 'get',
params: query
})
}
// 灌注记录报表
export function pourRecordReportList(query) {
return request({
url: '/report/qualityReport/pourRecordReportList',
method: 'get',
params: query
})
}

@ -1,6 +1,6 @@
<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="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="物料编码" prop="materialCode"> <el-form-item label="物料编码" prop="materialCode">
<el-input <el-input
v-model="queryParams.materialCode" v-model="queryParams.materialCode"
@ -17,6 +17,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="父级物料编码" prop="parentId">
<el-input
v-model="queryParams.parentId"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -34,11 +42,12 @@
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[3].visible"/> <el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[3].visible"/>
<el-table-column label="物料类别" align="center" prop="materialType" v-if="columns[4].visible"> <el-table-column label="物料类别" align="center" prop="materialType" v-if="columns[4].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.material_type" :value="scope.row.materialType"/> <dict-tag :options="dict.type.material_subclass" :value="scope.row.materialType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="标准数量" align="center" prop="standardAmount" v-if="columns[5].visible"/> <el-table-column label="标准数量" align="center" prop="standardAmount" v-if="columns[5].visible"/>
<el-table-column label="父级编号" align="center" prop="parentId" v-if="columns[6].visible"/> <el-table-column label="父级物料编号" align="center" prop="parentId" v-if="columns[6].visible"/>
<el-table-column label="父级物料名称" align="center" prop="parentName" v-if="columns[16].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[7].visible"> <el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[7].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/> <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
@ -99,11 +108,16 @@ import {
addOrderBomInfo, addOrderBomInfo,
updateOrderBomInfo updateOrderBomInfo
} from '@/api/base/orderBomInfo' } from '@/api/base/orderBomInfo'
import { listMaterialInfo } from '@//api/base/materialInfo'
export default { export default {
name: 'OrderBomInfo', name: 'OrderBomInfo',
dicts: ['material_type', 'is_flag'], dicts: ['material_subclass', 'is_flag'],
props: {
message: String
},
// mounted() {
// this.getList();
// },
data() { data() {
return { return {
// //
@ -152,7 +166,7 @@ export default {
rules: {}, rules: {},
columns: [ columns: [
{ key: 0, label: `主键标识`, visible: false }, { key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `BOM编号`, visible: true }, { key: 1, label: `BOM编号`, visible: false },
{ 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 },
@ -166,7 +180,8 @@ export default {
{ key: 12, label: `工厂编号`, visible: false }, { key: 12, label: `工厂编号`, visible: false },
{ key: 13, label: `排序`, visible: false }, { key: 13, label: `排序`, visible: false },
{ key: 14, label: `销售凭证`, visible: false }, { key: 14, label: `销售凭证`, visible: false },
{ key: 15, label: `销售单据项目`, visible: false } { key: 15, label: `销售单据项目`, visible: false },
{ key: 16, label: `父级物料名称`, visible: true }
] ]
} }
}, },
@ -177,7 +192,11 @@ export default {
/** 查询订单BOM列表 */ /** 查询订单BOM列表 */
getList() { getList() {
this.loading = true this.loading = true
listMaterialInfo(this.queryParams).then(response => { if (this.message != null){
this.queryParams.parentId = this.message;
console.log(333,this.queryParams.parentId)
}
listOrderBomInfo(this.queryParams).then(response => {
this.orderBomInfoList = response.rows this.orderBomInfoList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false

@ -132,8 +132,8 @@
<el-form-item label="标准数量" prop="standardAmount"> <el-form-item label="标准数量" prop="standardAmount">
<el-input v-model="form.standardAmount" placeholder="请输入标准数量" /> <el-input v-model="form.standardAmount" placeholder="请输入标准数量" />
</el-form-item> </el-form-item>
<el-form-item label="物料类型" prop="materialType"> <el-form-item label="物料类型" prop="materialType" >
<el-select v-model="form.materialType" placeholder="请选择物料类型"> <el-select v-model="form.materialType" placeholder="请选择物料类型" :disabled="true">
<el-option <el-option
v-for="dict in dict.type.material_subclass" v-for="dict in dict.type.material_subclass"
:key="dict.value" :key="dict.value"
@ -143,7 +143,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属工厂"> <el-form-item label="所属工厂">
<el-select v-model="form.plantCode" placeholder="请选择所属工厂" > <el-select v-model="form.plantCode" placeholder="请选择所属工厂" :disabled="true">
<el-option <el-option
v-for="item in factoryList" v-for="item in factoryList"
:key="item.factoryCode" :key="item.factoryCode"
@ -180,7 +180,7 @@
<!-- 添加物料信息对话框 --> <!-- 添加物料信息对话框 -->
<el-dialog title="添加成品BOM明细" :visible.sync="materialOpen" append-to-body> <el-dialog title="添加成品BOM明细" :visible.sync="materialOpen" append-to-body>
<add-bom @selection="handleSelection" ref="materialRef"></add-bom> <add-bom :message="parentMessage" @selection="handleSelection" ref="materialRef" ></add-bom>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitMaterialForm"> </el-button> <el-button type="primary" @click="submitMaterialForm"> </el-button>
<el-button @click="materialOpen = false"> </el-button> <el-button @click="materialOpen = false"> </el-button>
@ -249,6 +249,8 @@ export default {
}, },
// //
form: {}, form: {},
//
parentMessage: null,
// //
rules: { rules: {
}, },
@ -256,6 +258,7 @@ export default {
factoryList: [], factoryList: [],
// 线 // 线
productLineList: [], productLineList: [],
openSum: 1,
}; };
}, },
created() { created() {
@ -315,11 +318,12 @@ export default {
/** 提交物料信息按钮 */ /** 提交物料信息按钮 */
submitMaterialForm() { submitMaterialForm() {
let selectedRow = this.$refs.materialRef.selectedRow; let selectedRow = this.$refs.materialRef.selectedRow;
this.form.bomCode = selectedRow.bomCode; this.form.bomCode = selectedRow.materialCode;
this.form.materialCode = selectedRow.materialCode; this.form.materialCode = selectedRow.materialCode;
this.form.materialName = selectedRow.materialName; this.form.materialName = selectedRow.materialName;
this.form.plantCode = selectedRow.factoryCode; this.form.plantCode = selectedRow.factoryCode;
this.form.materialType = selectedRow.materialType; this.form.materialType = selectedRow.materialType;
this.form.standardAmount = selectedRow.standardAmount;
this.materialOpen = false; this.materialOpen = false;
}, },
// //
@ -354,7 +358,14 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleMaterialAdd() { handleMaterialAdd() {
if (this.openSum !== 1){
this.parentMessage = this.form.parentId;
this.$refs.materialRef.getList();
}else {
this.openSum++;
}
this.materialOpen = true; this.materialOpen = true;
// this.$refs.materialRef.getList();
// this.title = "BOM"; // this.title = "BOM";
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
@ -366,6 +377,8 @@ export default {
} else { } else {
this.form.parentId = 0; this.form.parentId = 0;
} }
//
this.parentMessage = this.form.parentId;
this.open = true; this.open = true;
this.title = "添加生产BOM"; this.title = "添加生产BOM";
}, },

@ -226,7 +226,6 @@ import {
} from '@/api/production/baseBomInfo' } from '@/api/production/baseBomInfo'
import {findFactoryList} from "@//api/base/factory"; import {findFactoryList} from "@//api/base/factory";
import addBom from '@//views/base/orderBomInfo/addBom.vue'; import addBom from '@//views/base/orderBomInfo/addBom.vue';
import { addSAPCalendar } from '@//api/production/calendarInfo'
export default { export default {
name: "BaseBomInfo", name: "BaseBomInfo",

@ -0,0 +1,263 @@
<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="PERFUSION_BOXCODE" v-if="columns[1].visible"/>
<el-table-column label="左侧冷媒型号" align="center" prop="PERFUSION_REFRIGERANTTYPELEFT" v-if="columns[2].visible"/>
<el-table-column label="右侧侧冷媒型号" align="center" prop="PERFUSION_REFRIGERANTTYPERIGHT" v-if="columns[3].visible"/>
<el-table-column label="设置灌注量" align="center" prop="PERFUSION_SETVOLUME" v-if="columns[4].visible"/>
<el-table-column label="实际灌注量" align="center" prop="PERFUSION_ACTUALVOLUME" v-if="columns[5].visible"/>
<el-table-column label="灌注压力_R" align="center" prop="PERFUSION_R" v-if="columns[6].visible"/>
<el-table-column label="灌注压力_L" align="center" prop="PERFUSION_L" v-if="columns[7].visible"/>
<el-table-column label="灌注时长" align="center" prop="PERFUSION_DURATION" v-if="columns[7].visible"/>
<el-table-column label="系统" align="center" prop="PERFUSION_SYSTEM" v-if="columns[7].visible"/>
<el-table-column label="灌注结果" align="center" prop="PERFUSION_RESULT" v-if="columns[7].visible"/>
<el-table-column label="记录时间" align="center" prop="CREATED_TIME" v-if="columns[7].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.BEGIN_DATE, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!-- <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-search"-->
<!-- @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 {
pourRecordReportList
} 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: `订单编号`, 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
}
pourRecordReportList(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,274 @@
<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="LINE_NO" v-if="columns[1].visible"/>
<el-table-column label="工位号" align="center" prop="GONGW_NO" v-if="columns[2].visible"/>
<el-table-column label="产品条码" align="center" prop="CP_NO" 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="CP_MODEL" v-if="columns[4].visible"/>
<el-table-column label="基准型号" align="center" prop="FACTORY_MODEL" v-if="columns[5].visible"/>
<el-table-column label="工作电压" align="center" prop="VOLTAGE" v-if="columns[6].visible"/>
<el-table-column label="测试通道" align="center" prop="POINT2" v-if="columns[7].visible"/>
<el-table-column label="计划测试时间" align="center" prop="TEST_TIME" v-if="columns[7].visible"/>
<el-table-column label="实际测试时间" align="center" prop="TESTED_TIME" v-if="columns[7].visible"/>
<el-table-column label="环温" align="center" prop="ETEMP" v-if="columns[7].visible"/>
<el-table-column label="开始测试时间" align="center" prop="BEGIN_DATETIME" v-if="columns[7].visible"/>
<el-table-column label="测试结果" align="center" prop="CP_RESULT" v-if="columns[7].visible"/>
<el-table-column label="测试结束时间" align="center" prop="END_DATETIME" v-if="columns[7].visible"/>
<el-table-column label="系统用户" align="center" prop="USER_NAME" v-if="columns[7].visible"/>
<el-table-column label="备注" align="center" prop="REMARK" v-if="columns[7].visible"/>
<el-table-column label="第几次测试" align="center" prop="TEST_NO" v-if="columns[7].visible"/>
<el-table-column label="温度数据" align="center" prop="TEMP_MES" v-if="columns[7].visible"/>
<el-table-column label="计划测试时间" align="center" prop="TEST_TIME" v-if="columns[7].visible"/>
<el-table-column label="功率数据" align="center" prop="POWER_MES" v-if="columns[7].visible"/>
<el-table-column label="部件测试数据" align="center" prop="PART_MES" v-if="columns[7].visible"/>
<el-table-column label="故障代码" align="center" prop="ERRORCODE_MES" v-if="columns[7].visible"/>
<el-table-column label="记录插入时间" align="center" prop="RECORD_TIME" 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-search"-->
<!-- @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 {
temperatureRecordReportList
} 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: `订单编号`, 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
}
temperatureRecordReportList(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