From ca434ed909ca46a50c952746e0d63b3e8c1a6e1b Mon Sep 17 00:00:00 2001 From: Amjacks <1932302177@qq.com> Date: Mon, 31 Mar 2025 14:31:59 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=88=B0=E8=B4=A7=E5=8D=95=E6=98=8E?= =?UTF-8?q?=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/StockIn/index.ts | 8 ++++ src/views/stockIn/StockInByCharge/drawer.vue | 41 ++++++++++++++++++-- src/views/stockIn/StockInByCharge/index.vue | 4 +- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/src/api/StockIn/index.ts b/src/api/StockIn/index.ts index 44e7dc0..92ecf91 100644 --- a/src/api/StockIn/index.ts +++ b/src/api/StockIn/index.ts @@ -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, + }); +} diff --git a/src/views/stockIn/StockInByCharge/drawer.vue b/src/views/stockIn/StockInByCharge/drawer.vue index 6674bde..6dbc792 100644 --- a/src/views/stockIn/StockInByCharge/drawer.vue +++ b/src/views/stockIn/StockInByCharge/drawer.vue @@ -1,5 +1,5 @@ @@ -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, '提醒框', { diff --git a/src/views/stockIn/StockInByCharge/index.vue b/src/views/stockIn/StockInByCharge/index.vue index 93cd2a1..6742223 100644 --- a/src/views/stockIn/StockInByCharge/index.vue +++ b/src/views/stockIn/StockInByCharge/index.vue @@ -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 = ''