Browse Source

fix: change textbook

DESKTOP-USV654P\pc 2 months ago
parent
commit
9df8ca2c0c

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 commit:
 	git add . && \
-	git commit --no-verify -m "fix: change canteenEvaluation template"
+	git commit --no-verify -m "fix: change textbook"
 
 checkPre:
 	git checkout pre

+ 0 - 6
src/services/apis/ImportRubAndHandController.ts

@@ -23,10 +23,4 @@ export async function postImportRubAndHandInternshipPlan(params:any,mode: ErrorM
 /** 实习信息模板下载 POST /ImportRubAndHand/internship_plan-template */
 export async function postImportRubAndHandInternshipPlanTemplate(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.post<string>
         ({url: '/ImportRubAndHand/internship_plan-template',headers:{'Content-Type':'multipart/form-data'}, data:params},{errorMessageMode:mode});}
-/** 教材信息导入 POST /ImportRubAndHand/textbook */
-export async function postImportRubAndHandTextbook(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
-        ({url: '/ImportRubAndHand/textbook',headers:{'Content-Type':'multipart/form-data'}, data:params},{errorMessageMode:mode});}
-/** 教材信息模板下载 POST /ImportRubAndHand/textbook-template */
-export async function postImportRubAndHandTextbookTemplate(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.post<string>
-        ({url: '/ImportRubAndHand/textbook-template',headers:{'Content-Type':'multipart/form-data'}, data:params},{errorMessageMode:mode});}
             

+ 6 - 4
src/services/apis/TextbookController.ts

@@ -25,10 +25,6 @@ export async function deleteTextbookTextbook(params:string[],mode: ErrorMessageM
 /** 教材管理列表(不分页,教材征订用) GET /textbook/textbook/List-subscription */
 export async function getTextbookListSubscription(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.TextbookSubscriptionListVo[]>
         ({url: '/textbook/textbook/List-subscription', params:params},{errorMessageMode:mode});}
-/** 教材管理入库 POST /textbook/textbook/deliver-warehouse */
-export async function postTextbookDeliverWarehouse(params:API.AddTextbookWarehouseRecordDto
-,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
-        ({url: '/textbook/textbook/deliver-warehouse', data:params},{errorMessageMode:mode});}
 /** 根据isnn查询教材管理信息 GET /textbook/textbook/info-byissn */
 export async function getTextbookInfoByissn(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.TextbookVo>
         ({url: '/textbook/textbook/info-byissn', params:params},{errorMessageMode:mode});}
@@ -60,6 +56,9 @@ export async function getTextbookPageSubscription(params:any,mode: ErrorMessageM
 export async function postTextbookTextbookClaimExportQuery(params:API.TextbookClaimExportQueryDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/textbook/textbook/textbook-claim-export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
+/** 教材信息导入 POST /textbook/textbook/textbook-import */
+export async function postTextbookTextbookImport(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/textbook/textbook/textbook-import',headers:{'Content-Type':'multipart/form-data'}, data:params},{errorMessageMode:mode});}
 /** 台账条件导出 POST /textbook/textbook/textbook-standing-export-query */
 export async function postTextbookTextbookStandingExportQuery(params:API.TextbookStandingExportQuerytDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
@@ -68,4 +67,7 @@ export async function postTextbookTextbookStandingExportQuery(params:API.Textboo
 export async function postTextbookTextbookSubscriptionExportQuery(params:API.TextbookSubscriptionExportQueryDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.download<string>
         ({url: '/textbook/textbook/textbook-subscription-export-query',responseType:'blob',method:'POST', data:params},{errorMessageMode:mode});}
+/** 教材信息模板下载 POST /textbook/textbook/textbook-template-download */
+export async function postTextbookTextbookTemplateDownload(mode: ErrorMessageMode = 'modal'){ return defHttp.post<string>
+        ({url: '/textbook/textbook/textbook-template-download', data:{}},{errorMessageMode:mode});}
             

+ 66 - 0
src/services/apis/TextbookSubscriptionController.ts

@@ -0,0 +1,66 @@
+// @ts-ignore
+/* eslint-disable */
+
+// 该文件自动生成,请勿手动修改!
+import { defHttp } from '/@/utils/http/axios';
+import { ErrorMessageMode } from '/#/axios';
+            // --------------------------------------------------------------------------
+            // Textbook Subscription Controller
+            // --------------------------------------------------------------------------
+
+            ;
+
+
+            /** 新增教材教辅征订记录表 POST /textbook/textbookSubscription */
+export async function postTextbookTextbookSubscription(params:API.AddTextbookSubscriptionDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/textbook/textbookSubscription', data:params},{errorMessageMode:mode});}
+/** 修改教材教辅征订记录表 PUT /textbook/textbookSubscription */
+export async function putTextbookTextbookSubscription(params:API.UpdateTextbookSubscriptionDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/textbook/textbookSubscription', data:params},{errorMessageMode:mode});}
+/** 删除教材教辅征订记录表 DELETE /textbook/textbookSubscription */
+export async function deleteTextbookTextbookSubscription(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
+        ({url: '/textbook/textbookSubscription', data:params},{errorMessageMode:mode});}
+/** 征订班级列表(分页) GET /textbook/textbookSubscription/baseclass-page */
+export async function getTextbookSubscriptionBaseclassPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.BaseclassPageVo>>
+        ({url: '/textbook/textbookSubscription/baseclass-page', params:params},{errorMessageMode:mode});}
+/** 修改征订状态 PUT /textbook/textbookSubscription/change-status */
+export async function putTextbookSubscriptionChangeStatus(params:API.UpdateWfTextbookSubscriptionDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/textbook/textbookSubscription/change-status', data:params},{errorMessageMode:mode});}
+/** 根据id查询教材教辅征订详情 GET /textbook/textbookSubscription/detail */
+export async function getTextbookSubscriptionDetail(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.TextbookSubscriptionDetailVo>
+        ({url: '/textbook/textbookSubscription/detail', params:params},{errorMessageMode:mode});}
+/** 教材教辅征订每次入库详情 GET /textbook/textbookSubscription/every-instockroom-list */
+export async function getTextbookSubscriptionEveryInstockroomList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.TextbookInstockroomOnceListVo[]>
+        ({url: '/textbook/textbookSubscription/every-instockroom-list', params:params},{errorMessageMode:mode});}
+/** 导出 GET /textbook/textbookSubscription/export */
+export async function getTextbookSubscriptionExport(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.download<any>
+        ({url: '/textbook/textbookSubscription/export',responseType:'blob', params:params},{errorMessageMode:mode});}
+/** 导入 POST /textbook/textbookSubscription/import */
+export async function postTextbookSubscriptionImport(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/textbook/textbookSubscription/import',headers:{'Content-Type':'multipart/form-data'}, data:params},{errorMessageMode:mode});}
+/** 根据id查询教材教辅征订记录表信息 GET /textbook/textbookSubscription/info */
+export async function getTextbookSubscriptionInfo(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.TextbookSubscriptionVo>
+        ({url: '/textbook/textbookSubscription/info', params:params},{errorMessageMode:mode});}
+/** 手动填写入库 POST /textbook/textbookSubscription/instockroom */
+export async function postTextbookSubscriptionInstockroom(params:API.TextbookInstockroomDto[]
+,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/textbook/textbookSubscription/instockroom', data:params},{errorMessageMode:mode});}
+/** 导入入库 POST /textbook/textbookSubscription/instockroom-excel-import */
+export async function postTextbookSubscriptionInstockroomExcelImport(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.post<any>
+        ({url: '/textbook/textbookSubscription/instockroom-excel-import',headers:{'Content-Type':'multipart/form-data'}, data:params},{errorMessageMode:mode});}
+/** 教材教辅征订入库用页面 GET /textbook/textbookSubscription/instockroom-list */
+export async function getTextbookSubscriptionInstockroomList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.TextbookInstockroomListVo[]>
+        ({url: '/textbook/textbookSubscription/instockroom-list', params:params},{errorMessageMode:mode});}
+/** 教材教辅征订明细列表(分页) GET /textbook/textbookSubscription/item-page */
+export async function getTextbookSubscriptionItemPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.TextbookSubscriptionItemPageVo>>
+        ({url: '/textbook/textbookSubscription/item-page', params:params},{errorMessageMode:mode});}
+/** 教材教辅征订记录表列表(不分页) GET /textbook/textbookSubscription/list */
+export async function getTextbookSubscriptionList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.TextbookSubscriptionListVo[]>
+        ({url: '/textbook/textbookSubscription/list', params:params},{errorMessageMode:mode});}
+/** 教材教辅征订记录列表(分页) GET /textbook/textbookSubscription/page */
+export async function getTextbookSubscriptionPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.TextbookSubscriptionPageVo>>
+        ({url: '/textbook/textbookSubscription/page', params:params},{errorMessageMode:mode});}
+            

+ 0 - 3
src/services/apis/WfTextbookSubscriptionController.ts

@@ -26,9 +26,6 @@ export async function deleteTextbookWfTextbookSubscription(params:string[],mode:
 export async function putWfTextbookSubscriptionAlteration(params:API.UpdateWfTextbookSubscriptionItemDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
         ({url: '/textbook/wfTextbookSubscription/alteration', data:params},{errorMessageMode:mode});}
-/** 征订班级列表(分页) GET /textbook/wfTextbookSubscription/baseclass-page */
-export async function getWfTextbookSubscriptionBaseclassPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.BaseclassPageVo>>
-        ({url: '/textbook/wfTextbookSubscription/baseclass-page', params:params},{errorMessageMode:mode});}
 /** 修改教材教辅征订状态 PUT /textbook/wfTextbookSubscription/change-status */
 export async function putWfTextbookSubscriptionChangeStatus(params:API.UpdateWfTextbookSubscriptionDto
 ,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>

+ 3 - 0
src/services/apis/index.ts

@@ -209,6 +209,7 @@ import * as TextbookController from './TextbookController';
 import * as TextbookCoreAttributeController from './TextbookCoreAttributeController';
 import * as TextbookIssueRecordController from './TextbookIssueRecordController';
 import * as TextbookStudentClaimController from './TextbookStudentClaimController';
+import * as TextbookSubscriptionController from './TextbookSubscriptionController';
 import * as TextbookWarehouseRecordController from './TextbookWarehouseRecordController';
 import * as WfTextbookClaimController from './WfTextbookClaimController';
 import * as WfTextbookRecedeController from './WfTextbookRecedeController';
@@ -639,6 +640,8 @@ TextbookCoreAttributeController,
 TextbookIssueRecordController,
 /** Textbook Student Claim Controller */
 TextbookStudentClaimController,
+/** Textbook Subscription Controller */
+TextbookSubscriptionController,
 /** Textbook Warehouse Record Controller */
 TextbookWarehouseRecordController,
 /** Wf Textbook Claim Controller */

+ 237 - 41
src/services/typing.d.ts

@@ -3678,6 +3678,8 @@ textbookId?: string;
 }
 
 type AddTextbookSubscriptionDto = {
+/** 按班级征订征订的班级主键(base_class) */
+baseClassIds?: string;
 /** 学期id(base_semester) */
 baseSemesterId?: string;
 /** 备注 */
@@ -3722,8 +3724,6 @@ type AddTextbookWarehouseRecordDto = {
 discount?: number;
 /** 定价(元) */
 price?: number;
-/** 序号 */
-sortCode?: number;
 /** 来源 */
 source?: string;
 /** 小计(元) */
@@ -14088,6 +14088,14 @@ total?: number;
 totalPage?: number;
 }
 
+type PageOutput<TextbookSubscriptionItemPageVo> = {
+currentPage?: number;
+list?: TextbookSubscriptionItemPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
 type PageOutput<TextbookSubscriptionListVo> = {
 currentPage?: number;
 list?: TextbookSubscriptionListVo[];
@@ -14096,6 +14104,14 @@ total?: number;
 totalPage?: number;
 }
 
+type PageOutput<TextbookSubscriptionPageVo> = {
+currentPage?: number;
+list?: TextbookSubscriptionPageVo[];
+pageSize?: number;
+total?: number;
+totalPage?: number;
+}
+
 type PageOutput<TextbookWarehouseRecordPageVo> = {
 currentPage?: number;
 list?: TextbookWarehouseRecordPageVo[];
@@ -17587,17 +17603,6 @@ textbookId?: string;
 textbookStudentClaimId?: string;
 }
 
-type TextbookClassRelationVo = {
-/** 班级编号 */
-classId?: string;
-/** 主键编号 */
-id?: string;
-/** 序号 */
-sortCode?: number;
-/** 教材管理编号 */
-textbookId?: string;
-}
-
 type TextbookConsumptionPageVo = {
 /** 书名 */
 bookName?: string;
@@ -17666,29 +17671,33 @@ sortCode?: number;
 }
 
 type TextbookInstockroomDto = {
-/** 教材教辅征订项编号 */
-id?: string;
 /** 本次入库数量 */
 inNum?: number;
 /** 教材教辅征订编号 */
-wfTextbookSubscriptionId?: string;
+textbookSubscriptionId?: string;
+/** 教材教辅征订项编号 */
+textbookSubscriptionItemId?: string;
 }
 
 type TextbookInstockroomListVo = {
+/** 实际价格(元) */
+actualPrice?: number;
 /** 书名 */
 bookName?: string;
 /** 课程 */
 courseName?: string;
 /** 课程编号(base_course_subject) */
 courseSubjectId?: string;
+/** 实际折扣 */
+discount?: number;
 /** 主编 */
 editorInChief?: string;
-/** 征订项编号 */
-id?: string;
-/** 已入库数量 */
-inStockroomNum?: number;
+/** 当前征订任务征订项总入库数量 */
+inStockNum?: number;
 /** 国际标准刊号 */
 issn?: string;
+/** 定价(元) */
+price?: number;
 /** 出版社 */
 publishingHouse?: string;
 /** 学生用书征订数量 */
@@ -17699,16 +17708,63 @@ subscriptionNumber?: number;
 teacherSubscriptionNumber?: number;
 /** 教材编号 */
 textbookId?: string;
+/** 教材教辅征订编号 */
+textbookSubscriptionId?: string;
+/** 征订项编号 */
+textbookSubscriptionItemId?: string;
 /** 教材类型(xjr_dictionary_item[textbook_type]) */
 textbookType?: string;
 /** 教材类型(xjr_dictionary_item[textbook_type]) */
 textbookTypeCn?: string;
 /** 使用类型(单位:学期) */
 useType?: number;
-/** 版本 */
-version?: string;
+}
+
+type TextbookInstockroomOnceListVo = {
+/** 实际价格(元) */
+actualPrice?: number;
+/** 书名 */
+bookName?: string;
+/** 课程 */
+courseName?: string;
+/** 课程编号(base_course_subject) */
+courseSubjectId?: string;
+/** 创建时间 */
+createDate?: string;
+/** 创建人 */
+createUserId?: string;
+/** 实际折扣 */
+discount?: number;
+/** 主编 */
+editorInChief?: string;
+/** 当前征订任务征订项总入库数量 */
+inStockNum?: number;
+/** 国际标准刊号 */
+issn?: string;
+/** 单次入库数量 */
+onceInStockNum?: number;
+/** 定价(元) */
+price?: number;
+/** 出版社 */
+publishingHouse?: string;
+/** 学生用书征订数量 */
+studentSubscriptionNumber?: number;
+/** 教材征订总数量 */
+subscriptionNumber?: number;
+/** 教师教材征订数量 */
+teacherSubscriptionNumber?: number;
+/** 教材编号 */
+textbookId?: string;
 /** 教材教辅征订编号 */
-wfTextbookSubscriptionId?: string;
+textbookSubscriptionId?: string;
+/** 征订项编号 */
+textbookSubscriptionItemId?: string;
+/** 教材类型(xjr_dictionary_item[textbook_type]) */
+textbookType?: string;
+/** 教材类型(xjr_dictionary_item[textbook_type]) */
+textbookTypeCn?: string;
+/** 使用类型(单位:学期) */
+useType?: number;
 }
 
 type TextbookIssueRecordExportDto = {
@@ -17914,6 +17970,19 @@ baseSemesterIdCN?: string;
 notClaimNum?: string;
 }
 
+type TextbookSubscriptionDetailVo = {
+/** 证订记录主键编号 */
+id?: string;
+/** 学生用书征订数量 */
+studentTatolNum?: number;
+/** 征订教材总数 */
+sum?: number;
+/** 总金额 */
+sumPrice?: number;
+/** 教师用书征订数量 */
+teacherTatolNum?: number;
+}
+
 type TextbookSubscriptionExportQueryDto = {
 /** 学期id */
 baseSemesterId?: string;
@@ -17945,6 +18014,86 @@ studentSubscriptionNumber?: number;
 teacherSubscriptionNumber?: number;
 }
 
+type TextbookSubscriptionItemPageVo = {
+/** 变更类型(0:未变更,1:变更征订数量,2:变更课程) */
+alterationType?: number;
+/** 书名 */
+bookName?: string;
+/** 课程编号(base_course_subject) */
+courseSubjectId?: string;
+/** 课程编号(base_course_subject) */
+courseSubjectIdCn?: string;
+/** 实际折扣 */
+discount?: number;
+/** 主编 */
+editorInChief?: string;
+/** 主键编号 */
+id?: string;
+/** 当前征订任务征订项入库数量 */
+inStockNum?: number;
+/** 国际标准刊号 */
+issn?: string;
+/** 当前征订任务征订项出库数量 */
+outStockNum?: number;
+/** 实际价格(元) */
+price?: number;
+/** 出版社 */
+publishingHouse?: string;
+/** 学生用书征订数量 */
+studentNum?: number;
+/** 教师用书征订数量 */
+teacherNum?: number;
+/** 教材表主键(textbook) */
+textbookId?: string;
+/** 教材教辅增订记录表主键(textbook_subscription) */
+textbookSubscriptionId?: string;
+/** 教材分类(xjr_dictionary_item[textbook_type]) */
+textbookType?: string;
+/** 教材分类(xjr_dictionary_item[textbook_type]) */
+textbookTypeCn?: string;
+}
+
+type TextbookSubscriptionItemVo = {
+/** 变更类型(0:未变更,1:变更征订数量,2:变更课程) */
+alterationType?: number;
+/** 书名 */
+bookName?: string;
+/** 课程编号(base_course_subject) */
+courseSubjectId?: string;
+/** 课程编号(base_course_subject) */
+courseSubjectIdCn?: string;
+/** 实际折扣 */
+discount?: number;
+/** 主编 */
+editorInChief?: string;
+/** 主键编号 */
+id?: string;
+/** 当前征订任务征订项入库数量 */
+inStockNum?: number;
+/** 国际标准刊号 */
+issn?: string;
+/** 当前征订任务征订项出库数量 */
+outStockNum?: number;
+/** 实际价格(元) */
+price?: number;
+/** 出版社 */
+publishingHouse?: string;
+/** 序号 */
+sortCode?: number;
+/** 学生用书征订数量 */
+studentNum?: number;
+/** 教师用书征订数量 */
+teacherNum?: number;
+/** 教材表主键(textbook) */
+textbookId?: string;
+/** 教材教辅增订记录表主键(textbook_subscription) */
+textbookSubscriptionId?: string;
+/** 教材分类(xjr_dictionary_item[textbook_type]) */
+textbookType?: string;
+/** 教材分类(xjr_dictionary_item[textbook_type]) */
+textbookTypeCn?: string;
+}
+
 type TextbookSubscriptionListVo = {
 /** 书名 */
 bookName?: string;
@@ -17976,6 +18125,23 @@ useType?: number;
 version?: string;
 }
 
+type TextbookSubscriptionPageVo = {
+/** 学期ID(base_semester) */
+baseSemesterId?: string;
+/** 学期ID(base_semester) */
+baseSemesterIdCn?: string;
+/** 主键编号 */
+id?: string;
+/** 备注 */
+remark?: string;
+/** 状态(1:待发起 2:征订中 3:待入库 4:已入库) */
+status?: number;
+/** 征订方式(1:按班级征订 2:按教材征订) */
+subscriptionMethod?: number;
+/** 征订教材总数 */
+sum?: number;
+}
+
 type TextbookSubscriptionRecordVo = {
 /** 征订人 */
 applicantUser?: string;
@@ -18015,29 +18181,44 @@ teacherSubscriptionNumber?: number;
 useClass?: string;
 }
 
-type TextbookVo = {
-/** 估价(元) */
-appraisalPrice?: number;
-/** 学期ID(base_semester) */
+type TextbookSubscriptionVo = {
+/** 学期id(base_semester) */
 baseSemesterId?: string;
+/** 主键编号 */
+id?: string;
+/** 备注 */
+remark?: string;
+/** 序号 */
+sortCode?: number;
+/** 征订状态(1:结束 0:未结束) */
+status?: number;
+/** 征订方式(1:按班级征订 2:按教材征订) */
+subscriptionMethod?: number;
+/** 征订教材总数 */
+sum?: number;
+/** textbookSubscriptionItem子表 */
+textbookSubscriptionItemList?: TextbookSubscriptionItemVo[];
+}
+
+type TextbookVo = {
 /** 书名 */
 bookName?: string;
 /** 分类号 */
 category?: string;
 /** 课程编号(base_course_subject) */
 courseSubjectId?: string;
-/** 折扣 */
+/** 预估折扣 */
 discount?: number;
 /** 主编 */
 editorInChief?: string;
-/** 入学年级(base_grade) */
-gradeId?: string;
 /** 主键编号 */
 id?: string;
 /** 是否校企合作开发教材 */
 isSecd?: number;
-/** 是否为规划教材(xjr_dictionary_item[judgment_method_1]) */
-isTextbookPlan?: string;
+/** 是否为规划教材 */
+isTextbookPlan?: number;
+/** 国际标准书号 */
+isbn?: string;
 /** 国际标准刊号 */
 issn?: string;
 /** 规划批次 */
@@ -18048,19 +18229,15 @@ price?: number;
 publishingDate?: string;
 /** 出版社 */
 publishingHouse?: string;
+/** 序号 */
+sortCode?: number;
 /** 规格型号 */
 specificationsModels?: string;
-/** 库存 */
-stock?: number;
 /** 学科组管理编号(subject_group) */
 subjectGroupId?: string;
-/** 小计(元) */
-subtotal?: number;
 /** 教材类型 */
 textbookCategory?: string;
-/** 使用班级 */
-textbookClassRelationList?: TextbookClassRelationVo[];
-/** 教材类型(xjr_dictionary_item[textbook_type]) */
+/** 教材分类(xjr_dictionary_item[textbook_type]) */
 textbookType?: string;
 /** 使用类型(单位:学期) */
 useType?: number;
@@ -21618,6 +21795,27 @@ studentUserId?: string;
 textbookId?: string;
 }
 
+type UpdateTextbookSubscriptionDto = {
+/** 按班级征订征订的班级主键(base_class) */
+baseClassIds?: string;
+/** 学期id(base_semester) */
+baseSemesterId?: string;
+/** 主键编号 */
+id?: string;
+/** 备注 */
+remark?: string;
+/** 序号 */
+sortCode?: number;
+/** 征订状态(0:待发起,1:证订中,2:完成) */
+status?: number;
+/** 征订方式(1:按班级征订 2:按教材征订) */
+subscriptionMethod?: number;
+/** 征订教材总数 */
+sum?: number;
+/** textbookSubscriptionItem子表 */
+textbookSubscriptionItemList?: AddTextbookSubscriptionItemDto[];
+}
+
 type UpdateTextbookWarehouseRecordDto = {
 /** 折扣 */
 discount?: number;
@@ -21625,8 +21823,6 @@ discount?: number;
 id?: string;
 /** 定价(元) */
 price?: number;
-/** 序号 */
-sortCode?: number;
 /** 来源 */
 source?: string;
 /** 小计(元) */

+ 6 - 8
src/views/educational/textbookSubscription/components/classImport.vue

@@ -1,15 +1,13 @@
 <script setup lang="ts">
   import BasicModal from '/@/components/Modal/src/BasicModal.vue';
-  import { useModal, useModalInner } from '/@/components/Modal';
+  import { useModalInner } from '/@/components/Modal';
   import Upload from '/@/components/Form/src/components/Upload.vue';
   import { ref } from 'vue';
   import { useMessage } from '/@/hooks/web/useMessage';
-  import { baseDownloadFileUrl, downloadByData } from '/@/utils/file/download';
-  import {
-    postWfTextbookSubscriptionInstockroomExcelImport,
-    postWfTextbookSubscriptionTextbookSubscriptionExportQuery,
-  } from '/@/services/apis/WfTextbookSubscriptionController';
+  import { downloadByData } from '/@/utils/file/download';
+  import { postWfTextbookSubscriptionTextbookSubscriptionExportQuery } from '/@/services/apis/WfTextbookSubscriptionController';
   import { formatToDate } from '/@/utils/dateUtil';
+  import { postTextbookSubscriptionInstockroomExcelImport } from '/@/services/apis/TextbookSubscriptionController';
   const wfTextbookSubscriptionId = ref('');
   const [modalRegister, { closeModal }] = useModalInner((data) => {
     wfTextbookSubscriptionId.value = data.wfTextbookSubscriptionId;
@@ -23,8 +21,8 @@
   };
   const handleSubmit = async () => {
     try {
-      await postWfTextbookSubscriptionInstockroomExcelImport(
-        { wfTextbookSubscriptionId: wfTextbookSubscriptionId.value, file: data.value },
+      await postTextbookSubscriptionInstockroomExcelImport(
+        { textbookSubscriptionId: wfTextbookSubscriptionId.value, file: data.value },
         'none',
       );
       createMessage.success('导入成功');

+ 35 - 10
src/views/educational/textbookSubscription/components/data.config.ts

@@ -3,12 +3,16 @@ import { requestMagicApi } from '/@/api/magicApi';
 import { h } from 'vue';
 import { getDataOption } from '/@/api/system/dic';
 export const subscription = {
-  1: '待发起',
-  2: '征订中',
-  3: '待入库',
-  4: '已入库',
+  0: '待发起',
+  1: '征订中',
+  2: '完成',
 };
 export const tableColumns: BasicColumn[] = [
+  {
+    title: '征订单号',
+    dataIndex: 'id',
+    width: 200,
+  },
   {
     title: '使用学期',
     dataIndex: 'baseSemesterIdCn',
@@ -33,7 +37,7 @@ export const tableColumns: BasicColumn[] = [
   },
   {
     title: '征订教材总数',
-    dataIndex: 'sumNumber',
+    dataIndex: 'sum',
     width: 150,
   },
   {
@@ -176,6 +180,11 @@ export const textbookColumns: BasicColumn[] = [
     width: 150,
     align: 'left',
   },
+  {
+    title: '类型',
+    dataIndex: 'textbookTypeCn',
+    width: 100,
+  },
   {
     title: '版次',
     dataIndex: 'version',
@@ -183,11 +192,6 @@ export const textbookColumns: BasicColumn[] = [
     width: 150,
   },
 
-  {
-    title: '类型',
-    dataIndex: 'textbookTypeCn',
-    width: 100,
-  },
   {
     title: '使用类型',
     dataIndex: 'useType',
@@ -212,6 +216,27 @@ export const textbookColumns: BasicColumn[] = [
       default: 'teacherSubscriptionNumber',
     },
   },
+  {
+    title: '定价',
+    dataIndex: 'sourcePrice',
+    width: 80,
+  },
+  {
+    title: '折扣',
+    dataIndex: 'discount',
+    width: 100,
+    slots: {
+      default: 'discount',
+    },
+  },
+  {
+    title: '价格',
+    dataIndex: 'price',
+    width: 100,
+    slots: {
+      default: 'price',
+    },
+  },
   {
     title: '操作',
     dataIndex: 'action',

+ 117 - 26
src/views/educational/textbookSubscription/components/edit.vue

@@ -1,8 +1,8 @@
 <script setup lang="ts">
   import BasicModal from '/@/components/Modal/src/BasicModal.vue';
-  import { useModal } from '/@/components/Modal';
+  import { useModal, useModalInner } from '/@/components/Modal';
   import { Steps } from 'ant-design-vue';
-  import { ref } from 'vue';
+  import { ref, unref } from 'vue';
   import { useTable } from '/@/components/Table';
   import BasicForm from '/@/components/Form/src/BasicForm.vue';
   import { useForm } from '/@/components/Form';
@@ -10,21 +10,27 @@
   import BasicTable from '/@/components/Table/src/BasicTable.vue';
   import addTextbook from './addTextbook.vue';
   import selectModalVue from './selectModal.vue';
-  import { getTextbookPageSubscription } from '/@/services/apis/TextbookController';
-  import { postTextbookWfTextbookSubscription } from '/@/services/apis/WfTextbookSubscriptionController';
+  import { getTextbookListSubscription } from '/@/services/apis/TextbookController';
   import { useMessage } from '/@/hooks/web/useMessage';
   import historyView from './historyView.vue';
   import { requestMagicApi } from '/@/api/magicApi';
+  import {
+    getTextbookSubscriptionInfo,
+    postTextbookTextbookSubscription,
+    putTextbookTextbookSubscription,
+  } from '/@/services/apis/TextbookSubscriptionController';
   const step = Steps.Step;
   const selectRow = ref<any>([]);
   const thisStep = ref(0);
   const dataInfo = ref<any>({});
   const selectUserList = ref<any>([]);
-  const [modalReg, { closeModal }] = useModal();
+  const isUpdate = ref(true);
+  const modelRef = ref({});
+
   const [addReg, { openModal: addModelOpen }] = useModal();
   const [historyViewReg, { openModal: historyViewOpen }] = useModal();
   const emits = defineEmits(['success']);
-  const [formReg, { validate, resetFields }] = useForm({
+  const [formReg, { validate, resetFields, setFieldsValue }] = useForm({
     labelWidth: 120,
     schemas: [
       {
@@ -55,7 +61,7 @@
       },
       {
         label: '征订方式',
-        field: 'baseOrderTypeId',
+        field: 'subscriptionMethod',
         component: 'Select',
         required: true,
         componentProps: () => {
@@ -86,6 +92,44 @@
     ],
     showActionButtonGroup: false,
   });
+
+  const handleChangeDiscount = (record) => {
+    if (record.discount < 1) {
+      record.discount = 1;
+    }
+    if (record.discount > 10) {
+      record.discount = 10;
+    }
+    record.price = Number((Number(record.sourcePrice || 0) * record.discount) / 10).toFixed(2);
+  };
+
+  const handleChangePrice = (record) => {
+    if (record.price !== 0) {
+      record.discount = Number(((record.price / record.sourcePrice) * 10).toFixed(1));
+    } else {
+      record.discount = 0;
+    }
+  };
+
+  const [modalReg, { closeModal }] = useModalInner(async (data) => {
+    isUpdate.value = !!data?.isUpdate;
+    modelRef.value = { ...data.baseData };
+
+    if (unref(isUpdate)) {
+      const resData = await getTextbookSubscriptionInfo({ id: data.baseData.id });
+      modelRef.value = { ...resData };
+      setFieldsValue(resData);
+
+      resData.textbookSubscriptionItemList.forEach((item: any) => {
+        item.studentSubscriptionNumber = item.studentNum;
+        item.teacherSubscriptionNumber = item.teacherNum;
+        item.courseName = item.courseSubjectIdCn;
+        item.sourcePrice = item.pricing;
+      });
+
+      setTableData(resData.textbookSubscriptionItemList);
+    }
+  });
   const handleChange = () => {
     setTableData([]);
     selectUserList.value = [];
@@ -115,6 +159,7 @@
         selectRow.value = selectedRowKeys;
       },
     },
+    pagination: false,
   });
   const handleAdd = () => {
     addModelOpen(true, {
@@ -126,6 +171,9 @@
     const addList: any[] = [];
     e.forEach((item: any) => {
       if (!data.find((i: any) => i.id === item.id)) {
+        item.sourcePrice = item.price;
+        item.textbookId = item.id;
+        handleChangeDiscount(item);
         addList.push(item);
       }
     });
@@ -143,26 +191,53 @@
   const handleSelect = async (e) => {
     selectUserList.value = e.classList;
     const ids = selectUserList.value.map((item: any) => item.id);
-    const { list } = await getTextbookPageSubscription({
+    const data = await getTextbookListSubscription({
       classIds: ids.join(','),
       baseSemesterId: dataInfo.value.baseSemesterId,
     });
-    setTableData(list);
+
+    data.forEach((item: any) => {
+      item.sourcePrice = item.price;
+      handleChangeDiscount(item);
+    });
+    setTableData(data);
   };
   const { createMessage } = useMessage();
   const handleSubmit = async () => {
-    if (getDataSource().length === 0) {
+    const dataSoruce = getDataSource();
+
+    if (dataSoruce.length === 0) {
       createMessage.warning('至少征订一本教材');
       return;
     }
-    const params = {
+
+    dataSoruce.forEach((item: any) => {
+      item.studentNum = item.studentSubscriptionNumber;
+      item.teacherNum = item.teacherSubscriptionNumber;
+    });
+
+    const postParams = unref(modelRef);
+    Object.assign(postParams, {
       remark: dataInfo.value?.remark,
-      subscriptionMethod: dataInfo.value.baseOrderTypeId,
+      subscriptionMethod: dataInfo.value.subscriptionMethod,
       baseSemesterId: dataInfo.value.baseSemesterId,
-      wfTextbookSubscriptionItemList: getDataSource(),
-    };
+      textbookSubscriptionItemList: getDataSource(),
+      baseClassIds: dataSoruce[0].classIds,
+    });
+
+    // const params = {
+    //   remark: dataInfo.value?.remark,
+    //   subscriptionMethod: dataInfo.value.subscriptionMethod,
+    //   baseSemesterId: dataInfo.value.baseSemesterId,
+    //   textbookSubscriptionItemList: getDataSource(),
+    //   baseClassIds: dataSoruce[0].classIds,
+    // };
     try {
-      await postTextbookWfTextbookSubscription(params, 'none');
+      if (isUpdate.value) {
+        await putTextbookTextbookSubscription(postParams, 'none');
+      } else {
+        await postTextbookTextbookSubscription(postParams, 'none');
+      }
       createMessage.success('新增成功');
       emits('success');
       thisStep.value = 0;
@@ -201,14 +276,14 @@
         <BasicForm @register="formReg" />
       </div>
       <div v-show="thisStep === 1" class="mt-[24px] w-full">
-        <div v-if="dataInfo && dataInfo.baseOrderTypeId == 2">
+        <div v-if="dataInfo && dataInfo.subscriptionMethod == 2">
           <span class="required">征订教材</span>
           <a-button type="primary" class="ml-[12px]" @click="handleAdd">选择教材</a-button>
         </div>
         <div
           @click="selectModalOpen(true, { classList: selectUserList })"
           class="flex flex-row items-center mt-[24px]"
-          v-if="dataInfo && dataInfo.baseOrderTypeId == 1"
+          v-if="dataInfo && dataInfo.subscriptionMethod == 1"
         >
           <span class="required">用书班级</span>
           <div
@@ -249,11 +324,27 @@
             <template #teacherSubscriptionNumber="{ record }">
               <a-input-number :step="1" :min="0" v-model:value="record.teacherSubscriptionNumber" />
             </template>
+            <template #discount="{ record }">
+              <a-input-number
+                :step="1"
+                :min="0"
+                v-model:value="record.discount"
+                @change="handleChangeDiscount(record)"
+              />
+            </template>
+            <template #price="{ record }">
+              <a-input-number
+                :step="1"
+                :min="0"
+                v-model:value="record.price"
+                @change="handleChangePrice(record)"
+              />
+            </template>
             <template #action="{ record }">
               <a-button type="link" @click="handleClear(record.id)">移出</a-button>
-              <a-button type="link" @click="handleViewHistory(record.textbookId)"
-                >历史征订</a-button
-              >
+              <a-button type="link" @click="handleViewHistory(record.textbookId)">
+                历史征订
+              </a-button>
             </template>
           </BasicTable>
         </div>
@@ -261,12 +352,12 @@
       <div class="mt-[24px] ml-[120px]">
         <a-button @click="handleClose">取消</a-button>
         <a-button v-show="thisStep === 1" @click="thisStep = 0" class="ml-[24px]">上一步</a-button>
-        <a-button v-show="thisStep === 0" type="primary" @click="handleNext" class="ml-[24px]"
-          >下一步</a-button
-        >
-        <a-button v-show="thisStep === 1" type="primary" class="ml-[24px]" @click="handleSubmit"
-          >提交</a-button
-        >
+        <a-button v-show="thisStep === 0" type="primary" @click="handleNext" class="ml-[24px]">
+          下一步
+        </a-button>
+        <a-button v-show="thisStep === 1" type="primary" class="ml-[24px]" @click="handleSubmit">
+          提交
+        </a-button>
       </div>
     </div>
     <addTextbook @register="addReg" @success="handleSuccess" />

+ 13 - 4
src/views/educational/textbookSubscription/components/textBookPop.vue

@@ -6,7 +6,6 @@
   import classImportVue from './classImport.vue';
   import { textbookColumns } from '/@/views/educational/textbookSubscription/components/data.config';
   import {
-    getWfTextbookSubscriptionInstockroomList,
     postWfTextbookSubscriptionInstockroom,
     postWfTextbookSubscriptionTextbookSubscriptionExportQuery,
   } from '/@/services/apis/WfTextbookSubscriptionController';
@@ -14,6 +13,10 @@
   import { useMessage } from '/@/hooks/web/useMessage';
   import { downloadByData } from '/@/utils/file/download';
   import { formatToDate } from '/@/utils/dateUtil';
+  import {
+    getTextbookSubscriptionInstockroomList,
+    postTextbookSubscriptionInstockroom,
+  } from '/@/services/apis/TextbookSubscriptionController';
   const wfTextbookSubscriptionId = ref('');
   const [register, { closeModal, setModalProps }] = useModalInner((data) => {
     wfTextbookSubscriptionId.value = data.id;
@@ -23,7 +26,7 @@
 
   const [tableReg, { getDataSource, reload }] = useTable({
     title: '教材征订表',
-    api: getWfTextbookSubscriptionInstockroomList,
+    api: getTextbookSubscriptionInstockroomList,
     pagination: false,
     immediate: false,
     showTableSetting: true,
@@ -31,7 +34,7 @@
     resizeHeightOffset: 200,
     beforeFetch: (params) => {
       return {
-        wfTextbookSubscriptionId: wfTextbookSubscriptionId.value,
+        textbookSubscriptionId: wfTextbookSubscriptionId.value,
         ...params,
       };
     },
@@ -48,6 +51,12 @@
         width: 120,
       },
     ],
+    afterFetch: (data) => {
+      data.forEach((item) => {
+        item.sourcePrice = item.price;
+      });
+      return data;
+    },
   });
 
   const { createMessage } = useMessage();
@@ -56,7 +65,7 @@
       setModalProps({
         confirmLoading: true,
       });
-      await postWfTextbookSubscriptionInstockroom(
+      await postTextbookSubscriptionInstockroom(
         getDataSource().filter((item) => item.inNum),
         'none',
       );

+ 2 - 2
src/views/educational/textbookSubscription/components/view.vue

@@ -7,7 +7,6 @@
   import changeTextBookVue from './changeTextBook.vue';
   import { ClassColumns, historySchema, historyTableColumns } from './data.config';
   import {
-    getWfTextbookSubscriptionBaseclassPage,
     getWfTextbookSubscriptionInfo,
     postWfTextbookSubscriptionTextbookSubscriptionExportQuery,
   } from '/@/services/apis/WfTextbookSubscriptionController';
@@ -16,6 +15,7 @@
   import { useMessage } from '/@/hooks/web/useMessage';
   import { downloadByData } from '/@/utils/file/download';
   import { formatToDate } from '/@/utils/dateUtil';
+  import { getTextbookSubscriptionBaseclassPage } from '/@/services/apis/TextbookSubscriptionController';
   const visible = ref(false);
   const dataInfo = ref<any>({});
   const itemId = ref<any>(null);
@@ -54,7 +54,7 @@
   });
   const [viewTableReg, { reload }] = useTable({
     title: '使用班级',
-    api: getWfTextbookSubscriptionBaseclassPage,
+    api: getTextbookSubscriptionBaseclassPage,
     beforeFetch: (params) => {
       return {
         ...params,

+ 27 - 15
src/views/educational/textbookSubscription/index.vue

@@ -6,13 +6,14 @@
   import edit from './components/edit.vue';
   import textBookPopVue from './components/textBookPop.vue';
   import { useModal } from '/@/components/Modal';
-  import {
-    deleteTextbookWfTextbookSubscription,
-    getWfTextbookSubscriptionPage,
-    putWfTextbookSubscriptionChangeStatus,
-  } from '/@/services/apis/WfTextbookSubscriptionController';
+
   import TableAction from '/@/components/Table/src/components/TableAction.vue';
   import View from './components/view.vue';
+  import {
+    getTextbookSubscriptionPage,
+    deleteTextbookTextbookSubscription,
+    putTextbookSubscriptionChangeStatus,
+  } from '/@/services/apis/TextbookSubscriptionController';
   const [editReg, { openModal }] = useModal();
   const [viewReg, { openModal: openViewModal }] = useModal();
   const [popReg, { openModal: openTextBookPopModal }] = useModal();
@@ -20,7 +21,7 @@
     title: '征订记录表',
     showTableSetting: true,
     bordered: true,
-    api: getWfTextbookSubscriptionPage,
+    api: getTextbookSubscriptionPage,
     columns: tableColumns,
     useSearchForm: true,
     formConfig: {
@@ -28,26 +29,32 @@
       schemas: searchFormSchema,
     },
   });
+  const handleEdit = (record: any, isUpdate: boolean) => {
+    openModal(true, {
+      baseData: { ...record },
+      isUpdate: isUpdate,
+    });
+  };
 </script>
 
 <template>
   <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
     <BasicTable @register="tableReg">
       <template #toolbar>
-        <a-button type="primary" @click="openModal(true)">新增</a-button>
+        <a-button type="primary" @click="handleEdit({}, false)">新增</a-button>
       </template>
       <template #action="{ record }">
         <TableAction
           :actions="[
             {
-              ifShow: () => [1, 2, 3].includes(record.status),
-              label: record.status === 1 ? '发起' : record.status === 2 ? '完成' : '确认入库',
+              ifShow: () => [0, 1].includes(record.status),
+              label: record.status === 0 ? '发起' : record.status === 2 ? '完成' : '征订中',
               popConfirm: {
                 title: `是否改变状态?`,
                 confirm: async () => {
-                  await putWfTextbookSubscriptionChangeStatus({
+                  await putTextbookSubscriptionChangeStatus({
                     id: record.id,
-                    status: record.status === 1 ? 2 : record.status === 2 ? 4 : 4,
+                    status: record.status === 0 ? 1 : 2,
                   });
                   await reload();
                 },
@@ -57,23 +64,28 @@
               },
             },
             {
-              ifShow: record.status === 2,
+              ifShow: record.status === 1,
               label: '教材入库',
               onClick: () => openTextBookPopModal(true, record),
             },
             {
-              ifShow: () => [2, 3, 4].includes(record.status),
+              ifShow: () => [1, 2].includes(record.status),
               label: '征订明细',
               onClick: () => openViewModal(true, record),
             },
             {
-              ifShow: () => record.status === 1,
+              ifShow: () => record.status === 0,
+              label: '编辑',
+              onClick: () => handleEdit(record, true),
+            },
+            {
+              ifShow: () => record.status === 0,
               label: '删除',
               color: 'error',
               popConfirm: {
                 title: '是否确认删除',
                 confirm: async () => {
-                  await deleteTextbookWfTextbookSubscription([record.id]);
+                  await deleteTextbookTextbookSubscription([record.id]);
                   await reload();
                 },
                 cancel: () => {

+ 113 - 91
src/views/teachingManager/textbookManagement/components/data.config.ts

@@ -3,7 +3,6 @@ import { requestMagicApi } from '/@/api/magicApi';
 import { getDataOption } from '/@/api/system/dic';
 import { getSubjectGroupInfo } from '/@/services/apis/SubjectGroupController';
 import { getTextbookInfoByissn } from '/@/services/apis/TextbookController';
-import { getMajorSetOption } from '/@/api/userMagic';
 export const type = {
   0: '菜单',
   1: '目录',
@@ -73,30 +72,44 @@ export const TableColumns: BasicColumn[] = [
     title: '规划教材',
     dataIndex: 'isTextbookPlanCn',
     customRender: ({ text }) => {
-      return text ? text : '/';
+      return text === 1 ? '是' : '否';
     },
   },
   {
-    title: '教材分类',
-    dataIndex: 'textbookTypeCn',
+    title: '规划批次',
+    dataIndex: 'planBatch',
     customRender: ({ text }) => {
       return text ? text : '/';
     },
   },
+  // {
+  //   title: '是否校企合作开发教材',
+  //   dataIndex: 'isSecd',
+  //   customRender: ({ text }) => {
+  //     return text === 1 ? '是' : '否';
+  //   },
+  // },
   {
-    title: '规格型号',
-    dataIndex: 'specificationsModels',
+    title: '教材分类',
+    dataIndex: 'textbookTypeCn',
     customRender: ({ text }) => {
       return text ? text : '/';
     },
   },
   {
-    title: '估价(元)',
-    dataIndex: 'appraisalPrice',
+    title: '规格型号',
+    dataIndex: 'specificationsModels',
     customRender: ({ text }) => {
       return text ? text : '/';
     },
   },
+  // {
+  //   title: '估价(元)',
+  //   dataIndex: 'appraisalPrice',
+  //   customRender: ({ text }) => {
+  //     return text ? text : '/';
+  //   },
+  // },
   {
     title: '定价(元)',
     dataIndex: 'price',
@@ -111,20 +124,20 @@ export const TableColumns: BasicColumn[] = [
       return text ? text : '/';
     },
   },
-  {
-    title: '小计(元)',
-    dataIndex: 'subtotal',
-    customRender: ({ text }) => {
-      return text ? text : '/';
-    },
-  },
-  {
-    title: '库存(本、册)',
-    dataIndex: 'stock',
-    customRender: ({ text }) => {
-      return text ? text : '/';
-    },
-  },
+  // {
+  //   title: '小计(元)',
+  //   dataIndex: 'subtotal',
+  //   customRender: ({ text }) => {
+  //     return text ? text : '/';
+  //   },
+  // },
+  // {
+  //   title: '库存(本、册)',
+  //   dataIndex: 'stock',
+  //   customRender: ({ text }) => {
+  //     return text ? text : '/';
+  //   },
+  // },
   {
     title: '操作',
     dataIndex: 'action',
@@ -204,10 +217,12 @@ export const formSchema: FormSchema[] = [
   {
     label: '规划教材',
     field: 'isTextbookPlan',
-    component: 'ApiSelect',
+    component: 'RadioButtonGroup',
     componentProps: {
-      api: getDataOption,
-      params: { code: 'judgment_method_1' },
+      options: [
+        { label: '是', value: 1 },
+        { label: '否', value: 0 },
+      ],
     },
     required: true,
     colProps: { span: 12 },
@@ -218,29 +233,29 @@ export const formSchema: FormSchema[] = [
     component: 'InputNumber',
     defaultValue: 0,
     required: true,
-    componentProps: ({ formModel }) => {
-      return {
-        min: 0,
-        onChange: (e) => {
-          if (e !== 0) {
-            formModel.discount = ((formModel.subtotal / e) * 10).toFixed(1);
-          } else {
-            formModel.discount = 0;
-          }
-        },
-      };
-    },
-    colProps: { span: 12 },
-  },
-  {
-    label: '估价(元)',
-    field: 'appraisalPrice',
-    component: 'InputNumber',
-    componentProps: {
-      min: 0,
-    },
+    // componentProps: ({ formModel }) => {
+    //   return {
+    //     min: 0,
+    //     onChange: (e) => {
+    //       if (e !== 0) {
+    //         formModel.discount = ((formModel.subtotal / e) * 10).toFixed(1);
+    //       } else {
+    //         formModel.discount = 0;
+    //       }
+    //     },
+    //   };
+    // },
     colProps: { span: 12 },
   },
+  // {
+  //   label: '估价(元)',
+  //   field: 'appraisalPrice',
+  //   component: 'InputNumber',
+  //   componentProps: {
+  //     min: 0,
+  //   },
+  //   colProps: { span: 12 },
+  // },
   {
     label: '使用时长',
     field: 'useType',
@@ -258,50 +273,50 @@ export const formSchema: FormSchema[] = [
     },
     colProps: { span: 12 },
   },
-  {
-    field: 'subtotal',
-    label: '小计(元)',
-    component: 'InputNumber',
-    defaultValue: 0,
-    required: true,
-    colProps: { span: 12 },
-    dynamicDisabled: true,
-    componentProps: ({ formModel }) => {
-      return {
-        min: 0,
-        onChange: (e) => {
-          if (!e) {
-            return false;
-          }
-          if (formModel.price !== 0) {
-            formModel.discount = ((e / formModel.price) * 10).toFixed(1);
-          } else {
-            formModel.discount = 0;
-          }
-        },
-      };
-    },
-  },
+  // {
+  //   field: 'subtotal',
+  //   label: '小计(元)',
+  //   component: 'InputNumber',
+  //   defaultValue: 0,
+  //   required: true,
+  //   colProps: { span: 12 },
+  //   dynamicDisabled: true,
+  //   componentProps: ({ formModel }) => {
+  //     return {
+  //       min: 0,
+  //       onChange: (e) => {
+  //         if (!e) {
+  //           return false;
+  //         }
+  //         if (formModel.price !== 0) {
+  //           formModel.discount = ((e / formModel.price) * 10).toFixed(1);
+  //         } else {
+  //           formModel.discount = 0;
+  //         }
+  //       },
+  //     };
+  //   },
+  // },
   {
     label: '折扣(折)',
     field: 'discount',
     component: 'InputNumber',
-    componentProps: ({ formModel }) => {
-      return {
-        onChange: (e) => {
-          if (e < 1) {
-            e = 1;
-          }
-          if (e > 10) {
-            e = 10;
-          }
-          formModel.subtotal = (((formModel.price || 0) * e) / 10).toFixed(2);
-          // if (formModel.price && formModel.subtotal) {
-          //   formModel.subtotal = (formModel.price * e).toFixed(2);
-          // }
-        },
-      };
-    },
+    // componentProps: ({ formModel }) => {
+    //   return {
+    //     onChange: (e) => {
+    //       if (e < 1) {
+    //         e = 1;
+    //       }
+    //       if (e > 10) {
+    //         e = 10;
+    //       }
+    //       formModel.subtotal = (((formModel.price || 0) * e) / 10).toFixed(2);
+    //       if (formModel.price && formModel.subtotal) {
+    //         formModel.subtotal = (formModel.price * e).toFixed(2);
+    //       }
+    //     },
+    //   };
+    // },
     // dynamicDisabled: true,
     colProps: { span: 12 },
   },
@@ -368,12 +383,12 @@ export const formSchema: FormSchema[] = [
   {
     label: '校企合作教材',
     field: 'isSecd',
-    component: 'Switch',
-    // required: true,
-    colProps: { span: 12 },
+    component: 'RadioButtonGroup',
     componentProps: {
-      checkedChildren: '是',
-      unCheckedChildren: '否',
+      options: [
+        { label: '是', value: 1 },
+        { label: '否', value: 0 },
+      ],
     },
   },
   {
@@ -395,6 +410,13 @@ export const formSchema: FormSchema[] = [
     // required: true,
     colProps: { span: 12 },
   },
+  {
+    label: '规格型号',
+    field: 'specificationsModels',
+    component: 'Input',
+    // required: true,
+    colProps: { span: 12 },
+  },
   {
     label: '规划批次',
     field: 'planBatch',

+ 3 - 1
src/views/teachingManager/textbookManagement/components/formEdit.vue

@@ -11,6 +11,7 @@
     postTextbookTextbook,
     putTextbookTextbook,
   } from '/@/services/apis/TextbookController';
+  import { formatToDate } from '/@/utils/dateUtil';
   const taskId = ref('');
   const isUpdate = ref();
   const [register, { closeDrawer }] = useDrawerInner(async (data) => {
@@ -19,6 +20,7 @@
 
     if (isUpdate.value) {
       const dataInfo = await getTextbookInfoDetail({ id: data.id });
+      dataInfo.publishingDate = formatToDate(dataInfo.publishingDate);
       await setFieldsValue({ ...dataInfo });
       await setFieldsValue({
         classId: dataInfo.textbookClassRelationList.map((item) => item.classId),
@@ -51,7 +53,7 @@
       });
     });
     delete data.classId;
-
+    data['isbn'] = data['issn'];
     try {
       if (isUpdate.value) {
         data.id = taskId.value;

+ 2 - 2
src/views/teachingManager/textbookManagement/components/pushView.vue

@@ -4,7 +4,7 @@
   import { pushFormSchema } from './data.config';
   import BasicForm from '/@/components/Form/src/BasicForm.vue';
   import { useForm } from '/@/components/Form';
-  import { postTextbookDeliverWarehouse } from '/@/services/apis/TextbookController';
+  // import { postTextbookDeliverWarehouse } from '/@/services/apis/TextbookController';
   import { useMessage } from '/@/hooks/web/useMessage';
   const [fromReg, { setFieldsValue, validateFields, resetFields, clearValidate }] = useForm({
     schemas: pushFormSchema,
@@ -21,7 +21,7 @@
   const handleSubmit = async () => {
     const data = await validateFields();
     try {
-      await postTextbookDeliverWarehouse({ ...(data as API.AddTextbookWarehouseRecordDto) });
+      // await postTextbookDeliverWarehouse({ ...(data as API.AddTextbookWarehouseRecordDto) });
       createMessage.success('入库成功');
     } catch (error) {
       createMessage.error('新增失败');

+ 2 - 2
src/views/teachingManager/textbookManagement/index.vue

@@ -17,7 +17,7 @@
     postTextbookTextbookClaimExportQuery,
     postTextbookTextbookSubscriptionExportQuery,
     postTextbookTextbookStandingExportQuery,
-    postTextbookExcelImport,
+    postTextbookTextbookImport,
   } from '/@/services/apis/TextbookController';
   import { useModal } from '/@/components/Modal';
   import infoView from './components/infoView.vue';
@@ -91,7 +91,7 @@
     openImportModal(true, {
       baseData: {
         title: '导入教材信息',
-        upload: postTextbookExcelImport,
+        upload: postTextbookTextbookImport,
         params: {},
         errorName: '导入教材信息错误数据',
         templatePath: