feat 辅材入库聚合

This commit is contained in:
Amjacks 2025-04-11 17:01:15 +08:00
parent 48d66ddbbe
commit 627726cc0f
3 changed files with 33 additions and 25 deletions

View File

@ -32,12 +32,14 @@
</el-popover> </el-popover>
</div> </div>
</div> </div>
<!-- <el-table :height="tableHeight" border v-loading="loading" :data="state.MATERIALRECEIVEACT" highlight-current-row row-key="id"
style="width: 100%" @row-click="handle">-->
<el-table :height="tableHeight" border v-loading="loading" :data="state.MATERIALRECEIVEACT" highlight-current-row row-key="id" <el-table :height="tableHeight" border v-loading="loading" :data="state.MATERIALRECEIVEACT" highlight-current-row row-key="id"
style="width: 100%" @row-click="handle"> style="width: 100%">
<el-table-column prop="ERPFACTORY" fixed="left" v-if = false label="库存组织" width="100"></el-table-column> <el-table-column prop="ERPFACTORY" fixed="left" label="库存组织" width="100"></el-table-column>
<el-table-column prop="ERPFACTORY2" label="库存组织" width="280"></el-table-column> <el-table-column prop="ERPFACTORY2" label="库存组织" width="100"></el-table-column>
<el-table-column prop="RECEIVEREQUESTNAME" label="到货单" width="100"></el-table-column> <!-- <el-table-column prop="RECEIVEREQUESTNAME" label="到货单" width="100"></el-table-column>-->
<el-table-column prop="RECEIVEREQUESTDETAILNAME" label="到货单明细" width="80"></el-table-column> <!-- <el-table-column prop="RECEIVEREQUESTDETAILNAME" label="到货单明细" width="80"></el-table-column>-->
<el-table-column prop="MATERIALSPECNAME" label="物料编号" width="100"></el-table-column> <el-table-column prop="MATERIALSPECNAME" label="物料编号" width="100"></el-table-column>
<el-table-column prop="DESC_CN" label="物料品名" width="80"></el-table-column> <el-table-column prop="DESC_CN" label="物料品名" width="80"></el-table-column>
<el-table-column prop="MATERIALUNIT" label="单位" width="80"></el-table-column> <el-table-column prop="MATERIALUNIT" label="单位" width="80"></el-table-column>
@ -45,10 +47,18 @@
<el-table-column prop="DESCRPTION" label="物料规格" width="80"></el-table-column> <el-table-column prop="DESCRPTION" label="物料规格" width="80"></el-table-column>
<el-table-column prop="REQUESTQUANTITY" label="订单数量" width="80"></el-table-column> <el-table-column prop="REQUESTQUANTITY" label="订单数量" width="80"></el-table-column>
<el-table-column prop="RECEIVEDQUANTITY" label="实收数量" width="80"></el-table-column> <el-table-column prop="RECEIVEDQUANTITY" label="实收数量" width="80"></el-table-column>
<el-table-column prop="THISACCEPTNUMBER" label="本次接收数量" width="180">
<template #default="scope">
<el-input v-model="scope.row.THISACCEPTNUMBER" min = 0 type =number style="width: 170px">
</el-input>
</template>
</el-table-column>
<el-table-column prop="ERPLOCATION" label="库位" width="180"> <el-table-column prop="ERPLOCATION" label="库位" width="180">
<template #default="scope"> <template #default="scope">
<!-- <el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px"
default-first-option @focus="getStorageSpec(scope.row.ERPLOCATION)" filterable >-->
<el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px" <el-select v-model="scope.row.ERPLOCATION" placeholder="选择仓库" style="width: 170px"
default-first-option @focus="getStorageSpec(scope.row.ERPLOCATION)" filterable > default-first-option filterable >
<el-option v-for="item in state.ERPLocationList" :key="item.VALUE" :label="item.LABEL" <el-option v-for="item in state.ERPLocationList" :key="item.VALUE" :label="item.LABEL"
:value="item.VALUE" /> :value="item.VALUE" />
</el-select> </el-select>
@ -57,19 +67,15 @@
<!-- <el-table-column prop="ERPLOCATIONDESC" label="库位(CN)" width="180"></el-table-column>--> <!-- <el-table-column prop="ERPLOCATIONDESC" label="库位(CN)" width="180"></el-table-column>-->
<el-table-column prop="LOCATIONNAME" label="货位" width="180"> <el-table-column prop="LOCATIONNAME" label="货位" width="180">
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px" @focus="getStorageSpec(scope.row.ERPLOCATION)" <!-- <el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px" @focus="getStorageSpec(scope.row.ERPLOCATION)"
default-first-option filterable >-->
<el-select v-model="scope.row.LOCATIONNAME" placeholder="选择库位" style="width: 170px"
default-first-option filterable > default-first-option filterable >
<el-option v-for="item in state.POCreateLocationList" :key="item.VALUE" :label="item.LABEL" <el-option v-for="item in state.POCreateLocationList" :key="item.VALUE" :label="item.LABEL"
:value="item.VALUE" /> :value="item.VALUE" />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="THISACCEPTNUMBER" label="本次接收数量" width="180">
<template #default="scope">
<el-input v-model="scope.row.THISACCEPTNUMBER" min = 0 type =number style="width: 170px">
</el-input>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<div class="vue-element-page-table"> <div class="vue-element-page-table">
@ -113,6 +119,7 @@ import { NoChargeStockIn } from '@/api/StockIn'
import {getOpCode} from "@/api/opcode"; import {getOpCode} from "@/api/opcode";
import { bTableHeight } from "../../../composables/calcTableHeight"; import { bTableHeight } from "../../../composables/calcTableHeight";
import Drawer from '@/views/stockIn/delivery/drawer.vue' import Drawer from '@/views/stockIn/delivery/drawer.vue'
import { getStoreDetail } from '@/api/delivery'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(220); const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(220);
const route = useRoute() const route = useRoute()
@ -145,6 +152,7 @@ const state = reactive({
//SITENAME: localStorage.get("siteName"), //SITENAME: localStorage.get("siteName"),
SITENAME: 'SDK', SITENAME: 'SDK',
RECEIVEREQUESTNAME: "", RECEIVEREQUESTNAME: "",
deliveryType: '02'
}, },
}, },
ChangeParams: { ChangeParams: {
@ -241,25 +249,24 @@ function handleQuery() {
}) })
return return
} }
getQueryList(state.queryParams).then((res: any) => { getStoreDetail(state.queryParams).then((res: any) => {
console.log(res.data) if (res.resultObj) {
if(res.data.length == 0){ //
if (res.resultObj.length > 0) {
getERPLocation(res.resultObj[0].ERPFACTORY)
getStorageSpec(res.resultObj[0].ERPFACTORY)
}
state.MATERIALRECEIVEACT = res.resultObj
} else {
ElMessageBox.alert('查无数据', '提醒框', { ElMessageBox.alert('查无数据', '提醒框', {
confirmButtonText: 'OK', confirmButtonText: 'OK',
}) })
return
} else {
state.MATERIALRECEIVEACT = res.data
} }
}).catch((error: any) => { }).catch((error: any) => {
ElMessageBox.alert(error.message, '提醒框', { ElMessageBox.alert(error.message, '提醒框', {
confirmButtonText: 'OK', confirmButtonText: 'OK',
}) })
}) })
} }

View File

@ -258,7 +258,8 @@ const state = reactive({
params: { params: {
SITENAME: 'SDK', SITENAME: 'SDK',
RECEIVEREQUESTNAME: '', RECEIVEREQUESTNAME: '',
MATERIALSPECNAME: '' MATERIALSPECNAME: '',
deliveryType: '01'
} }
}, },
operateParams: { operateParams: {

View File

@ -112,7 +112,7 @@ const state = reactive({
loading: true, // loading: true, //
// //
deliveryType: [{label: '批次到货单', key: '01'}, {label: '辅材到货单', key: '02'}], deliveryType: [{label: '批次到货单', key: '01'}, {label: '辅材到货单', key: '02'}],
deliveryState: [{label: '新建', key: '01'}, {label: '结束', key: '02'}], deliveryState: [{label: '新建', key: '01'}, {label: '进行中', key: '02'}, {label: '结束', key: '03'}],
// //
queryParams: { queryParams: {
params: { params: {