Merge branch 'refs/heads/test'
# Conflicts: # nladmin-system/wms-server/src/main/java/org/nl/wms/pm_manage/demand/service/dao/mapper/xml/PmDemandMapper.xml
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 }
|
||||
85
nladmin-ui/src/views/wms/pm_manage/feedingRecord/index.vue
Normal file
85
nladmin-ui/src/views/wms/pm_manage/feedingRecord/index.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<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="trackNo" label="跟踪号" width="150" />
|
||||
<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="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="modifiedOn" label="更新时间" min-width="145" />
|
||||
<el-table-column prop="createdOn" 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,47 @@
|
||||
<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-form-item label="状态">
|
||||
<el-select v-model="monthlySummaryQuery.status" clearable placeholder="全部" @change="queryMonthlySummary">
|
||||
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</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>
|
||||
<el-pagination
|
||||
style="margin-top: 8px; text-align: right;"
|
||||
:current-page.sync="monthlySummaryPage.page"
|
||||
:page-size.sync="monthlySummaryPage.size"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:total="monthlySummaryPage.total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleMonthlySummarySizeChange"
|
||||
@current-change="queryMonthlySummary"
|
||||
/>
|
||||
<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 +260,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 +288,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 +311,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
monthlySummaryVisible: false,
|
||||
monthlySummaryLoading: false,
|
||||
monthlySummaryData: [],
|
||||
monthlySummaryQuery: { month: currentMonth(), materialno: '', status: '' },
|
||||
monthlySummaryPage: { page: 1, size: 20, total: 0 },
|
||||
uploadFlag: true,
|
||||
currentRow: {},
|
||||
detailPage: { page: 1, size: 10 },
|
||||
@@ -396,6 +457,34 @@ export default {
|
||||
this.detailSelections = []
|
||||
})
|
||||
},
|
||||
openMonthlySummary() {
|
||||
this.monthlySummaryVisible = true
|
||||
this.monthlySummaryPage.page = 1
|
||||
this.queryMonthlySummary()
|
||||
},
|
||||
queryMonthlySummary() {
|
||||
if (!this.monthlySummaryQuery.month) {
|
||||
this.$message.warning('请选择月份')
|
||||
return
|
||||
}
|
||||
this.monthlySummaryLoading = true
|
||||
monthlySummary({
|
||||
...this.monthlySummaryQuery,
|
||||
page: this.monthlySummaryPage.page - 1,
|
||||
size: this.monthlySummaryPage.size
|
||||
}).then(res => {
|
||||
// const page = res.data || {}
|
||||
this.monthlySummaryData = res.data || []
|
||||
this.monthlySummaryPage.total = res.totalElements || 0
|
||||
}).finally(() => {
|
||||
this.monthlySummaryLoading = false
|
||||
})
|
||||
},
|
||||
handleMonthlySummarySizeChange(size) {
|
||||
this.monthlySummaryPage.size = size
|
||||
this.monthlySummaryPage.page = 1
|
||||
this.queryMonthlySummary()
|
||||
},
|
||||
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 }
|
||||
|
||||
@@ -290,7 +290,7 @@ export default {
|
||||
crudWorkOrder.getItem(order).then(result => {
|
||||
this.bomList = result.data || []
|
||||
this.detailVisible = true
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.bomList = []
|
||||
}).finally(() => {
|
||||
this.detailLoading = false
|
||||
|
||||
@@ -110,7 +110,6 @@ import curdStructIvtFlow from './curdStructIvtFlow'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -132,7 +131,7 @@ const defaultForm = {
|
||||
export default {
|
||||
dicts: [],
|
||||
name: 'StructIvtFlow',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
statusEnums: ['TASK_TYPE'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -333,20 +333,16 @@ export default {
|
||||
return
|
||||
}
|
||||
const materialCode = this.printRow.material_code || ''
|
||||
const materialName = this.printRow.material_name || ''
|
||||
const warehouseCode = this.printRow.stor_code || ''
|
||||
const date = this.formatPrintDate(new Date())
|
||||
let html = '<!DOCTYPE html><html><head><meta charset="utf-8"><style>'
|
||||
html += '*{margin:0;padding:0;box-sizing:border-box}'
|
||||
html += 'body{font-family:"Microsoft YaHei",Arial,sans-serif;padding:10px}'
|
||||
html += '.label{page-break-after:always;padding:10px;text-align:center}'
|
||||
html += '.label{position:relative;width:280px;min-height:300px;page-break-after:always;padding:18px 12px 24px;text-align:center;margin:0 auto}'
|
||||
html += '.label:last-child{page-break-after:auto}'
|
||||
html += 'h3{text-align:center;font-size:14px;margin-bottom:6px}'
|
||||
html += 'table{width:463px;border-collapse:collapse;margin:0 auto;min-height:224px}'
|
||||
html += 'td{padding:5px;border:2px solid #333;font-size:16px;line-height:1.3}'
|
||||
html += '.lbl{width:25%;text-align:right;background:#f9f9f9}'
|
||||
html += '.val{width:45%;text-align:left;word-break:break-all}'
|
||||
html += '.qr{width:30%;text-align:center;vertical-align:middle}'
|
||||
html += '.qr{display:block;width:220px;height:220px;margin:0 auto 12px}'
|
||||
html += '.material-code{font-size:20px;font-weight:600;line-height:1.3;word-break:break-all}'
|
||||
html += '.date{position:absolute;right:8px;bottom:6px;color:#b8b8b8;font-size:10px}'
|
||||
html += '@media print{@page{size:auto;margin:5mm}}'
|
||||
html += '</style></head><body>'
|
||||
for (const label of labels) {
|
||||
@@ -354,14 +350,9 @@ export default {
|
||||
const qrText = materialCode + ':' + label.quantity + ':' + serial + ':' + warehouseCode
|
||||
const imgSrc = await QRCode.toDataURL(qrText, { width: 300 })
|
||||
html += '<div class="label">'
|
||||
html += '<h3>库存标签</h3><table>'
|
||||
html += '<tr><td class="lbl">物料编码</td><td class="val">' + this.escapePrintValue(materialCode) + '</td><td class="qr" rowspan="6"><img src="' + imgSrc + '" width="150" height="150"></td></tr>'
|
||||
html += '<tr><td class="lbl">物料名称</td><td class="val">' + this.escapePrintValue(materialName) + '</td></tr>'
|
||||
html += '<tr><td class="lbl">数量</td><td class="val">' + this.escapePrintValue(label.quantity) + '</td></tr>'
|
||||
html += '<tr><td class="lbl">序号</td><td class="val">' + this.escapePrintValue(serial) + '</td></tr>'
|
||||
html += '<tr><td class="lbl">日期</td><td class="val">' + date + '</td></tr>'
|
||||
html += '<tr><td class="lbl">仓库编码</td><td class="val">' + this.escapePrintValue(warehouseCode) + '</td></tr>'
|
||||
html += '</table></div>'
|
||||
html += '<img class="qr" src="' + imgSrc + '" width="220" height="220">'
|
||||
html += '<div class="material-code">' + this.escapePrintValue(materialCode) + '</div>'
|
||||
html += '<span class="date">' + date + '</span></div>'
|
||||
}
|
||||
html += '</body></html>'
|
||||
doc.open()
|
||||
@@ -369,9 +360,7 @@ export default {
|
||||
doc.close()
|
||||
},
|
||||
formatPrintDate(date) {
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return date.getFullYear() + '-' + month + '-' + day
|
||||
return (date.getMonth() + 1) + '/' + date.getDate()
|
||||
},
|
||||
doPrint() {
|
||||
const iframe = this.$refs.printIframe
|
||||
|
||||
Reference in New Issue
Block a user