更新设备维修、发货、精工车间工序工价/生产审核/工时统计、仓储盘点/库存查询/库位/入库,新增车间派工移动端及SQL脚本
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
@cell-click="handleEdit"
|
||||
@sort-change="sortChange"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="40" :reserve-selection="true" />
|
||||
<el-table-column :reserve-selection="true" type="selection" width="40" />
|
||||
<el-table-column type="expand" width="1">
|
||||
<template slot-scope="scope">
|
||||
<el-table
|
||||
@@ -93,7 +93,7 @@
|
||||
style="width:962px"
|
||||
height="258px"
|
||||
size="small">
|
||||
<el-table-column label="物料编码" align="center" prop="物料码"><!-- 备注:修改人:Ld 修改时间:2026-06-29 14:24:00 -->
|
||||
<el-table-column label="物料编码" align="center" prop="物料码"><!-- 备注:修改人:Ld 修改时间:2026-07-15 17:14:07; 展开行恢复原出入库记录数据。 -->
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料编码 }}
|
||||
</template>
|
||||
@@ -168,14 +168,23 @@
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="库位" sortable="库位" prop="库位" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="库存" sortable="库存" prop="库存" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.库存 }}
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
width="300"
|
||||
trigger="click"
|
||||
@show="getStockLocationDetail(scope.row)">
|
||||
<el-table v-loading="stockLocationLoading" :data="stockLocationData" border stripe size="mini" max-height="300">
|
||||
<el-table-column prop="货位名称" label="库位" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="货位存量" label="数量" align="center">
|
||||
<template slot-scope="stockScope">
|
||||
{{ stockScope.row.货位存量 || stockScope.row.库存 || 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="reference" style="cursor: pointer; color: #409EFF; text-decoration: underline;">{{ scope.row.库存 }}</span><!-- 备注:修改人:Ld 修改时间:2026-07-15 17:14:07; 库存库位明细改为参考需求数的小窗显示。 -->
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :width="setColumnWidth('数量')" label="需求数" align="center">
|
||||
@@ -185,7 +194,7 @@
|
||||
width="400"
|
||||
trigger="click"
|
||||
@show="getDemandDetail(scope.row)">
|
||||
<el-table :data="demandDetailData" border stripe size="mini" max-height="300" v-loading="demandDetailLoading">
|
||||
<el-table v-loading="demandDetailLoading" :data="demandDetailData" border stripe size="mini" max-height="300">
|
||||
<el-table-column prop="订单编号" label="订单号" align="center" show-overflow-tooltip/>
|
||||
<el-table-column prop="最终需求量" label="需求量" align="center"/>
|
||||
<el-table-column prop="简称" label="客户" align="center"/>
|
||||
@@ -404,7 +413,9 @@ export default {
|
||||
order: '', // 排序方式
|
||||
multipleSelection: [], // 选中的行
|
||||
demandDetailData: [],
|
||||
demandDetailLoading: false
|
||||
demandDetailLoading: false,
|
||||
stockLocationData: [],
|
||||
stockLocationLoading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -465,18 +476,48 @@ export default {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
getInventoryLocationRows(row) {
|
||||
var param = []
|
||||
var materialName_check = row.物料名称 ? 1 : 0
|
||||
var specificationsModel_check = row.图号或型号 ? 1 : 0
|
||||
param[0] = ['物料名称_check', materialName_check]
|
||||
param[1] = ['物料名称', row.物料名称]
|
||||
param[2] = ['图号或型号_check', specificationsModel_check]
|
||||
param[3] = ['图号或型号', row.图号或型号]
|
||||
param[4] = ['库位_check', 0]
|
||||
param[5] = ['库位', '']
|
||||
param[6] = ['排序名称', '']
|
||||
param[7] = ['排序方式', '']
|
||||
var Data = this.CreateData('11', '仓储管理_库存盘点_查询', param)
|
||||
return this.ExecDatabase(Data).then(response => {
|
||||
var rows = response.data.rows || response.data || []
|
||||
// 备注:修改人:Ld 修改时间:2026-07-15 17:14:07; 库存小窗只显示有库存的库位和对应数量。
|
||||
return rows.filter(function(item) {
|
||||
return Number(item.货位存量 || item.库存 || 0) > 0
|
||||
})
|
||||
})
|
||||
},
|
||||
getStockLocationDetail(row) {
|
||||
this.stockLocationLoading = true
|
||||
this.stockLocationData = []
|
||||
this.getInventoryLocationRows(row).then(rows => {
|
||||
this.stockLocationData = rows
|
||||
this.stockLocationLoading = false
|
||||
}).catch(() => {
|
||||
this.stockLocationLoading = false
|
||||
})
|
||||
},
|
||||
searchTable2() {
|
||||
var param = []
|
||||
param[0] = ['物料流水号', this.materialSerialNumber]
|
||||
var Data = this.CreateData('11', '库存查询_物料出入库记录_查询', param, this.pageSize1, this.pageCurrent1)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
console.log('response.data', response.data)
|
||||
this.tableData9 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleEdit(row, column) {
|
||||
if (column.label === '物料编码') { // 备注:修改人:Ld 修改时间:2026-06-29 14:24:00
|
||||
if (column.label === '物料编码') { // 备注:修改人:Ld 修改时间:2026-07-15 17:14:07; 展开行继续使用原物料出入库记录。
|
||||
this.materialSerialNumber = row.物料流水号
|
||||
this.tableData9 = []
|
||||
this.searchTable2()
|
||||
@@ -559,11 +600,11 @@ export default {
|
||||
Promise.all(promises).then(function(results) {
|
||||
var data = []
|
||||
// 表头
|
||||
data.push(['物料编码', '物料名称', '图号型号', '库位', '库存', '需求数', '可用库存', '加工中', '采购中', '毛坯数', '单位', '类型', '库存批次', '待入库', '最低库存', '安全库存', '最高库存', '', '物料编码', '物料名称', '图号/型号', '类型', '出/入库数', '出/入库日期', '批次编码']) // 备注:修改人:Ld 修改时间:2026-06-29 14:24:00
|
||||
data.push(['物料编码', '物料名称', '图号型号', '库存', '需求数', '可用库存', '加工中', '采购中', '毛坯数', '单位', '类型', '库存批次', '待入库', '最低库存', '安全库存', '最高库存', '', '物料编码', '物料名称', '图号/型号', '类型', '出/入库数', '出/入库日期', '批次编码']) // 备注:修改人:Ld 修改时间:2026-07-15 17:14:07; 选中导出恢复原展开出入库记录明细。
|
||||
results.forEach(function(item) {
|
||||
var row = item.row
|
||||
var mainRow = [
|
||||
row.物料编码, row.物料名称, row.图号或型号, row.货位名称, row.库存,
|
||||
row.物料编码, row.物料名称, row.图号或型号, row.库存,
|
||||
row.需求量, row.库存 - row.需求量, row.加工中 < 0 ? 0 : row.加工中,
|
||||
row.采购中, row.毛坯库存, row.单位, row.类型, row.批次, row.预库存,
|
||||
row.最低库存, row.安全库存, row.最高库存, ''
|
||||
@@ -573,7 +614,7 @@ export default {
|
||||
if (idx === 0) {
|
||||
data.push(mainRow.concat([expand.物料编码, expand.物料名称, expand.图号或型号, expand.类型, expand.数量, expand.日期, expand.批次编号 || expand.批次编码]))
|
||||
} else {
|
||||
data.push(['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', expand.物料编码, expand.物料名称, expand.图号或型号, expand.类型, expand.数量, expand.日期, expand.批次编号 || expand.批次编码])
|
||||
data.push(['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', expand.物料编码, expand.物料名称, expand.图号或型号, expand.类型, expand.数量, expand.日期, expand.批次编号 || expand.批次编码])
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -582,12 +623,11 @@ export default {
|
||||
})
|
||||
var ws = XLSX.utils.aoa_to_sheet(data)
|
||||
ws['!cols'] = [
|
||||
{ wch: 15 }, { wch: 20 }, { wch: 15 }, { wch: 10 }, { wch: 8 },
|
||||
{ wch: 8 }, { wch: 10 }, { wch: 8 }, { wch: 8 }, { wch: 8 },
|
||||
{ wch: 6 }, { wch: 8 }, { wch: 12 }, { wch: 8 }, { wch: 10 },
|
||||
{ wch: 10 }, { wch: 10 }, { wch: 2 },
|
||||
{ wch: 15 }, { wch: 20 }, { wch: 15 }, { wch: 8 }, { wch: 10 },
|
||||
{ wch: 15 }, { wch: 15 }
|
||||
{ wch: 15 }, { wch: 20 }, { wch: 15 }, { wch: 8 }, { wch: 8 },
|
||||
{ wch: 10 }, { wch: 8 }, { wch: 8 }, { wch: 8 }, { wch: 6 },
|
||||
{ wch: 8 }, { wch: 12 }, { wch: 8 }, { wch: 10 }, { wch: 10 },
|
||||
{ wch: 10 }, { wch: 2 }, { wch: 15 }, { wch: 20 }, { wch: 15 },
|
||||
{ wch: 8 }, { wch: 10 }, { wch: 15 }, { wch: 15 }
|
||||
]
|
||||
var wb = XLSX.utils.book_new()
|
||||
XLSX.utils.book_append_sheet(wb, ws, '库存查询')
|
||||
@@ -605,8 +645,6 @@ export default {
|
||||
this.orderName = 1
|
||||
} else if (column.prop === '物料名称') {
|
||||
this.orderName = 2
|
||||
} else if (column.prop === '库位') {
|
||||
this.orderName = 3
|
||||
} else if (column.prop === '库存') {
|
||||
this.orderName = 4
|
||||
} else if (column.prop === '最低库存') {
|
||||
|
||||
Reference in New Issue
Block a user