|
@@ -5,19 +5,18 @@
|
|
|
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
|
import changeHistoryVue from './changeHistory.vue';
|
|
|
import changeTextBookVue from './changeTextBook.vue';
|
|
|
- import { ClassColumns, historySchema, historyTableColumns } from './data.config';
|
|
|
+ import ClassDetail from './classDetail.vue';
|
|
|
+ import { historySchema, historyTableColumns } from './data.config';
|
|
|
import { postWfTextbookSubscriptionTextbookSubscriptionExportQuery } from '/@/services/apis/WfTextbookSubscriptionController';
|
|
|
- import { nextTick, ref } from 'vue';
|
|
|
- import { Modal } from 'ant-design-vue';
|
|
|
+ import { ref } from 'vue';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { downloadByData } from '/@/utils/file/download';
|
|
|
import { formatToDate } from '/@/utils/dateUtil';
|
|
|
import {
|
|
|
- getTextbookSubscriptionBaseclassPage,
|
|
|
getTextbookSubscriptionDetail,
|
|
|
getTextbookSubscriptionItemPage,
|
|
|
} from '/@/services/apis/TextbookSubscriptionController';
|
|
|
- const visible = ref(false);
|
|
|
+ defineEmits(['success', 'register']);
|
|
|
const dataInfo = ref<any>({});
|
|
|
const itemId = ref<any>(null);
|
|
|
const status = ref<any>(null);
|
|
@@ -30,6 +29,7 @@
|
|
|
});
|
|
|
const [changeHistoryRef, { openModal: openChangeHistory }] = useModal();
|
|
|
const [changeRef, { openModal }] = useModal();
|
|
|
+ const [classDetailRef, { openModal: openClassDetailModal }] = useModal();
|
|
|
const [tableReg, { reload: reloadHistory }] = useTable({
|
|
|
title: '教材征订表',
|
|
|
columns: historyTableColumns,
|
|
@@ -51,24 +51,12 @@
|
|
|
});
|
|
|
},
|
|
|
});
|
|
|
- const [viewTableReg, { reload }] = useTable({
|
|
|
- title: '使用班级',
|
|
|
- api: getTextbookSubscriptionBaseclassPage,
|
|
|
- beforeFetch: (params) => {
|
|
|
- return {
|
|
|
- ...params,
|
|
|
- id: itemId.value,
|
|
|
- };
|
|
|
- },
|
|
|
- immediate: false,
|
|
|
- columns: ClassColumns,
|
|
|
- bordered: true,
|
|
|
- resizeHeightOffset: 400,
|
|
|
- });
|
|
|
- const handleView = () => {
|
|
|
- visible.value = true;
|
|
|
- nextTick(() => {
|
|
|
- reload();
|
|
|
+
|
|
|
+ const handleView = (record: Recordable) => {
|
|
|
+ openClassDetailModal(true, {
|
|
|
+ baseData: {
|
|
|
+ ...record,
|
|
|
+ },
|
|
|
});
|
|
|
};
|
|
|
const { createMessage } = useMessage();
|
|
@@ -111,9 +99,13 @@
|
|
|
<span>总征订数量</span>
|
|
|
<span class="mt-[6px] font-bold">{{ dataInfo?.sum }}</span>
|
|
|
</div>
|
|
|
- <div class="flex flex-col justify-center" v-if="dataInfo?.classIds">
|
|
|
+ <div class="flex flex-col justify-center">
|
|
|
<span>征订班级</span>
|
|
|
- <a @click="handleView">查看</a>
|
|
|
+ <a @click="handleView({ id: itemId })">查看</a>
|
|
|
+ </div>
|
|
|
+ <div class="flex flex-col justify-center">
|
|
|
+ <span>征订总金额(元)</span>
|
|
|
+ <span class="mt-[6px] font-bold">{{ dataInfo?.sumPrice }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -132,15 +124,16 @@
|
|
|
变更
|
|
|
</a-button>
|
|
|
</template>
|
|
|
+ <template #classNum="{ text, record }">
|
|
|
+ <div @click="handleView({ id: itemId, textbookSubscriptionItemId: record.id })">
|
|
|
+ {{ text }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</BasicTable>
|
|
|
- <Modal width="1000px" v-model:visible="visible" title="查看">
|
|
|
- <div class="h-[700px]">
|
|
|
- <BasicTable @register="viewTableReg" />
|
|
|
- </div>
|
|
|
- </Modal>
|
|
|
</div>
|
|
|
<changeTextBookVue @register="changeRef" @success="reloadHistory()" />
|
|
|
<changeHistoryVue @register="changeHistoryRef" />
|
|
|
+ <ClassDetail @register="classDetailRef" />
|
|
|
</BasicModal>
|
|
|
</template>
|
|
|
|