更新采购订单查询、入库记录,新增维修记录页面

This commit is contained in:
Developer
2026-06-10 07:54:03 +08:00
parent 7b969f0eb6
commit 74c06cb592
3 changed files with 176 additions and 32 deletions

View File

@@ -0,0 +1,99 @@
<template>
<div class="app-container">
<el-card style="height: 850px">
<div style="margin-top: 7px; margin-bottom: 7px">
<el-input v-model="equipmentNo" placeholder="设备号" size="small" clearable style="width:160px" />
<el-input v-model="equipmentName" placeholder="设备名" size="small" clearable style="width:160px;margin-left: 10px" />
<span style="font-size: 13px;color: black;margin-left: 10px">整修时间</span>
<el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
start-placeholder="开始时间"
end-placeholder="结束时间"
style="width:240px" />
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 15px" plain @click="pageSize = 20;pageCurrent = 1;searchTable()">查询</el-button>
<el-button type="success" icon="el-icon-download" size="small" style="margin-left: 10px" @click="exportExcel()">导出</el-button>
</div>
<el-table :data="tableData" border size="mini" stripe highlight-current-row height="750px" style="width: 100%">
<el-table-column label="项次" align="center" type="index" width="50px" />
<el-table-column label="设备号" prop="设备号" align="center" show-overflow-tooltip />
<el-table-column label="设备名" prop="设备名" align="center" show-overflow-tooltip />
<el-table-column label="开始时间" prop="整修开始时间" align="center" show-overflow-tooltip />
<el-table-column label="结束时间" prop="整修结束时间" align="center" show-overflow-tooltip />
<el-table-column label="工时" prop="工时" align="center" show-overflow-tooltip />
<el-table-column label="报备人" prop="操作者" align="center" show-overflow-tooltip />
<el-table-column label="整修状态" prop="整修状态" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.整修状态 === 0 || scope.row.整修状态 === '0'">整修中</span>
<span v-else-if="scope.row.整修状态 === 1 || scope.row.整修状态 === '1'">整修结束</span>
</template>
</el-table-column>
<el-table-column label="原因" prop="整修原因" align="center" show-overflow-tooltip />
</el-table>
<div class="block" style="margin-top: 10px">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
equipmentNo: '',
equipmentName: '',
dateRange: '',
tableData: [],
total: 0,
pageCurrent: 1,
pageSize: 20
}
},
created() {
this.searchTable()
},
methods: {
searchTable() {
var param = []
param[0] = ['设备号', this.equipmentNo]
param[1] = ['设备名', this.equipmentName]
param[2] = ['开始时间', this.dateRange ? this.dateRange[0] : '']
param[3] = ['结束时间', this.dateRange ? this.dateRange[1] : '']
var Data = this.CreateData('11', '设备管理_整修记录_查询', param, this.pageSize, this.pageCurrent)
this.ExecDatabase(Data).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
})
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
},
exportExcel() {
var param = []
param[0] = ['设备号', this.equipmentNo]
param[1] = ['设备名', this.equipmentName]
param[2] = ['开始时间', this.dateRange ? this.dateRange[0] : '']
param[3] = ['结束时间', this.dateRange ? this.dateRange[1] : '']
var Data = this.CreateData('2001', '设备管理_整修记录_查询', param)
this.exportExcel_NPOI(Data)
}
}
}
</script>

View File

@@ -562,7 +562,7 @@
<el-table-column label="最近一次采购单价" align="center" prop="最近单价"/> <el-table-column label="最近一次采购单价" align="center" prop="最近单价"/>
</el-table> </el-table>
</el-dialog> </el-dialog>
<el-dialog v-el-drag-dialog title="到货通知" :visible.sync="dialogFormVisible4" center width="1000px"> <el-dialog v-el-drag-dialog title="生成入库单" :visible.sync="dialogFormVisible4" center width="1000px">
<el-form label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto"> <el-form label-position="left" label-width="100px" class="demo-ruleForm" style="margin: auto">
<el-row style="display: flex; align-items: center;"> <el-row style="display: flex; align-items: center;">
<el-col> <el-col>
@@ -578,6 +578,10 @@
<el-col> <el-col>
<el-button icon="el-icon-search" type="primary" plain size="small" @click="searchArrivalDetail()">查询</el-button> <el-button icon="el-icon-search" type="primary" plain size="small" @click="searchArrivalDetail()">查询</el-button>
</el-col> </el-col>
<el-col v-if="入库单号" style="margin-left: 20px;">
<span style="font-size: 14px; color: #606266;">入库单号</span>
<span style="font-size: 14px; color: #409EFF; font-weight: bold;">{{ 入库单号 }}</span>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@@ -737,7 +741,8 @@ export default {
arrivalContract: [], arrivalContract: [],
arrivalContractLabel: '', arrivalContractLabel: '',
arrivalNoticeLabel: '', arrivalNoticeLabel: '',
arrivalTableData: [] arrivalTableData: [],
入库单号: ''
} }
}, },
computed: { computed: {
@@ -1413,6 +1418,7 @@ export default {
this.arrivalNoticeLabel = '' this.arrivalNoticeLabel = ''
this.arrivalContract = [] this.arrivalContract = []
this.arrivalTableData = [] this.arrivalTableData = []
this.入库单号 = ''
this.dialogFormVisible4 = true this.dialogFormVisible4 = true
}, },
getArrivalContract() { getArrivalContract() {
@@ -1463,8 +1469,31 @@ export default {
if (this.arrivalTableData.length === 0) { if (this.arrivalTableData.length === 0) {
this.$message.info('该合同下没有物料明细') this.$message.info('该合同下没有物料明细')
} }
// 生成入库单号RK + 年月日 + 采购合同流水号 + 当天自增序号
this.generate入库单号()
}) })
}, },
generate入库单号() {
var now = new Date()
var year = now.getFullYear()
var month = (now.getMonth() + 1).toString().padStart(2, '0')
var day = now.getDate().toString().padStart(2, '0')
var dateStr = '' + year + month + day
var storageKey = 'RK_SEQ_' + dateStr
var currentSeq = parseInt(localStorage.getItem(storageKey) || '0') + 1
var seqStr = currentSeq.toString().padStart(1, '0')
this.入库单号 = 'RK' + dateStr + this.arrivalContractNo + seqStr
},
increment入库单号Seq() {
var now = new Date()
var year = now.getFullYear()
var month = (now.getMonth() + 1).toString().padStart(2, '0')
var day = now.getDate().toString().padStart(2, '0')
var dateStr = '' + year + month + day
var storageKey = 'RK_SEQ_' + dateStr
var currentSeq = parseInt(localStorage.getItem(storageKey) || '0') + 1
localStorage.setItem(storageKey, currentSeq.toString())
},
submitArrivalNotice() { submitArrivalNotice() {
const arrivalData = this.arrivalTableData.filter(item => item.到货数量 > 0) const arrivalData = this.arrivalTableData.filter(item => item.到货数量 > 0)
if (arrivalData.length === 0) { if (arrivalData.length === 0) {
@@ -1482,6 +1511,7 @@ export default {
param[5] = ['质检标志组', arrivalData.map(item => item.需要质检 ? 1 : 0).join(',')] param[5] = ['质检标志组', arrivalData.map(item => item.需要质检 ? 1 : 0).join(',')]
param[6] = ['采购合同', this.arrivalContractLabel] param[6] = ['采购合同', this.arrivalContractLabel]
param[7] = ['供应商流水号', this.arrivalSupplierName] param[7] = ['供应商流水号', this.arrivalSupplierName]
param[8] = ['入库单号', this.入库单号]
var Data = this.CreateData('12', '采购管理_到货内容_新增', param) var Data = this.CreateData('12', '采购管理_到货内容_新增', param)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
@@ -1498,6 +1528,7 @@ export default {
duration: 3000 duration: 3000
}) })
this.searchLeftTable() this.searchLeftTable()
this.increment入库单号Seq()
this.dialogFormVisible4 = false this.dialogFormVisible4 = false
} else { } else {
this.$message.error('通知失败') this.$message.error('通知失败')

View File

@@ -2,6 +2,13 @@
<div class="app-container"> <div class="app-container">
<el-card style="height: 850px"> <el-card style="height: 850px">
<div style="margin-top: 7px; margin-bottom: 7px"> <div style="margin-top: 7px; margin-bottom: 7px">
<el-input
v-model="入库单号Value"
clearable
placeholder="入库单号"
size="small"
style="width:200px"
@keyup.enter.native="searchTable()"/>
<el-input <el-input
v-model="materialNameTypeValue" v-model="materialNameTypeValue"
clearable clearable
@@ -508,6 +515,7 @@ export default {
supplierSelectionName: '', // 选择供应商名称 supplierSelectionName: '', // 选择供应商名称
materialNameTypeValue: '', // 物料名称规格型号 materialNameTypeValue: '', // 物料名称规格型号
materialNameType: [], // 物料名称规格型号数组 materialNameType: [], // 物料名称规格型号数组
入库单号Value: '', // 入库单号
orderNumberTypeValue: '', // 订单号 orderNumberTypeValue: '', // 订单号
orderNumberType: [], // 订单号数组 orderNumberType: [], // 订单号数组
purchaseOrder: [], purchaseOrder: [],
@@ -662,27 +670,30 @@ export default {
exportExcel() { exportExcel() {
if (this.tableData.length !== 0) { if (this.tableData.length !== 0) {
let dateRange_check, materialNameTypeValue_check, orderNumberTypeValue_check, typeValue_check, let dateRange_check, materialNameTypeValue_check, orderNumberTypeValue_check, typeValue_check,
purchaseOrderValue_check, supplierSelection_check purchaseOrderValue_check, supplierSelection_check, 入库单号_check
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '') this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
this.materialNameTypeValue ? materialNameTypeValue_check = 1 : materialNameTypeValue_check = 0 this.materialNameTypeValue ? materialNameTypeValue_check = 1 : materialNameTypeValue_check = 0
this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0 this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0
this.typeValue ? typeValue_check = 1 : typeValue_check = 0 this.typeValue ? typeValue_check = 1 : typeValue_check = 0
this.purchaseOrderValue ? purchaseOrderValue_check = 1 : purchaseOrderValue_check = 0 this.purchaseOrderValue ? purchaseOrderValue_check = 1 : purchaseOrderValue_check = 0
this.supplierSelectionValue ? supplierSelection_check = 1 : supplierSelection_check = 0 this.supplierSelectionValue ? supplierSelection_check = 1 : supplierSelection_check = 0
this.入库单号Value ? 入库单号_check = 1 : 入库单号_check = 0
var param = [] var param = []
param[0] = ['物料名称_check', materialNameTypeValue_check] param[0] = ['入库单号_check', 入库单号_check]
param[1] = ['物料名称', this.materialNameTypeValue] param[1] = ['入库单号', this.入库单号Value]
param[2] = ['订单号_check', orderNumberTypeValue_check] param[2] = ['物料名称_check', materialNameTypeValue_check]
param[3] = ['订单号', this.orderNumberTypeValue] param[3] = ['物料名称', this.materialNameTypeValue]
param[4] = ['类型_check', typeValue_check] param[4] = ['订单号_check', orderNumberTypeValue_check]
param[5] = ['类型', this.typeValue] param[5] = ['订单号', this.orderNumberTypeValue]
param[6] = ['开始时间', this.dateRange[0]] param[6] = ['类型_check', typeValue_check]
param[7] = ['结束时间', this.dateRange[1]] param[7] = ['类型', this.typeValue]
param[8] = ['入库时间_check', dateRange_check] param[8] = ['开始时间', this.dateRange[0]]
param[9] = ['采购合同_check', purchaseOrderValue_check] param[9] = ['结束时间', this.dateRange[1]]
param[10] = ['采购合同流水号', this.purchaseOrderValue] param[10] = ['入库时间_check', dateRange_check]
param[11] = ['供应商_check', supplierSelection_check] param[11] = ['采购合同_check', purchaseOrderValue_check]
param[12] = ['供应商名称', this.supplierSelectionValue] param[12] = ['采购合同流水号', this.purchaseOrderValue]
param[13] = ['供应商_check', supplierSelection_check]
param[14] = ['供应商名称', this.supplierSelectionValue]
var Data = this.CreateData('2001', '仓储管理_入库记录_导出表格_查询', param) var Data = this.CreateData('2001', '仓储管理_入库记录_导出表格_查询', param)
this.exportExcel_NPOI(Data) this.exportExcel_NPOI(Data)
} else { } else {
@@ -904,29 +915,32 @@ export default {
searchTable() { searchTable() {
this.loading = true this.loading = true
let dateRange_check, materialNameTypeValue_check, orderNumberTypeValue_check, typeValue_check, let dateRange_check, materialNameTypeValue_check, orderNumberTypeValue_check, typeValue_check,
purchaseOrderValue_check, supplierSelection_check purchaseOrderValue_check, supplierSelection_check, 入库单号_check
this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '') this.dateRange ? dateRange_check = 1 : (dateRange_check = 0, this.dateRange = '')
this.materialNameTypeValue ? materialNameTypeValue_check = 1 : materialNameTypeValue_check = 0 this.materialNameTypeValue ? materialNameTypeValue_check = 1 : materialNameTypeValue_check = 0
this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0 this.orderNumberTypeValue ? orderNumberTypeValue_check = 1 : orderNumberTypeValue_check = 0
this.typeValue ? typeValue_check = 1 : typeValue_check = 0 this.typeValue ? typeValue_check = 1 : typeValue_check = 0
this.purchaseOrderValue ? purchaseOrderValue_check = 1 : purchaseOrderValue_check = 0 this.purchaseOrderValue ? purchaseOrderValue_check = 1 : purchaseOrderValue_check = 0
this.supplierSelectionValue ? supplierSelection_check = 1 : supplierSelection_check = 0 this.supplierSelectionValue ? supplierSelection_check = 1 : supplierSelection_check = 0
this.入库单号Value ? 入库单号_check = 1 : 入库单号_check = 0
var param = [] var param = []
param[0] = ['物料名称_check', materialNameTypeValue_check] param[0] = ['入库单号_check', 入库单号_check]
param[1] = ['物料名称', this.materialNameTypeValue] param[1] = ['入库单号', this.入库单号Value]
param[2] = ['订单号_check', orderNumberTypeValue_check] param[2] = ['物料名称_check', materialNameTypeValue_check]
param[3] = ['订单号', this.orderNumberTypeValue] param[3] = ['物料名称', this.materialNameTypeValue]
param[4] = ['类型_check', typeValue_check] param[4] = ['订单号_check', orderNumberTypeValue_check]
param[5] = ['类型', this.typeValue] param[5] = ['订单号', this.orderNumberTypeValue]
param[6] = ['开始时间', this.dateRange[0]] param[6] = ['类型_check', typeValue_check]
param[7] = ['结束时间', this.dateRange[1]] param[7] = ['类型', this.typeValue]
param[8] = ['入库时间_check', dateRange_check] param[8] = ['开始时间', this.dateRange[0]]
param[9] = ['采购合同_check', purchaseOrderValue_check] param[9] = ['结束时间', this.dateRange[1]]
param[10] = ['采购合同流水号', this.purchaseOrderValue] param[10] = ['入库时间_check', dateRange_check]
param[11] = ['供应商_check', supplierSelection_check] param[11] = ['采购合同_check', purchaseOrderValue_check]
param[12] = ['供应商名称', this.supplierSelectionValue] param[12] = ['采购合同流水号', this.purchaseOrderValue]
param[13] = ['排序名称', this.orderName] param[13] = ['供应商_check', supplierSelection_check]
param[14] = ['排序方式', this.order] param[14] = ['供应商名称', this.supplierSelectionValue]
param[15] = ['排序名称', this.orderName]
param[16] = ['排序方式', this.order]
var Data = this.CreateData('11', '仓储管理_入库记录_查询', param, this.pageSize, this.pageCurrent) var Data = this.CreateData('11', '仓储管理_入库记录_查询', param, this.pageSize, this.pageCurrent)
this.ExecDatabase(Data).then(response => { this.ExecDatabase(Data).then(response => {
this.tableData = response.data.rows this.tableData = response.data.rows