Commit ec604b00 by qinjianhui

feat: 拣胚失败

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