Merge branch 'feature/receiveOutReturnSummary_0824' into test
# Conflicts: # nladmin-system/wms-server/src/main/java/org/nl/wms/pm_manage/demand/service/impl/PmDemandServiceImpl.java
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function get(id) {
|
||||
return request({ url: 'api/feedingRecord/' + id, method: 'get' })
|
||||
}
|
||||
|
||||
export default { get }
|
||||
86
nladmin-ui/src/views/wms/pm_manage/feedingRecord/index.vue
Normal file
86
nladmin-ui/src/views/wms/pm_manage/feedingRecord/index.vue
Normal file
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-form v-if="crud.props.searchToggle" :inline="true" size="mini" label-width="80px" label-suffix=":">
|
||||
<el-form-item label="工单号"><el-input v-model="query.orderCode" clearable placeholder="请输入工单号" @keyup.enter.native="crud.toQuery" /></el-form-item>
|
||||
<el-form-item label="产品编码"><el-input v-model="query.productCode" clearable placeholder="请输入产品编码" @keyup.enter.native="crud.toQuery" /></el-form-item>
|
||||
<el-form-item label="产品名称"><el-input v-model="query.productName" clearable placeholder="请输入产品名称" @keyup.enter.native="crud.toQuery" /></el-form-item>
|
||||
<el-form-item label="工作区域"><el-input v-model="query.workArea" clearable placeholder="请输入工作区域" @keyup.enter.native="crud.toQuery" /></el-form-item>
|
||||
<el-form-item label="生产状态"><el-input v-model="query.productionStatus" clearable placeholder="请输入生产状态" @keyup.enter.native="crud.toQuery" /></el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
<crudOperation :permission="permission" />
|
||||
<el-table v-loading="crud.loading" :data="crud.data" size="mini" border row-key="id">
|
||||
<el-table-column prop="orderCode" label="工单号" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="productCode" label="产品编码" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="productName" label="产品名称" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="productSpec" label="产品规格" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="orderQty" label="计划数量" width="95" align="right" />
|
||||
<el-table-column prop="finishedQty" label="完成数量" width="95" align="right" />
|
||||
<el-table-column prop="finishedRate" label="完成率" width="90" />
|
||||
<el-table-column prop="unit" label="单位" width="65" />
|
||||
<el-table-column prop="bomCode" label="BOM编码" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="workArea" label="工作区域" min-width="110" />
|
||||
<el-table-column prop="productionStatus" label="生产状态" min-width="100" />
|
||||
<el-table-column prop="planStartedOn" label="计划开始" min-width="145" />
|
||||
<el-table-column prop="planFinishedOn" label="计划完成" min-width="145" />
|
||||
<el-table-column prop="createTime" label="创建时间" min-width="145" />
|
||||
<el-table-column label="操作" width="75" fixed="right">
|
||||
<template slot-scope="scope"><el-button type="text" size="mini" @click="openDetail(scope.row)">明细</el-button></template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination />
|
||||
</div>
|
||||
<el-dialog :visible.sync="detailVisible" title="投料记录明细" width="1250px" :close-on-click-modal="false">
|
||||
<el-descriptions :column="3" border size="mini">
|
||||
<el-descriptions-item label="工单号">{{ currentRow.orderCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品">{{ currentRow.productCode }} {{ currentRow.productName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="批次号">{{ currentRow.lotNumber }}</el-descriptions-item>
|
||||
<el-descriptions-item label="默认仓库">{{ currentRow.defaultWarehouseName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产线">{{ currentRow.workArea }}</el-descriptions-item>
|
||||
<el-descriptions-item label="班组">{{ currentRow.teamName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" :span="3">{{ currentRow.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table v-loading="detailLoading" :data="bomList" size="mini" border style="margin-top: 12px;" max-height="480">
|
||||
<el-table-column type="index" label="序号" width="55" />
|
||||
<el-table-column prop="itemNo" label="行号" width="65" />
|
||||
<el-table-column prop="materialCode" label="物料编码" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="materialName" label="物料名称" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="spec" label="规格" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="bomQty" label="BOM用量" width="95" align="right" />
|
||||
<el-table-column prop="wmsQty" label="WMS数量" width="95" align="right" />
|
||||
<el-table-column prop="warehouseName" label="仓库" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="loadPort" label="上料口" width="90" />
|
||||
<el-table-column prop="workCenter" label="工作中心" min-width="110" />
|
||||
<el-table-column prop="trackNo" label="跟踪号" min-width="120" />
|
||||
</el-table>
|
||||
<div slot="footer"><el-button type="primary" size="mini" @click="detailVisible = false">关闭</el-button></div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudFeedingRecord, { get } from './feedingRecord'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
|
||||
export default {
|
||||
name: 'FeedingRecord',
|
||||
components: { crudOperation, rrOperation, pagination },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() { return CRUD({ title: '投料记录', url: 'api/feedingRecord', idField: 'id', sort: 'createTime,desc', crudMethod: { ...crudFeedingRecord }, optShow: { add: false, edit: false, del: false, reset: true }}) },
|
||||
data() { return { permission: {}, detailVisible: false, detailLoading: false, currentRow: {}, bomList: [] } },
|
||||
methods: {
|
||||
openDetail(row) {
|
||||
this.detailVisible = true
|
||||
this.detailLoading = true
|
||||
get(row.id).then(res => {
|
||||
this.currentRow = res.data || {}
|
||||
this.bomList = this.currentRow.bom || []
|
||||
}).finally(() => { this.detailLoading = false })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -50,6 +50,16 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-data-analysis"
|
||||
size="mini"
|
||||
@click="openMonthlySummary"
|
||||
>
|
||||
月度汇总
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -100,6 +110,32 @@
|
||||
<pagination />
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="monthlySummaryVisible" title="倒扣回传月度汇总" width="1100px" :close-on-click-modal="false">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item label="月份">
|
||||
<el-date-picker v-model="monthlySummaryQuery.month" type="month" value-format="yyyy-MM" placeholder="选择月份" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编号">
|
||||
<el-input v-model.trim="monthlySummaryQuery.materialno" clearable placeholder="输入物料编号" @keyup.enter.native="queryMonthlySummary" />
|
||||
</el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="queryMonthlySummary">查询</el-button>
|
||||
</el-form>
|
||||
<el-table v-loading="monthlySummaryLoading" :data="monthlySummaryData" size="mini" style="width: 100%">
|
||||
<el-table-column prop="materialno" label="物料编号" min-width="150" />
|
||||
<el-table-column prop="materialname" label="物料名称" min-width="180" />
|
||||
<el-table-column prop="billno" label="工单号" min-width="160" />
|
||||
<el-table-column prop="trackNo" label="跟踪号" min-width="140" />
|
||||
<el-table-column prop="baseqty" label="BOM数量" min-width="100" />
|
||||
<el-table-column label="状态" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ statusLabel(scope.row.status) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" min-width="220" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer"><el-button type="primary" @click="monthlySummaryVisible = false">关闭</el-button></div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="1000px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" label-suffix=":" style="border: 1px solid #cfe0df;margin-top: 10px;padding: 10px;">
|
||||
<el-row>
|
||||
@@ -209,7 +245,7 @@ import rrOperation from '@crud/RR.operation.vue'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
import udOperation from '@crud/UD.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
import { get, uploadReceiveOut, ignoreDetails, restoreDetails } from './receiveOutReturn'
|
||||
import { get, monthlySummary, uploadReceiveOut, ignoreDetails, restoreDetails } from './receiveOutReturn'
|
||||
|
||||
const createDefaultForm = () => ({
|
||||
id: null,
|
||||
@@ -237,6 +273,11 @@ const createDefaultForm = () => ({
|
||||
details: []
|
||||
})
|
||||
|
||||
const currentMonth = () => {
|
||||
const date = new Date()
|
||||
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'ReceiveOutReturn',
|
||||
dicts: ['work_code'],
|
||||
@@ -255,6 +296,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
monthlySummaryVisible: false,
|
||||
monthlySummaryLoading: false,
|
||||
monthlySummaryData: [],
|
||||
monthlySummaryQuery: { month: currentMonth(), materialno: '' },
|
||||
uploadFlag: true,
|
||||
currentRow: {},
|
||||
detailPage: { page: 1, size: 10 },
|
||||
@@ -395,6 +440,22 @@ export default {
|
||||
this.detailSelections = []
|
||||
})
|
||||
},
|
||||
openMonthlySummary() {
|
||||
this.monthlySummaryVisible = true
|
||||
this.queryMonthlySummary()
|
||||
},
|
||||
queryMonthlySummary() {
|
||||
if (!this.monthlySummaryQuery.month) {
|
||||
this.$message.warning('请选择月份')
|
||||
return
|
||||
}
|
||||
this.monthlySummaryLoading = true
|
||||
monthlySummary(this.monthlySummaryQuery).then(res => {
|
||||
this.monthlySummaryData = res.data || []
|
||||
}).finally(() => {
|
||||
this.monthlySummaryLoading = false
|
||||
})
|
||||
},
|
||||
upload() {
|
||||
const rows = this.crud.selections || []
|
||||
if (rows.length < 1) {
|
||||
|
||||
@@ -30,6 +30,13 @@ export function get(id) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function monthlySummary(params) {
|
||||
return request({
|
||||
url: 'api/receiveOutReturn/monthlySummary',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function easStock(param) {
|
||||
return request({
|
||||
url: '/api/receiveOutReturn/easStock',
|
||||
@@ -92,4 +99,4 @@ export function restoreDetail(detailId) {
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, get, easStock, uploadReceiveOut, allStock, deductionOrderSync, reSubmit, ignoreDetail, restoreDetail, ignoreDetails, restoreDetails }
|
||||
export default { add, edit, del, get, monthlySummary, easStock, uploadReceiveOut, allStock, deductionOrderSync, reSubmit, ignoreDetail, restoreDetail, ignoreDetails, restoreDetails }
|
||||
|
||||
Reference in New Issue
Block a user