update - 在制品查询明细功能、导出

master
yinq 8 months ago
parent 8f4deef473
commit 18d31e3f06

@ -36,6 +36,15 @@ export function WIPInquiryReportList(query) {
}) })
} }
// 查询在制品明细报表
export function WIPInquiryDetailReportList(query) {
return request({
url: '/report/productionReport/WIPInquiryDetailReportList',
method: 'get',
params: query
})
}
// 扫描下线记录报表 // 扫描下线记录报表
export function ScanOfflineRecordReportList(query) { export function ScanOfflineRecordReportList(query) {
return request({ return request({

@ -74,6 +74,14 @@
@click="handleExport" @click="handleExport"
>导出 >导出
</el-button> </el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleDetailExport"
>明细导出
</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>
@ -87,7 +95,11 @@
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" width="430" v-if="columns[5].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_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="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" 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">--> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-button--> <!-- <el-button-->
@ -109,11 +121,43 @@
@pagination="getList" @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> </div>
</template> </template>
<script> <script>
import { import {
WIPInquiryDetailReportList,
WIPInquiryReportList WIPInquiryReportList
} from '@/api/report/reportAPI' } from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine' import { findProductLineList } from '@//api/base/productLine'
@ -136,6 +180,8 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
//
detailTotal: 0,
// //
totalSum: 0, totalSum: 0,
// //
@ -146,6 +192,10 @@ export default {
open: false, open: false,
// //
daterangeBeginTime: [], daterangeBeginTime: [],
//
reportDetailList: [],
//
queryDetailParams: {},
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -154,7 +204,7 @@ export default {
endBeginTime: null, endBeginTime: null,
productLineCode: 'CX_02', productLineCode: 'CX_02',
beginStationCode: '109', beginStationCode: '109',
endStationCode: '280', endStationCode: '270',
ORDER_CODE: null, ORDER_CODE: null,
MATERIAL_CODE: null, MATERIAL_CODE: null,
MATERIAL_NAME: null, MATERIAL_NAME: null,
@ -175,7 +225,7 @@ export default {
{ key: 5, label: `物料名称`, visible: true }, { key: 5, label: `物料名称`, visible: true },
{ 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 }
], ],
// 线 // 线
productLineList: [], productLineList: [],
@ -195,7 +245,7 @@ export default {
}).then(() => { }).then(() => {
return findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1' }) return findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1' })
}).then(response => { }).then(response => {
this.findStationList = response.data this.findStationList = response.data.filter(station => station.executionSort != null)
}) })
const nowDate = parseTime(new Date(), '{y}-{m}-{d}') const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate this.daterangeBeginTime[0] = nowDate
@ -208,7 +258,7 @@ export default {
this.loading = true this.loading = true
WIPInquiryReportList(this.queryParams).then(response => { WIPInquiryReportList(this.queryParams).then(response => {
this.reportList = response.rows this.reportList = response.rows
this.total = response.total; this.total = response.total
this.totalSum = 0 this.totalSum = 0
this.reportList.forEach(e => { this.reportList.forEach(e => {
this.totalSum += e.COMP_AMOUNT this.totalSum += e.COMP_AMOUNT
@ -248,17 +298,45 @@ export default {
}, },
/** 查看明细 */ /** 查看明细 */
handleOrderDetails(row) { // handleOrderDetails(row) {
this.$tab.openPage('生产计划', '/product/planInfo', { orderCode: row.ORDER_CODE }) // 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() { getStationList() {
this.queryParams.beginStationCode = null this.queryParams.beginStationCode = null
this.queryParams.endStationCode = 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 => { .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.download('/report/productionReport/WIPInquiryReportList/export', {
...this.queryParams ...this.queryParams
}, `在制品查询报表_${new Date().getTime()}.xlsx`) }, `在制品查询报表_${new Date().getTime()}.xlsx`)
},
/** 导出按钮操作 */
handleDetailExport() {
this.download('/report/productionReport/WIPInquiryDetailReportList/export', {
...this.queryParams
}, `在制品查询明细报表_${new Date().getTime()}.xlsx`)
} }
} }

Loading…
Cancel
Save