Commit 5cb420f2 by qinjianhui

fix: 问题修改

parent dab03bc9
...@@ -979,7 +979,7 @@ ...@@ -979,7 +979,7 @@
<RightClickMenu <RightClickMenu
ref="rightMenuRef" ref="rightMenuRef"
:show-copy-shop-number="true" :show-copy-shop-number="true"
:show-copy-count="true" :show-copy-count="false"
:show-copy-sub-shop-number="true" :show-copy-sub-shop-number="true"
@on-change="rightChange" @on-change="rightChange"
/> />
...@@ -1684,39 +1684,44 @@ const rightChange = (key: string) => { ...@@ -1684,39 +1684,44 @@ const rightChange = (key: string) => {
} else { } else {
tableRef.value?.clearSelection() tableRef.value?.clearSelection()
} }
} else if (key === 'copy_code') { } else if (key === 'copy_shopNumber') {
const shopNumberList: string[] = [] let shopNumberList: string[] = []
for (const item of tableData.value) { if (statusCode.value === 6) {
item.productList?.forEach((el) => { shopNumberList = tableData.value
if (el.shopNumber) { .map((item) => item.detailList)
shopNumberList.push(el.shopNumber) .flat()
} .map((e) => e?.shopNumber)
}) .filter((shopNumber): shopNumber is string => shopNumber !== undefined)
} else {
shopNumberList = tableData.value
.map((item) => item.productList)
.flat()
.map((e) => e?.shopNumber)
.filter((shopNumber): shopNumber is string => shopNumber !== undefined)
} }
copy(shopNumberList.join(',')) copy(shopNumberList.join(','))
} else if (key === 'copy_shopNumber') { } else if (key === 'copy_code') {
const subOrderNumber: string[] = [] let subOrderNumber: string[] = []
if (statusCode.value === 6) { if (statusCode.value === 6) {
for (const item of tableData.value) { subOrderNumber = tableData.value
item.detailList?.forEach((el) => { .map((item) => item.detailList)
if (el.shopNumber) { .flat()
subOrderNumber.push(el.shopNumber || '') .map((e) => e?.subOrderNumber)
} .filter(
}) (subOrderNumber): subOrderNumber is string =>
} subOrderNumber !== undefined,
)
} else { } else {
for (const item of tableData.value) { subOrderNumber = tableData.value
item.productList?.forEach((el) => { .map((item) => item.productList)
if (el.subOrderNumber) { .flat()
subOrderNumber.push(el.subOrderNumber) .map((e) => e?.subOrderNumber)
} .filter(
}) (subOrderNumber): subOrderNumber is string =>
} subOrderNumber !== undefined,
)
} }
copy(subOrderNumber.join(',')) copy(subOrderNumber.join(','))
} else if (key === 'count') {
const count = selection.value.length
copy(count.toString())
} }
} }
const onChangeCurrentRow = (item: ProductList) => { const onChangeCurrentRow = (item: ProductList) => {
......
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