|
@@ -1,8 +1,9 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
+ import { useModal, useModalInner } from '/@/components/Modal';
|
|
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
- import { useModalInner } from '/@/components/Modal';
|
|
|
|
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
import { useTable } from '/@/components/Table';
|
|
import { useTable } from '/@/components/Table';
|
|
|
|
+ import classImportVue from './classImport.vue';
|
|
import { textbookColumns } from '/@/views/educational/textbookSubscription/components/data.config';
|
|
import { textbookColumns } from '/@/views/educational/textbookSubscription/components/data.config';
|
|
import {
|
|
import {
|
|
getWfTextbookSubscriptionInstockroomList,
|
|
getWfTextbookSubscriptionInstockroomList,
|
|
@@ -15,6 +16,8 @@
|
|
wfTextbookSubscriptionId.value = data.id;
|
|
wfTextbookSubscriptionId.value = data.id;
|
|
reload();
|
|
reload();
|
|
});
|
|
});
|
|
|
|
+ const [modalRef, { openModal }] = useModal();
|
|
|
|
+
|
|
const [tableReg, { getDataSource, reload }] = useTable({
|
|
const [tableReg, { getDataSource, reload }] = useTable({
|
|
title: '教材征订表',
|
|
title: '教材征订表',
|
|
api: getWfTextbookSubscriptionInstockroomList,
|
|
api: getWfTextbookSubscriptionInstockroomList,
|
|
@@ -22,6 +25,7 @@
|
|
immediate: false,
|
|
immediate: false,
|
|
showTableSetting: true,
|
|
showTableSetting: true,
|
|
bordered: true,
|
|
bordered: true,
|
|
|
|
+ resizeHeightOffset: 200,
|
|
beforeFetch: (params) => {
|
|
beforeFetch: (params) => {
|
|
return {
|
|
return {
|
|
wfTextbookSubscriptionId: wfTextbookSubscriptionId.value,
|
|
wfTextbookSubscriptionId: wfTextbookSubscriptionId.value,
|
|
@@ -49,24 +53,36 @@
|
|
setModalProps({
|
|
setModalProps({
|
|
confirmLoading: true,
|
|
confirmLoading: true,
|
|
});
|
|
});
|
|
- await postWfTextbookSubscriptionInstockroom(getDataSource(), 'none');
|
|
|
|
|
|
+ await postWfTextbookSubscriptionInstockroom(
|
|
|
|
+ getDataSource().filter((item) => item.inNum),
|
|
|
|
+ 'none',
|
|
|
|
+ );
|
|
createMessage.success('操作成功');
|
|
createMessage.success('操作成功');
|
|
closeModal();
|
|
closeModal();
|
|
} catch (e) {
|
|
} catch (e) {
|
|
- console.log(e);
|
|
|
|
|
|
+ createMessage.error('操作失败');
|
|
} finally {
|
|
} finally {
|
|
setModalProps({
|
|
setModalProps({
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+ const handleExport = () => {
|
|
|
|
+ openModal(true);
|
|
|
|
+ };
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
- <BasicModal @ok="handleSubmit" title="教材入库" default-fullscreen @register="register">
|
|
|
|
|
|
+ <BasicModal
|
|
|
|
+ @ok="handleSubmit"
|
|
|
|
+ title="教材入库"
|
|
|
|
+ v-bind="$attrs"
|
|
|
|
+ default-fullscreen
|
|
|
|
+ @register="register"
|
|
|
|
+ >
|
|
<BasicTable @register="tableReg">
|
|
<BasicTable @register="tableReg">
|
|
<template #toolbar>
|
|
<template #toolbar>
|
|
- <a-button type="primary">导入</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="handleExport">导入</a-button>
|
|
</template>
|
|
</template>
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
<a-input-number
|
|
<a-input-number
|
|
@@ -78,6 +94,7 @@
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</BasicTable>
|
|
</BasicTable>
|
|
|
|
+ <classImportVue @register="modalRef" />
|
|
</BasicModal>
|
|
</BasicModal>
|
|
</template>
|
|
</template>
|
|
|
|
|