1
1
This commit is contained in:
33
src/App.tsx
33
src/App.tsx
@ -2225,6 +2225,39 @@ export default function App() {
|
||||
const data = await executeSecondaryProcessQuery(packId, packType);
|
||||
setSecondaryProcessResults(data);
|
||||
|
||||
// 处理二次工艺填充到标签7的逻辑
|
||||
if (data && data.length > 0) {
|
||||
const label7Options = labelOptions['标签7'] || [];
|
||||
const matchingProcessValues: string[] = [];
|
||||
|
||||
data.forEach((record: any) => {
|
||||
if (record.costs_type && record.costs_type.trim() !== '') {
|
||||
const processValue = record.costs_type.trim();
|
||||
const matchingOption = label7Options.find(option =>
|
||||
option.value === processValue || option.label === processValue
|
||||
);
|
||||
|
||||
if (matchingOption && !matchingProcessValues.includes(processValue)) {
|
||||
matchingProcessValues.push(processValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (matchingProcessValues.length > 0) {
|
||||
setSelectedLabels(prev => ({
|
||||
...prev,
|
||||
'标签7': matchingProcessValues
|
||||
}));
|
||||
|
||||
if (bitable.ui.showToast) {
|
||||
await bitable.ui.showToast({
|
||||
toastType: 'success',
|
||||
message: `已将 ${matchingProcessValues.length} 个二次工艺填充到标签7: ${matchingProcessValues.join(', ')}`
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bitable.ui.showToast) {
|
||||
await bitable.ui.showToast({
|
||||
toastType: 'success',
|
||||
|
||||
Reference in New Issue
Block a user