Commit f922e81d by qinjianhui

feat: 刷新商品信息传参错误及查询报错修改

parent 237b7976
...@@ -90,13 +90,12 @@ const handleSubmit = async () => { ...@@ -90,13 +90,12 @@ const handleSubmit = async () => {
return ElMessage.warning('请选择订单') return ElMessage.warning('请选择订单')
} }
const { templateWidth, type } = form.value const { templateWidth } = form.value
const mustFill = isAuto.value || !showAutoSwitch.value const mustFill = isAuto.value || !showAutoSwitch.value
if (mustFill && (!templateWidth || !type)) { if (mustFill && (!templateWidth)) {
return ElMessage.warning('排版类型和排版宽度为必选项') return ElMessage.warning('排版宽度为必选项')
} }
if (!templateWidth && type) return ElMessage.warning('请选择排版宽度') if (!templateWidth) return ElMessage.warning('请选择排版宽度')
// if (templateWidth && !type) return ElMessage.warning('请选择排版类型')
submitting.value = true submitting.value = true
try { try {
......
...@@ -48,6 +48,7 @@ export function useOrderStatusTree(options: UseOrderStatusTreeOptions) { ...@@ -48,6 +48,7 @@ export function useOrderStatusTree(options: UseOrderStatusTreeOptions) {
const suspendedTabs = ref([ const suspendedTabs = ref([
{ label: '客户拦截', key: 'customerInterceptCount', value: 1, count: 0 }, { label: '客户拦截', key: 'customerInterceptCount', value: 1, count: 0 },
{ label: '地址异常', key: 'addressExceptionCount', value: 2, count: 0 }, { label: '地址异常', key: 'addressExceptionCount', value: 2, count: 0 },
{ label: '素材异常', key: 'materialExceptionCount', value: 3, count: 0 },
{ label: '其他', key: 'otherReasonCount', value: 4, count: 0 }, { label: '其他', key: 'otherReasonCount', value: 4, count: 0 },
]) ])
const suspendedSubTab = ref(1) const suspendedSubTab = ref(1)
......
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<ProductTypeFilter <ProductTypeFilter
v-model="searchForm.productMarkList" v-model="searchForm.productMarkList"
:options="productTypeGroups" :options="productTypeGroups"
:multiple="false" :multiple="true"
placeholder="请选择商品类型" placeholder="请选择商品类型"
width="140px" width="140px"
/> />
...@@ -1467,16 +1467,27 @@ const handleRefreshProductInfo = async () => { ...@@ -1467,16 +1467,27 @@ const handleRefreshProductInfo = async () => {
} catch { } catch {
return return
} }
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try { try {
const res = await refreshProductInfoApi({ const res = await refreshProductInfoApi({
orderIds: !isCardLayout.value ? getSelectedIds().join(',') : undefined, orderIds: !isCardLayout.value ? getSelectedIds().join(',') : undefined,
productIds: isCardLayout.value ? getSelectedIds().join(',') : undefined, productIds: isCardLayout.value
? cardSelectList.value
.map((row) => row.podOrderProductId ?? 0)
.join(',')
: undefined,
}) })
if (res.code !== 200) return if (res.code !== 200) return
ElMessage.success('刷新商品信息成功') ElMessage.success('刷新商品信息成功')
refreshCurrentView() refreshCurrentView()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
const handleTransferOldFlow = async () => { const handleTransferOldFlow = async () => {
...@@ -1551,7 +1562,9 @@ const handleLogisticsCommand = async (command: string) => { ...@@ -1551,7 +1562,9 @@ const handleLogisticsCommand = async (command: string) => {
} }
const handleSuspend = () => { const handleSuspend = () => {
if (!ensureSelection()) return if (!ensureSelection()) return
suspendDialogRef.value?.open(getSelectedIds()) suspendDialogRef.value?.open(
cardSelectList.value.map((row) => row.podOrderId ?? 0),
)
} }
const handleUpdateCustomsInfo = () => { const handleUpdateCustomsInfo = () => {
if (!ensureSelection()) return if (!ensureSelection()) return
......
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