|
|
|
@ -2,26 +2,26 @@
|
|
|
|
|
<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-select v-model="queryParams.productLineCode" placeholder="请选择产线" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in productLineList"
|
|
|
|
|
:key="item.workCenterCode"
|
|
|
|
|
:label="item.workCenterName"
|
|
|
|
|
:value="item.workCenterCode"
|
|
|
|
|
:key="item.productLineCode"
|
|
|
|
|
:label="item.productLineName"
|
|
|
|
|
:value="item.productLineCode"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品编码" prop="MATERIAL_CODE">
|
|
|
|
|
<el-form-item label="产品编号" prop="PRODUCT_CODE">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.MATERIAL_CODE"
|
|
|
|
|
placeholder="请输入产品编码"
|
|
|
|
|
v-model="queryParams.PRODUCT_CODE"
|
|
|
|
|
placeholder="请输入产品编号"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品名称" prop="MATERIAL_NAME">
|
|
|
|
|
<el-form-item label="产品名称" prop="PRODUCT_NAME">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.MATERIAL_NAME"
|
|
|
|
|
v-model="queryParams.PRODUCT_NAME"
|
|
|
|
|
placeholder="请输入产品名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@ -35,26 +35,24 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工位">
|
|
|
|
|
<el-select v-model="queryParams.stationCode" placeholder="请选择工位">
|
|
|
|
|
<el-form-item label="(工位)区间">
|
|
|
|
|
<el-select v-model="queryParams.beginStationCode" placeholder="请选择起始工位" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in findStationList"
|
|
|
|
|
:key="item.productLineCode"
|
|
|
|
|
:key="item.executionSort"
|
|
|
|
|
:label="item.productLineName"
|
|
|
|
|
:value="item.productLineCode"
|
|
|
|
|
:value="item.executionSort"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<span style="margin: 5px;">-</span>
|
|
|
|
|
<el-select v-model="queryParams.endStationCode" placeholder="请选择结束工位" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in findStationList"
|
|
|
|
|
:key="item.executionSort"
|
|
|
|
|
:label="item.productLineName"
|
|
|
|
|
:value="item.executionSort"
|
|
|
|
|
></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>
|
|
|
|
@ -63,7 +61,11 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<!-- <el-col :span="1.5">-->
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="info"
|
|
|
|
|
>合计数量:{{ totalSum }}
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="warning"-->
|
|
|
|
|
<!-- plain-->
|
|
|
|
@ -72,24 +74,20 @@
|
|
|
|
|
<!-- @click="handleExport"-->
|
|
|
|
|
<!-- >导出-->
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
</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" prop="PRODUCT_LINE_NAME" width="80" v-if="columns[1].visible"/>
|
|
|
|
|
<el-table-column label="订单编号" align="center" prop="ORDER_CODE" width="100" v-if="columns[3].visible"/>
|
|
|
|
|
<el-table-column label="物料编号" align="center" prop="MATERIAL_CODE" width="130" v-if="columns[4].visible"/>
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" width="430" v-if="columns[5].visible"/>
|
|
|
|
|
<el-table-column label="产品编号" align="center" prop="PRODUCT_CODE" width="130" v-if="columns[6].visible"/>
|
|
|
|
|
<el-table-column label="产品名称" align="center" prop="PRODUCT_NAME" width="200" v-if="columns[7].visible"/>
|
|
|
|
|
<el-table-column label="数量" align="center" prop="COMP_AMOUNT" width="80" v-if="columns[8].visible"/>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
@ -115,7 +113,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
productionExecutionReportList
|
|
|
|
|
WIPInquiryReportList
|
|
|
|
|
} from '@/api/report/reportAPI'
|
|
|
|
|
import { findProductLineList } from '@//api/base/productLine'
|
|
|
|
|
import { parseTime } from '@//utils/ruoyi'
|
|
|
|
@ -138,6 +136,8 @@ export default {
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
//合计数量
|
|
|
|
|
totalSum: 0,
|
|
|
|
|
// 报表表格数据
|
|
|
|
|
reportList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
@ -152,11 +152,14 @@ export default {
|
|
|
|
|
// pageSize: 10,
|
|
|
|
|
beginBeginTime: null,
|
|
|
|
|
endBeginTime: null,
|
|
|
|
|
WORK_CENTER_CODE: null,
|
|
|
|
|
PRODUCT_LINE_NAME: null,
|
|
|
|
|
productLineCode: 'CX_02',
|
|
|
|
|
beginStationCode: null,
|
|
|
|
|
endStationCode: null,
|
|
|
|
|
ORDER_CODE: null,
|
|
|
|
|
MATERIAL_CODE: null,
|
|
|
|
|
MATERIAL_NAME: null,
|
|
|
|
|
PRODUCT_CODE: null,
|
|
|
|
|
PRODUCT_NAME: null,
|
|
|
|
|
BEGIN_DATE: null
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
|
|
|
@ -165,13 +168,14 @@ export default {
|
|
|
|
|
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 },
|
|
|
|
|
{ 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 },
|
|
|
|
|
{ key: 8, label: `数量`, visible: true },
|
|
|
|
|
],
|
|
|
|
|
// 产线选项
|
|
|
|
|
productLineList: [],
|
|
|
|
@ -179,13 +183,20 @@ export default {
|
|
|
|
|
findStationList: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
'queryParams.productLineCode': function(newVal, oldVal) {
|
|
|
|
|
// 执行方法,可以在这里调用你的方法
|
|
|
|
|
this.getStationList()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
findProductLineList({ productLineType: 1 }).then(response => {
|
|
|
|
|
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}')
|
|
|
|
|
this.daterangeBeginTime[0] = nowDate
|
|
|
|
|
this.daterangeBeginTime[1] = nowDate
|
|
|
|
@ -195,15 +206,12 @@ export default {
|
|
|
|
|
/** 查询工单信息列表 */
|
|
|
|
|
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 => {
|
|
|
|
|
WIPInquiryReportList(this.queryParams).then(response => {
|
|
|
|
|
this.reportList = response.data
|
|
|
|
|
this.totalSum = 0;
|
|
|
|
|
this.reportList.forEach(e => {
|
|
|
|
|
this.totalSum += e.COMP_AMOUNT
|
|
|
|
|
})
|
|
|
|
|
// this.total = response.total;
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
@ -217,11 +225,13 @@ export default {
|
|
|
|
|
reset() {
|
|
|
|
|
this.daterangeBeginTime = []
|
|
|
|
|
this.form = {
|
|
|
|
|
WORK_CENTER_CODE: null,
|
|
|
|
|
PRODUCT_LINE_NAME: null,
|
|
|
|
|
beginStationCode: null,
|
|
|
|
|
endStationCode: null,
|
|
|
|
|
ORDER_CODE: null,
|
|
|
|
|
MATERIAL_CODE: null,
|
|
|
|
|
MATERIAL_NAME: null,
|
|
|
|
|
PRODUCT_CODE: null,
|
|
|
|
|
PRODUCT_NAME: null,
|
|
|
|
|
BEGIN_DATE: null
|
|
|
|
|
}
|
|
|
|
|
this.resetForm('form')
|
|
|
|
@ -236,9 +246,20 @@ export default {
|
|
|
|
|
this.resetForm('queryForm')
|
|
|
|
|
this.handleQuery()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 查看明细 */
|
|
|
|
|
handleOrderDetails(row) {
|
|
|
|
|
this.$tab.openPage("SAP订单信息","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE});
|
|
|
|
|
this.$tab.openPage('生产计划', '/product/planInfo', { orderCode: row.ORDER_CODE })
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 获取工位方法 */
|
|
|
|
|
getStationList() {
|
|
|
|
|
this.queryParams.beginStationCode = null;
|
|
|
|
|
this.queryParams.endStationCode = null;
|
|
|
|
|
findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode })
|
|
|
|
|
.then(response => {
|
|
|
|
|
this.findStationList = response.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|