This commit is contained in:
parent
a4a101712c
commit
1d38dbc6cf
1 changed files with 40 additions and 64 deletions
|
|
@ -104,10 +104,6 @@ const {
|
||||||
importProduct,
|
importProduct,
|
||||||
} = productServiceStore;
|
} = productServiceStore;
|
||||||
|
|
||||||
const currentCopy = ref<{
|
|
||||||
id: string | undefined;
|
|
||||||
type: 'service' | 'product';
|
|
||||||
}>();
|
|
||||||
const { workNameItems } = storeToRefs(productServiceStore);
|
const { workNameItems } = storeToRefs(productServiceStore);
|
||||||
const allStat = ref<{ mode: string; count: number }[]>([]);
|
const allStat = ref<{ mode: string; count: number }[]>([]);
|
||||||
|
|
||||||
|
|
@ -1848,16 +1844,9 @@ function handleSubmitSameWorkflow() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function paste() {
|
async function copy(id: string) {
|
||||||
if (
|
{
|
||||||
!!currentCopy.value &&
|
const res = await fetchListServiceById(id);
|
||||||
currentCopy.value.type === 'service' &&
|
|
||||||
!!currentCopy.value.id
|
|
||||||
)
|
|
||||||
dialogWarningClose(t, {
|
|
||||||
message: t('dialog.message.warningPaste'),
|
|
||||||
action: async () => {
|
|
||||||
const res = await fetchListServiceById(currentCopy.value.id);
|
|
||||||
if (res) {
|
if (res) {
|
||||||
formService.value = {
|
formService.value = {
|
||||||
code: res.code,
|
code: res.code,
|
||||||
|
|
@ -1895,18 +1884,9 @@ async function paste() {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
});
|
|
||||||
else {
|
|
||||||
dialog({
|
|
||||||
color: 'warning',
|
|
||||||
icon: 'mdi-alert',
|
|
||||||
title: t('form.warning.title'),
|
|
||||||
actionText: t('dialog.action.ok'),
|
|
||||||
message: t('dialog.message.warningCopyEmpty'),
|
|
||||||
action: async () => {},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialogService.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -3278,11 +3258,7 @@ watch(
|
||||||
:id-name="props.row.name"
|
:id-name="props.row.name"
|
||||||
@copy="
|
@copy="
|
||||||
() => {
|
() => {
|
||||||
notify('create', $t('dialog.message.copy'));
|
copy(props.row.id);
|
||||||
currentCopy = {
|
|
||||||
id: props.row.id,
|
|
||||||
type: productAndServiceTab,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
@view="
|
@view="
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue