Commit ec604b00 by qinjianhui

feat: 拣胚失败

parent 90de60f4
...@@ -217,7 +217,7 @@ export function replenishmentCompleteApi(ids: (number | string)[]) { ...@@ -217,7 +217,7 @@ export function replenishmentCompleteApi(ids: (number | string)[]) {
export function pickFailApi(ids: (number | string)[]) { export function pickFailApi(ids: (number | string)[]) {
return axios.post<never, BaseRespData<PickFailData[]>>( return axios.post<never, BaseRespData<PickFailData[]>>(
'factory/orderNew/pickFail', 'factory/podOrderOperation/listByIds',
{ ids }, { ids },
) )
} }
......
...@@ -69,8 +69,11 @@ ...@@ -69,8 +69,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { pickFailApi, createOutboundOrderApi } from '@/api/factoryOrderNew' import {
import type { PickFailData } from '@/types/api/factoryOrderNew' createOutboundOrderApi,
applyForReplenishByIdApi,
} from '@/api/factoryOrderNew'
import type { operateOrderListData } from '@/types/api/factoryOrderNew'
import TableView from '@/components/TableView.vue' import TableView from '@/components/TableView.vue'
import type { CustomColumn } from '@/types/table' import type { CustomColumn } from '@/types/table'
...@@ -80,10 +83,10 @@ const emit = defineEmits<{ ...@@ -80,10 +83,10 @@ const emit = defineEmits<{
const visible = ref(false) const visible = ref(false)
const submitLoading = ref(false) const submitLoading = ref(false)
const tableData = ref<PickFailData[]>([]) const tableData = ref<operateOrderListData[]>([])
const orderIds = ref<(number | string)[]>([]) const orderIds = ref<(number | string)[]>([])
const columns: CustomColumn<PickFailData>[] = [ const columns: CustomColumn<operateOrderListData>[] = [
{ {
key: 'warehouseName', key: 'warehouseName',
prop: 'warehouseName', prop: 'warehouseName',
...@@ -104,66 +107,69 @@ const columns: CustomColumn<PickFailData>[] = [ ...@@ -104,66 +107,69 @@ const columns: CustomColumn<PickFailData>[] = [
minWidth: 160, minWidth: 160,
showOverflowTooltip: true, showOverflowTooltip: true,
}, },
{ key: 'styleNo', prop: 'styleNo', label: '款号', minWidth: 70 },
{ key: 'stockSku', prop: 'stockSku', label: '库存SKU', minWidth: 110 },
{ {
key: 'currentStock', key: 'batchArrangeNumber',
prop: 'currentStock', prop: 'batchArrangeNumber',
label: '款号',
width: 100,
align: 'center',
},
{
key: 'thirdSkuCode',
prop: 'thirdSkuCode',
label: '库存SKU',
minWidth: 160,
},
{
prop: 'inventory',
label: '当前库存数量', label: '当前库存数量',
minWidth: 120, minWidth: 120,
align: 'center', align: 'right',
}, },
{ {
key: 'occupiedQuantity', prop: 'occupyInventory',
prop: 'occupiedQuantity',
label: '占用数量', label: '占用数量',
minWidth: 90, minWidth: 90,
align: 'center', align: 'right',
}, },
{ {
key: 'currentAvailableStock', prop: 'inventory',
prop: 'currentAvailableStock',
label: '当前可用库存', label: '当前可用库存',
minWidth: 120, minWidth: 120,
align: 'center', align: 'right',
}, },
{ {
key: 'producingQuantity',
prop: 'producingQuantity', prop: 'producingQuantity',
label: '生产中数量', label: '生产中数量',
minWidth: 110, minWidth: 110,
align: 'center', align: 'right',
slot: 'producingQuantity', slot: 'producingQuantity',
}, },
{ {
key: 'suggestOutQuantity',
prop: 'suggestOutQuantity', prop: 'suggestOutQuantity',
label: '建议出库数量', label: '建议出库数量',
minWidth: 120, minWidth: 120,
align: 'center', align: 'right',
slot: 'suggestOutQuantity', slot: 'suggestOutQuantity',
}, },
{ {
key: 'afterOutStock',
prop: 'afterOutStock', prop: 'afterOutStock',
label: '出库后库存数量', label: '出库后库存数量',
minWidth: 130, minWidth: 130,
align: 'center', align: 'center',
slot: 'afterOutStock', slot: 'right',
}, },
{ {
key: 'afterOutOccupied',
prop: 'afterOutOccupied', prop: 'afterOutOccupied',
label: '出库后占用数量', label: '出库后占用数量',
minWidth: 130, minWidth: 130,
align: 'center', align: 'right',
}, },
{ {
key: 'afterOutAvailable',
prop: 'afterOutAvailable', prop: 'afterOutAvailable',
label: '出库后可用库存', label: '出库后可用库存',
minWidth: 130, minWidth: 130,
align: 'center', align: 'right',
}, },
] ]
...@@ -171,7 +177,10 @@ const open = async (ids: (number | string)[]) => { ...@@ -171,7 +177,10 @@ const open = async (ids: (number | string)[]) => {
orderIds.value = ids orderIds.value = ids
visible.value = true visible.value = true
try { try {
const res = await pickFailApi(ids) const res = await applyForReplenishByIdApi(
ids,
'factory/podOrderOperation/listByIds',
)
tableData.value = res.data || [] tableData.value = res.data || []
} catch (_e) { } catch (_e) {
tableData.value = [] tableData.value = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment