|
@@ -2,20 +2,38 @@
|
|
|
<div class="flex flex-col h-full">
|
|
|
<div class="page-action">
|
|
|
<t-space size="small">
|
|
|
- <upload-button
|
|
|
- upload-url="/api/admin/device/delivery/import"
|
|
|
- :format="['xls', 'xlsx']"
|
|
|
+ <t-popup v-if="perm.BUTTON_BatchImport" trigger="hover">
|
|
|
+ <template #content>
|
|
|
+ <t-button
|
|
|
+ variant="outline"
|
|
|
+ @click="downloadImportTemplate('TEMPLATE_DELIVERY')"
|
|
|
+ >
|
|
|
+ <template #icon
|
|
|
+ ><svg-icon name="export" color="#262626" /></template
|
|
|
+ >下载模板
|
|
|
+ </t-button>
|
|
|
+ </template>
|
|
|
+ <upload-button
|
|
|
+ upload-url="/api/admin/device/delivery/import"
|
|
|
+ :format="['xls', 'xlsx']"
|
|
|
+ >
|
|
|
+ <t-button variant="outline">
|
|
|
+ <template #icon
|
|
|
+ ><svg-icon name="import" color="#262626" /></template
|
|
|
+ >批量导入
|
|
|
+ </t-button>
|
|
|
+ </upload-button>
|
|
|
+ </t-popup>
|
|
|
+ <t-button
|
|
|
+ v-if="perm.BUTTON_BatchExport"
|
|
|
+ variant="outline"
|
|
|
+ @click="multExport"
|
|
|
>
|
|
|
- <t-button variant="outline">
|
|
|
- <template #icon><svg-icon name="import" color="#262626" /></template
|
|
|
- >批量导入
|
|
|
- </t-button>
|
|
|
- </upload-button>
|
|
|
- <t-button variant="outline" @click="multExport">
|
|
|
<template #icon><svg-icon name="export" color="#262626" /></template
|
|
|
>批量导出
|
|
|
</t-button>
|
|
|
<t-button
|
|
|
+ v-if="perm.BUTTON_BatchDeliver"
|
|
|
variant="outline"
|
|
|
:disabled="!selectedRowKeys.length"
|
|
|
@click="handleOperate('DELIVER')"
|
|
@@ -24,6 +42,7 @@
|
|
|
>批量发货
|
|
|
</t-button>
|
|
|
<t-button
|
|
|
+ v-if="perm.BUTTON_BatchReceive"
|
|
|
variant="outline"
|
|
|
:disabled="!selectedRowKeys.length"
|
|
|
@click="handleOperate('RECEIVE')"
|
|
@@ -32,6 +51,7 @@
|
|
|
>批量签收
|
|
|
</t-button>
|
|
|
<t-button
|
|
|
+ v-if="perm.BUTTON_BatchCancel"
|
|
|
variant="outline"
|
|
|
:disabled="!selectedRowKeys.length"
|
|
|
@click="handleOperate('CANCEL')"
|
|
@@ -93,14 +113,14 @@
|
|
|
theme="primary"
|
|
|
hover="color"
|
|
|
@click="handleEdit(row)"
|
|
|
- v-if="row.status == 'UN_DELIVER'"
|
|
|
+ v-if="row.status == 'UN_DELIVER' && perm.LINK_Update"
|
|
|
>
|
|
|
修改
|
|
|
</t-link>
|
|
|
<t-link
|
|
|
theme="primary"
|
|
|
hover="color"
|
|
|
- v-if="row.status == 'UN_DELIVER'"
|
|
|
+ v-if="row.status == 'UN_DELIVER' && perm.LINK_Cancel"
|
|
|
@click="handleOperate('CANCEL', [row.id])"
|
|
|
>
|
|
|
作废
|
|
@@ -108,7 +128,7 @@
|
|
|
<t-link
|
|
|
theme="primary"
|
|
|
hover="color"
|
|
|
- v-if="row.status == 'UN_DELIVER'"
|
|
|
+ v-if="row.status == 'UN_DELIVER' && perm.LINK_Deliver"
|
|
|
@click="handleOperate('DELIVER', [row.id])"
|
|
|
>
|
|
|
发货
|
|
@@ -116,7 +136,7 @@
|
|
|
<t-link
|
|
|
theme="primary"
|
|
|
hover="color"
|
|
|
- v-if="row.status == 'DELIVER' && !row.crmNo"
|
|
|
+ v-if="row.status == 'DELIVER' && !row.crmNo && perm.LINK_Receive"
|
|
|
@click="handleOperate('RECEIVE', [row.id])"
|
|
|
>
|
|
|
签收
|
|
@@ -149,6 +169,7 @@ import { DEVICE_SEND_STATUS, DEVICE_USAGE_TYPE } from '@/config/constants';
|
|
|
import usePermission from '@/hooks/usePermission';
|
|
|
import EditDeviceInfoDialog from './edit-device-info-dialog.vue';
|
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
|
+import { downloadImportTemplate } from '@/api/common';
|
|
|
const { perm } = usePermission();
|
|
|
|
|
|
const curRow = ref(null);
|