Commit 3fa77032 by linjinhong

修改eslint打包报错问题

parent c809d666
...@@ -84,7 +84,7 @@ import { ...@@ -84,7 +84,7 @@ import {
} from '@/api/logistics' } from '@/api/logistics'
import { ISeachFormConfig } from '@/types/searchType' import { ISeachFormConfig } from '@/types/searchType'
import { TableColumn } from '@/components/VxeTable' import { TableColumn } from '@/components/VxeTable'
// import type { PromiseSettledResult } from 'types'
import type { import type {
LogisticsMethod, LogisticsMethod,
platformObj, platformObj,
...@@ -744,23 +744,25 @@ async function getAllList() { ...@@ -744,23 +744,25 @@ async function getAllList() {
getLogisticsCompanyList(), getLogisticsCompanyList(),
getUniuniList(), getUniuniList(),
]) ])
res.forEach((item, index) => { res.forEach(
if (item.status === 'fulfilled') { (item: PromiseSettledResult<{ code: number; data: never[] }>, index) => {
if (item.value.code === 200) { if (item.status === 'fulfilled') {
if (index == 0) { if (item.value.code === 200) {
warehouseList.value = item.value.data || [] if (index == 0) {
} else if (index == 1) { warehouseList.value = item.value.data || []
ruleNameList.value = item.value.data || [] } else if (index == 1) {
} else if (index == 2) { ruleNameList.value = item.value.data || []
platformList.value = item.value.data || [] } else if (index == 2) {
} else if (index == 3) { platformList.value = item.value.data || []
logisticsCompanyList.value = item.value.data || [] } else if (index == 3) {
} else if (index == 4) { logisticsCompanyList.value = item.value.data || []
uniuniList.value = item.value.data || [] } else if (index == 4) {
uniuniList.value = item.value.data || []
}
} }
} }
} },
}) )
console.log(545, res) console.log(545, res)
} catch (error) { } catch (error) {
......
...@@ -347,16 +347,21 @@ function setCellStyle() { ...@@ -347,16 +347,21 @@ function setCellStyle() {
*/ */
async function getAllList() { async function getAllList() {
try { try {
const res = await Promise.allSettled([getlogisticsWayAllList(), getList()]) const res = await Promise.allSettled([getlogisticsWayAllList()])
res.forEach((item, index) => { res.forEach(
if (item.status === 'fulfilled') { (item: PromiseSettledResult<{ code: number; data: never[] }>, index) => {
if (item.value.code === 200) { if (item?.status === 'fulfilled') {
if (index == 0) { if (item.value.code === 200) {
searchConfig.value[0].attrs!.options = [...(item.value.data || [])] if (index == 0) {
searchConfig.value[0].attrs!.options = [
...(item.value.data || []),
]
}
} }
} }
} },
}) )
getList()
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
......
...@@ -624,19 +624,24 @@ function handleCheckboxRecords(value: never[]) { ...@@ -624,19 +624,24 @@ function handleCheckboxRecords(value: never[]) {
/** /**
* @description: 获取物流方式列表 * @description: 获取物流方式列表
*/ */
const logisticsWayList = ref([]) const logisticsWayList = ref([])
async function getAllList() { async function getAllList() {
try { try {
const res = await Promise.allSettled([getlogisticsWayAllList(), getList()]) const res = await Promise.allSettled([getlogisticsWayAllList()])
res.forEach((item, index) => {
if (item.status === 'fulfilled') { res.forEach(
if (item.value.code === 200) { (item: PromiseSettledResult<{ code: number; data: never[] }>, index) => {
if (index == 0) { if (item.status === 'fulfilled') {
logisticsWayList.value = [...(item.value.data || [])] if (item.value.code === 200) {
if (index == 0) {
logisticsWayList.value = [...(item.value.data || [])]
}
} }
} }
} },
}) )
getList()
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
......
...@@ -12,6 +12,7 @@ export interface LogisticsMethod { ...@@ -12,6 +12,7 @@ export interface LogisticsMethod {
ruleRef: ruleRefObj ruleRef: ruleRefObj
ruleId?: string | number ruleId?: string | number
ruleList?: ruleRefObj[] ruleList?: ruleRefObj[]
uinuinWarehouseId?: number | string
} }
export interface LogisticsMethodList { export interface LogisticsMethodList {
......
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