|
|
|
@ -74,6 +74,14 @@
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
>导出
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="warning"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleDetailExport"
|
|
|
|
|
>明细导出
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
@ -87,33 +95,69 @@
|
|
|
|
|
<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="230" v-if="columns[7].visible"/>
|
|
|
|
|
<el-table-column label="数量" align="center" prop="COMP_AMOUNT" width="120" v-if="columns[8].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-column label="在制数量" align="center" prop="COMP_AMOUNT" width="120" v-if="columns[8].visible">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" @click="openDifference(scope.row)">{{ scope.row.COMP_AMOUNT }}</el-button>
|
|
|
|
|
</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-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"
|
|
|
|
|
/>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total>0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 详情信息对话框 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
|
|
<el-table :data="reportDetailList" :row-class-name="rowDetailIndex"
|
|
|
|
|
ref="reportDetailRef"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column label="序号" align="center" prop="index">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="箱体码" align="center" prop="MATERIAL_BARCODE" width="190">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="物料编号" align="center" prop="MATERIAL_CODE" width="110">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" width="280">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="最后扫描工位" align="center" prop="STATION_NAME" width="150">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="最后扫描时间" align="center" prop="COMPLETE_DATE" width="150">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="detailTotal>0"
|
|
|
|
|
:total="detailTotal"
|
|
|
|
|
:page.sync="queryDetailParams.pageNum"
|
|
|
|
|
:limit.sync="queryDetailParams.pageSize"
|
|
|
|
|
@pagination="getDetailList"
|
|
|
|
|
/>
|
|
|
|
|
<!-- </el-form>-->
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="cancel">关 闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
WIPInquiryDetailReportList,
|
|
|
|
|
WIPInquiryReportList
|
|
|
|
|
} from '@/api/report/reportAPI'
|
|
|
|
|
import { findProductLineList } from '@//api/base/productLine'
|
|
|
|
@ -136,6 +180,8 @@ export default {
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 总条数
|
|
|
|
|
detailTotal: 0,
|
|
|
|
|
//合计数量
|
|
|
|
|
totalSum: 0,
|
|
|
|
|
// 报表表格数据
|
|
|
|
@ -146,6 +192,10 @@ export default {
|
|
|
|
|
open: false,
|
|
|
|
|
// 更新时间时间范围
|
|
|
|
|
daterangeBeginTime: [],
|
|
|
|
|
// 详情表格数据
|
|
|
|
|
reportDetailList: [],
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryDetailParams: {},
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
@ -154,7 +204,7 @@ export default {
|
|
|
|
|
endBeginTime: null,
|
|
|
|
|
productLineCode: 'CX_02',
|
|
|
|
|
beginStationCode: '109',
|
|
|
|
|
endStationCode: '280',
|
|
|
|
|
endStationCode: '270',
|
|
|
|
|
ORDER_CODE: null,
|
|
|
|
|
MATERIAL_CODE: null,
|
|
|
|
|
MATERIAL_NAME: null,
|
|
|
|
@ -175,7 +225,7 @@ export default {
|
|
|
|
|
{ key: 5, label: `物料名称`, visible: true },
|
|
|
|
|
{ key: 6, label: `产品编号`, visible: true },
|
|
|
|
|
{ key: 7, label: `产品名称`, visible: true },
|
|
|
|
|
{ key: 8, label: `数量`, visible: true }
|
|
|
|
|
{ key: 8, label: `在制数量`, visible: true }
|
|
|
|
|
],
|
|
|
|
|
// 产线选项
|
|
|
|
|
productLineList: [],
|
|
|
|
@ -193,9 +243,9 @@ export default {
|
|
|
|
|
findProductLineList({ productLineType: 1 }).then(response => {
|
|
|
|
|
this.productLineList = response.data
|
|
|
|
|
}).then(() => {
|
|
|
|
|
return findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1'})
|
|
|
|
|
return findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1' })
|
|
|
|
|
}).then(response => {
|
|
|
|
|
this.findStationList = response.data
|
|
|
|
|
this.findStationList = response.data.filter(station => station.executionSort != null)
|
|
|
|
|
})
|
|
|
|
|
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
|
|
this.daterangeBeginTime[0] = nowDate
|
|
|
|
@ -208,7 +258,7 @@ export default {
|
|
|
|
|
this.loading = true
|
|
|
|
|
WIPInquiryReportList(this.queryParams).then(response => {
|
|
|
|
|
this.reportList = response.rows
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.total = response.total
|
|
|
|
|
this.totalSum = 0
|
|
|
|
|
this.reportList.forEach(e => {
|
|
|
|
|
this.totalSum += e.COMP_AMOUNT
|
|
|
|
@ -248,17 +298,45 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 查看明细 */
|
|
|
|
|
handleOrderDetails(row) {
|
|
|
|
|
this.$tab.openPage('生产计划', '/product/planInfo', { orderCode: row.ORDER_CODE })
|
|
|
|
|
// handleOrderDetails(row) {
|
|
|
|
|
// this.$tab.openPage('生产计划', '/product/planInfo', { orderCode: row.ORDER_CODE })
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
/** 查看明细 */
|
|
|
|
|
openDifference(row) {
|
|
|
|
|
if (row.ORDER_CODE == null) {
|
|
|
|
|
this.$modal.msgError('订单号不为空!')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.queryDetailParams = { ...this.queryParams };
|
|
|
|
|
this.queryDetailParams.ORDER_CODE = row.ORDER_CODE
|
|
|
|
|
|
|
|
|
|
WIPInquiryDetailReportList(this.queryDetailParams).then(response => {
|
|
|
|
|
this.reportDetailList = response.rows
|
|
|
|
|
this.detailTotal = response.total
|
|
|
|
|
this.open = true
|
|
|
|
|
this.title = '在制品明细表'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getDetailList() {
|
|
|
|
|
WIPInquiryDetailReportList(this.queryDetailParams).then(response => {
|
|
|
|
|
this.reportDetailList = response.rows
|
|
|
|
|
this.detailTotal = response.total
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/** 数据明细序号 */
|
|
|
|
|
rowDetailIndex({ row, rowIndex }) {
|
|
|
|
|
row.index = rowIndex + 1 + (this.queryDetailParams.pageNum - 1) * this.queryDetailParams.pageSize
|
|
|
|
|
},
|
|
|
|
|
/** 获取工位方法 */
|
|
|
|
|
getStationList() {
|
|
|
|
|
this.queryParams.beginStationCode = null
|
|
|
|
|
this.queryParams.endStationCode = null
|
|
|
|
|
findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1'})
|
|
|
|
|
findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1' })
|
|
|
|
|
.then(response => {
|
|
|
|
|
this.findStationList = response.data
|
|
|
|
|
this.findStationList = response.data.filter(station => station.executionSort != null)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -274,6 +352,13 @@ export default {
|
|
|
|
|
this.download('/report/productionReport/WIPInquiryReportList/export', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `在制品查询报表_${new Date().getTime()}.xlsx`)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleDetailExport() {
|
|
|
|
|
this.download('/report/productionReport/WIPInquiryDetailReportList/export', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `在制品查询明细报表_${new Date().getTime()}.xlsx`)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|