|
@@ -2113,10 +2113,7 @@ const route = useRoute()
|
|
const soOwner = ref('')
|
|
const soOwner = ref('')
|
|
// 获取销售订单详情
|
|
// 获取销售订单详情
|
|
const p2 = request
|
|
const p2 = request
|
|
- .post('/common/getSalesOrdersData', { id: route.params.id })
|
|
|
|
- .then((response) => {
|
|
|
|
- return response
|
|
|
|
- })
|
|
|
|
|
|
+ .post('/common/getSalesOrdersDatV7', { id: route.params.id })
|
|
|
|
|
|
// 获取对 该so对应客户的标注 并弹窗提醒
|
|
// 获取对 该so对应客户的标注 并弹窗提醒
|
|
const getAccountsData = async (id: string) =>
|
|
const getAccountsData = async (id: string) =>
|
|
@@ -2231,13 +2228,9 @@ Promise.all([p1, p2, p3, getAccountsData])
|
|
form.value.Reference = res.Reference || ''
|
|
form.value.Reference = res.Reference || ''
|
|
form.value.Artwork_Link = res.Artwork_Link || ''
|
|
form.value.Artwork_Link = res.Artwork_Link || ''
|
|
let temp = []
|
|
let temp = []
|
|
- if (res.details) {
|
|
|
|
- temp = res.details.filter(
|
|
|
|
- (item: any) => !productBlackList.includes(item.product_id),
|
|
|
|
- )
|
|
|
|
- } else if (res.Product_Details) {
|
|
|
|
- temp = res.Product_Details.filter(
|
|
|
|
- (item: any) => !productBlackList.includes(item.product.id),
|
|
|
|
|
|
+ if (res.Ordered_Items) {
|
|
|
|
+ temp = res.Ordered_Items.filter(
|
|
|
|
+ (item: any) => !productBlackList.includes(item.Product_Name.id),
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2245,29 +2238,30 @@ Promise.all([p1, p2, p3, getAccountsData])
|
|
form.value.productList = []
|
|
form.value.productList = []
|
|
recommandVendor.value = []
|
|
recommandVendor.value = []
|
|
temp.forEach((item: any) => {
|
|
temp.forEach((item: any) => {
|
|
- getProductData(item.product.id).then((ctx) => {
|
|
|
|
|
|
+ getProductData(item.Product_Name.id).then((ctx) => {
|
|
console.log(ctx, 'product ctx')
|
|
console.log(ctx, 'product ctx')
|
|
form.value.productList.push(
|
|
form.value.productList.push(
|
|
Object.assign({}, emptyProductItem, {
|
|
Object.assign({}, emptyProductItem, {
|
|
candidate: [
|
|
candidate: [
|
|
{
|
|
{
|
|
- Product_Code: item.product_Product_Code,
|
|
|
|
- label: item.product.name,
|
|
|
|
- value: item.product.id,
|
|
|
|
|
|
+ Product_Code: item.Product_Name.Product_Code,
|
|
|
|
+ label: item.Product_Name.name,
|
|
|
|
+ value: item.Product_Name.id,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- Product_Code: item.product.Product_Code,
|
|
|
|
- id: item.product.id,
|
|
|
|
- name: item.product.name,
|
|
|
|
- label: item.product.name,
|
|
|
|
- value: item.product.id,
|
|
|
|
- desc: item.product_description || '',
|
|
|
|
- quantity: Number(item.quantity),
|
|
|
|
|
|
+ Product_Code: item.Product_Name.Product_Code,
|
|
|
|
+ id: item.Product_Name.id,
|
|
|
|
+ name: item.Product_Name.name,
|
|
|
|
+ label: item.Product_Name.name,
|
|
|
|
+ value: item.Product_Name.id,
|
|
|
|
+ desc: item.Description || '',
|
|
|
|
+ quantity: Number(item.Quantity),
|
|
requirement:
|
|
requirement:
|
|
userInfo.value.Organization === 'PrimePac'
|
|
userInfo.value.Organization === 'PrimePac'
|
|
? '产品名称:\n尺寸:\n材质:\n工艺:\n颜色:\n其他备注:'
|
|
? '产品名称:\n尺寸:\n材质:\n工艺:\n颜色:\n其他备注:'
|
|
: ctx.CF3 || '',
|
|
: ctx.CF3 || '',
|
|
CF_Product_Type: ctx.CF_Product_Type,
|
|
CF_Product_Type: ctx.CF_Product_Type,
|
|
|
|
+ SO_Line_Item_Id: item.id,
|
|
}),
|
|
}),
|
|
)
|
|
)
|
|
})
|
|
})
|