更新订单列表详情,更新商品管理,更新代客下单

This commit is contained in:
2024-09-23 17:39:38 +08:00
parent 90e3866524
commit edcf844adb
36 changed files with 5301 additions and 949 deletions

41
pageProduct/util.js Normal file
View File

@@ -0,0 +1,41 @@
import {
$types
} from '@/pageProduct/goodsData.js'
export function returnSkuSnap(goods) {
const selectSpec = typeof goods.selectSpec === 'string' ? JSON.parse(goods.selectSpec) : goods.selectSpec
let result = selectSpec.map(v => {
return {
name: v.name,
value: v.selectSpecResult.join(',')
}
})
return result
}
export function returnTypeEnum(typeEnum) {
const item = $types.find(v => v.title == typeEnum)
let result = item ? item.value : undefined
return result
}
export function returnCategory(cateName, cateList) {
console.log(cateName);
console.log(cateList);
const item = cateList.find(v => v.name == cateName)
let result = item ? item : undefined
return result
}
export function returnAllCategory(arr) {
const result = arr.reduce((prve, cur) => {
prve.push(...[{
...cur,
name: '' + cur.name,
childrenList: undefined
}, ...cur.childrenList.map(v => {
return {
...v,
name: '' + v.name
}
})])
return prve
}, [])
return result
}