This commit is contained in:
郭飞 2025-04-01 10:25:20 +08:00
commit 54e464d83f
3 changed files with 48 additions and 5 deletions

View File

@ -172,3 +172,11 @@ export function getStoreDetail(params: any) {
data: params,
});
}
export function getReceiveDetail(params: any) {
return request({
url: '/api/api/delivery/getReceiveDetail',
method: 'post',
data: params,
});
}

View File

@ -1,5 +1,5 @@
<template>
<el-drawer title="新建到货单" size="700px">
<el-drawer title="新建到货单" size="900px">
<el-row class="page-search" justify="space-between" align="middle">
<el-form ref="queryFormRef" :model="queryParams.params" :inline="true">
<el-form-item label="采购单" prop="RECEIVEREQUESTNAME">
@ -30,6 +30,25 @@
v-model:pageSizeTo="queryParams.pageSize" @pagination="handleQuery" />
</div>
</div>
<div class="vue-element-page-table">
<div class="page-table-operate">
<div class="page-table-title">
<span>订单详情</span>
</div>
</div>
<el-table border v-loading="receiveLoading" :data="state.receiveList"
highlight-current-row row-key="id">
<el-table-column prop="receiveRequestName" fixed="left" label="单号"/>
<el-table-column prop="materialSpecName" fixed="left" label="料号"/>
<el-table-column prop="requestQuantity" label="订单数量" width="180"/>
<el-table-column prop="deliveryNum" label="到库数量" width="180">
<template #default="scope">
<el-Input v-model="scope.row.deliveryNum" placeholder="请输入到库数量" clearable />
</template>
</el-table-column>
</el-table>
</div>
</el-drawer>
</template>
@ -37,7 +56,7 @@
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue'
import { ElForm, ElMessageBox, ElTable } from 'element-plus'
import { localStorage } from '@/utils/storage'
import { createDelivery, getPurchase } from '@/api/StockIn'
import { createDelivery, getPurchase, getReceiveDetail } from '@/api/StockIn'
const queryFormRef = ref(ElForm)
const { proxy }: any = getCurrentInstance()
@ -48,6 +67,8 @@ let state = reactive({
selection: [] as any, //
loadings: false,
loading: true,
receiveLoading: false,
receiveList: [] as any,
//
queryParams: {
params: {
@ -58,13 +79,24 @@ let state = reactive({
pageSize: 10
}
})
const { queryParams, loading, total } = toRefs(state)
const { queryParams, loading, total, receiveLoading } = toRefs(state)
onMounted(()=> {
handleQuery()
})
//
const handleSelection = (val: any) => {
state.selection = val
state.receiveLoading = true
if (val.length === 0) {
return
}
let nameList: any = []
val.forEach((item: any) => nameList.push(item.receiveRequestName))
//
getReceiveDetail({nameList: nameList}).then((res: any) => {
state.receiveList = res.resultObj
state.receiveLoading = false
})
}
//
function queryInfo() {
@ -91,7 +123,8 @@ function handleCreate() {
createDelivery({
receiveRequestName: name,
siteName: 'SDK',
dataList: state.selection
dataList: state.selection,
receiveList: state.receiveList
}).then((res: any) => {
if (res.success) {
ElMessageBox.alert('创建到货单:' + name, '提醒框', {

View File

@ -587,8 +587,10 @@ function commitBox() {
var getTime = new Date().getTime() //
state.createBoxForm.MAKEDATE = msToDate(state.createBoxForm.MAKEDATE).hasTime
CreateBox({
siteName: 'SDK',
materialreceiveAct: state.createBoxForm,
user: localStorage.get('userId')
user: localStorage.get('userId'),
receiveRequestName: state.queryParams.params.RECEIVEREQUESTNAME
})
.then((res: any) => {
state.MATERIALPACKINGLISTS = ''