|
@@ -25,6 +25,17 @@
|
|
|
</template>
|
|
</template>
|
|
|
发起盘点
|
|
发起盘点
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ class="search-table-container--button"
|
|
|
|
|
+ v-if="emergencySupplyPermissions"
|
|
|
|
|
+ @click="handleExportDiscarded"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <SvgIcon iconName="inventory-check" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ 导出报废记录
|
|
|
|
|
+ </el-button>
|
|
|
<BasicSearch
|
|
<BasicSearch
|
|
|
:searchConfig="SUPPLY_LIST_SEARCH_CONFIG"
|
|
:searchConfig="SUPPLY_LIST_SEARCH_CONFIG"
|
|
|
:searchData="searchData"
|
|
:searchData="searchData"
|
|
@@ -101,6 +112,7 @@
|
|
|
<div class="action-container--div">
|
|
<div class="action-container--div">
|
|
|
<ActionButton text="查看" @click="handleViewDetail(scope.row.id)" />
|
|
<ActionButton text="查看" @click="handleViewDetail(scope.row.id)" />
|
|
|
<ActionButton text="编辑" v-if="emergencySupplyPermissions" @click="handleEditSupply(scope.row.id)" />
|
|
<ActionButton text="编辑" v-if="emergencySupplyPermissions" @click="handleEditSupply(scope.row.id)" />
|
|
|
|
|
+ <ActionButton text="报废" @click="handleOpenDiscard(scope.row)" />
|
|
|
<ActionButton
|
|
<ActionButton
|
|
|
text="删除"
|
|
text="删除"
|
|
|
v-if="emergencySupplyPermissions"
|
|
v-if="emergencySupplyPermissions"
|
|
@@ -116,6 +128,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<InventoryTask ref="inventoryTaskRef" />
|
|
<InventoryTask ref="inventoryTaskRef" />
|
|
|
|
|
+ <ExportDiscardedRecords ref="ExportDiscardedRecordsRef" />
|
|
|
|
|
+ <DiscardSupplies ref="DiscardSuppliesRef" @refresh-list="getTableData" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
@@ -129,6 +143,8 @@
|
|
|
import BasicTable from '@/components/BasicTable.vue';
|
|
import BasicTable from '@/components/BasicTable.vue';
|
|
|
import ActionButton from '@/components/ActionButton.vue';
|
|
import ActionButton from '@/components/ActionButton.vue';
|
|
|
import InventoryTask from './src/components/InventoryTask.vue';
|
|
import InventoryTask from './src/components/InventoryTask.vue';
|
|
|
|
|
+ import ExportDiscardedRecords from './src/components/ExportDiscardedRecords.vue';
|
|
|
|
|
+ import DiscardSupplies from './src/components/DiscardSupplies.vue';
|
|
|
import {
|
|
import {
|
|
|
SUPPLY_LIST_SEARCH_CONFIG,
|
|
SUPPLY_LIST_SEARCH_CONFIG,
|
|
|
SUPPLY_LIST_TABLE_COLUMNS,
|
|
SUPPLY_LIST_TABLE_COLUMNS,
|
|
@@ -226,10 +242,16 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const inventoryTaskRef = ref<InstanceType<typeof InventoryTask>>();
|
|
const inventoryTaskRef = ref<InstanceType<typeof InventoryTask>>();
|
|
|
|
|
+ const ExportDiscardedRecordsRef = ref<InstanceType<typeof ExportDiscardedRecords>>();
|
|
|
|
|
+ const DiscardSuppliesRef = ref<InstanceType<typeof DiscardSupplies>>();
|
|
|
const handleInventory = () => {
|
|
const handleInventory = () => {
|
|
|
inventoryTaskRef.value?.openDialog();
|
|
inventoryTaskRef.value?.openDialog();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const handleExportDiscarded = () => {
|
|
|
|
|
+ ExportDiscardedRecordsRef.value?.openDialog();
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const defaultRouterName = 'emergency-list-info';
|
|
const defaultRouterName = 'emergency-list-info';
|
|
|
const handleAddSupply = () => {
|
|
const handleAddSupply = () => {
|
|
|
router.push({
|
|
router.push({
|
|
@@ -247,6 +269,10 @@
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ const handleOpenDiscard = (item: EmergencySupplyListResponse) => {
|
|
|
|
|
+ DiscardSuppliesRef.value?.openDialog(item);
|
|
|
|
|
+ };
|
|
|
const handleViewDetail = (id: number) => {
|
|
const handleViewDetail = (id: number) => {
|
|
|
router.push({
|
|
router.push({
|
|
|
name: 'emergency-list-detail',
|
|
name: 'emergency-list-detail',
|