This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
<ElButton type="primary" @click="showCreateDialog" v-permission="'exchange:create'">
|
||||
创建换货单
|
||||
</ElButton>
|
||||
<ElButton v-if="hasAuth('exchange:export')" @click="exportDialogVisible = true">
|
||||
导出
|
||||
</ElButton>
|
||||
</template>
|
||||
</ArtTableHeader>
|
||||
|
||||
@@ -41,6 +44,14 @@
|
||||
</template>
|
||||
</ArtTable>
|
||||
|
||||
<ExportTaskCreateDialog
|
||||
v-model="exportDialogVisible"
|
||||
scene="exchange"
|
||||
:query="exportQuery"
|
||||
confirm-permission="exchange:export"
|
||||
title="导出换货"
|
||||
/>
|
||||
|
||||
<!-- 创建换货单对话框 -->
|
||||
<ElDialog
|
||||
v-model="createDialogVisible"
|
||||
@@ -393,6 +404,7 @@
|
||||
import type { SearchFormItem } from '@/types'
|
||||
import { useCheckedColumns } from '@/composables/useCheckedColumns'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
import ExportTaskCreateDialog from '@/components/business/ExportTaskCreateDialog.vue'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import {
|
||||
getApprovalStatusText,
|
||||
@@ -413,6 +425,7 @@
|
||||
const shipFormRef = ref<FormInstance>()
|
||||
const createDialogVisible = ref(false)
|
||||
const createLoading = ref(false)
|
||||
const exportDialogVisible = ref(false)
|
||||
const tableRef = ref()
|
||||
const createFormRef = ref<FormInstance>()
|
||||
|
||||
@@ -438,6 +451,18 @@
|
||||
created_at_end: ''
|
||||
})
|
||||
|
||||
const exportQuery = computed(() => {
|
||||
const [startDate, endDate] = searchForm.created_at_range || []
|
||||
return {
|
||||
status: searchForm.status,
|
||||
flow_type: searchForm.flow_type,
|
||||
old_asset_keyword: searchForm.old_asset_keyword || undefined,
|
||||
new_asset_keyword: searchForm.new_asset_keyword || undefined,
|
||||
created_at_start: startDate || searchForm.created_at_start || undefined,
|
||||
created_at_end: endDate || searchForm.created_at_end || undefined
|
||||
}
|
||||
})
|
||||
|
||||
// 创建换货单表单
|
||||
const createForm = reactive<{
|
||||
exchange_reason: string
|
||||
|
||||
Reference in New Issue
Block a user