Commit ff1c4200 by wusiyi

feat: 修改pod cn 创建物流方式逻辑

parent a1a21d52
...@@ -94,12 +94,15 @@ const logisticCompanyList = ref<ILogisticsCompany[]>([]) ...@@ -94,12 +94,15 @@ const logisticCompanyList = ref<ILogisticsCompany[]>([])
const selectedLogisticCompany = ref<ILogisticsCompany | null>(null) const selectedLogisticCompany = ref<ILogisticsCompany | null>(null)
const logisticsWayList = ref<LogisticsWayData[]>([]) const logisticsWayList = ref<LogisticsWayData[]>([])
const logisticsWayId = ref<number | null>(null) const logisticsWayId = ref<number | null>(null)
const orderIdList = ref<(string | number)[]>([])
const cancelDialog = () => { const cancelDialog = () => {
logisticsWayList.value = [] logisticsWayList.value = []
logisticCompanyList.value = [] logisticCompanyList.value = []
selectedLogisticCompany.value = null selectedLogisticCompany.value = null
logisticsWayId.value = null logisticsWayId.value = null
orderIdList.value = []
isAutoMatch.value = false
createLogisticDialogVisible.value = false createLogisticDialogVisible.value = false
} }
...@@ -126,19 +129,23 @@ const selectLogisticCompany = async (item: ILogisticsCompany) => { ...@@ -126,19 +129,23 @@ const selectLogisticCompany = async (item: ILogisticsCompany) => {
} }
const confirmDialog = async () => { const confirmDialog = async () => {
await createLogisticsOrdersApi( await createLogisticsOrdersApi(orderIdList.value, logisticsWayId.value)
[logisticsWayId.value as unknown as string],
logisticsWayId.value,
)
.then((res) => { .then((res) => {
emits('show-result', res.data) emits('show-result', res.data)
}) })
.finally(() => { .finally(() => {
logisticsWayList.value = []
logisticCompanyList.value = []
selectedLogisticCompany.value = null
logisticsWayId.value = null
orderIdList.value = []
isAutoMatch.value = false
createLogisticDialogVisible.value = false createLogisticDialogVisible.value = false
}) })
} }
const showDialog = async () => { const showDialog = async (ids: (string | number)[]) => {
orderIdList.value = ids
createLogisticDialogVisible.value = true createLogisticDialogVisible.value = true
} }
......
...@@ -753,7 +753,7 @@ ...@@ -753,7 +753,7 @@
selection.length === 0 || selection.length === 0 ||
selection.some((item) => item.shipmentType !== 1) selection.some((item) => item.shipmentType !== 1)
" "
@click="handleCreateLogistic(row)" @click="handleCreateLogistic()"
>创建物流订单</ElDropdownItem >创建物流订单</ElDropdownItem
> >
<ElDropdownItem <ElDropdownItem
...@@ -5984,10 +5984,10 @@ const handleStockOut = async (row: PodCnOrderListData) => { ...@@ -5984,10 +5984,10 @@ const handleStockOut = async (row: PodCnOrderListData) => {
} }
// 创建物流订单 // 创建物流订单
const handleCreateLogistic = (row: PodCnOrderListData) => { const handleCreateLogistic = () => {
currentItem.value = row const ids = selection.value.map((item) => item.id)
nextTick(() => { nextTick(() => {
createLogisticDialogRef.value?.showDialog() createLogisticDialogRef.value?.showDialog(ids)
}) })
} }
......
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