|
|
@ -45,6 +45,16 @@ |
|
|
|
<Pagination v-model:limit="queryParams.pageSize" v-model:page="queryParams.pageNo" :total="total" |
|
|
|
@pagination="getList" /> |
|
|
|
</ContentWrap> |
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm |
|
|
|
ref="importFormRef" |
|
|
|
url="/wms/supplierdeliver-request-main/import" |
|
|
|
:importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" |
|
|
|
:updateIsDisable="true" |
|
|
|
:coverIsDisable="true" |
|
|
|
:mode="2" |
|
|
|
/> |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<AddForm ref="formRef" @success="getList" /> |
|
|
|
</template> |
|
|
@ -54,6 +64,8 @@ import { DICT_TYPE } from '@/utils/dict' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as RuleApi from '@/api/wms/rule' |
|
|
|
import AddForm from './AddForm.vue' |
|
|
|
import download from '@/utils/download' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
|
|
|
defineOptions({ name: 'SupplieDeliveryStrategy' }) |
|
|
|
const queryFormRef = ref() // 搜索的表单 |
|
|
@ -111,11 +123,7 @@ const handleDelete = async (id: number) => { |
|
|
|
getList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn(null), // 新增 |
|
|
|
] |
|
|
|
|
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
|
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
@ -143,6 +151,49 @@ const isShowMainButton = (row,val) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleExport = async () => { |
|
|
|
console.log('queryParams',queryParams) |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain( |
|
|
|
queryParams |
|
|
|
) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
/** 导入 */ |
|
|
|
const importFormRef = ref() |
|
|
|
const handleImport = () => { |
|
|
|
importFormRef.value.open() |
|
|
|
} |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn(null), // 新增 |
|
|
|
// defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), // 导入 |
|
|
|
// defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), // 导出 |
|
|
|
|
|
|
|
] |
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
const importTemplateData = reactive({ |
|
|
|
templateUrl: '', |
|
|
|
templateTitle: `【${route.meta.title}】导入模版.xlsx` |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
|
const importSuccess = () => { |
|
|
|
getList() |
|
|
|
} |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|