diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpAccount.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpAccount.java index 640534e..9cfcdd7 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpAccount.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpAccount.java @@ -1,6 +1,7 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import com.jeesite.common.entity.DataEntity; @@ -44,8 +45,8 @@ public class ErpAccount extends DataEntity implements Serializable { private String accountName; // 账户名称 private String accountType; // 账户类型 private String accountCode; // 账户卡号 - private Double initialBalance; // 初始余额 - private Double currentBalance; // 当前余额 + private BigDecimal initialBalance; // 初始余额 + private BigDecimal currentBalance; // 当前余额 private String isActive; // 是否激活 private Date updateTime; // 更新时间 diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpAccountTransfer.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpAccountTransfer.java index 6b03dee..67f6219 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpAccountTransfer.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpAccountTransfer.java @@ -1,6 +1,7 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import com.jeesite.common.mybatis.annotation.JoinTable; @@ -52,7 +53,7 @@ public class ErpAccountTransfer extends DataEntity implement private String outAccountId; // 转出账号 private String inAccountId; // 转入账号 private String categoryId; // 转账分类 - private Double transferAmount; // 转账金额 + private BigDecimal transferAmount; // 转账金额 private String transferStatus; // 转账状态 private String remark; // 转账备注 diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpBudgets.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpBudgets.java index bfa3917..84d87eb 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpBudgets.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpBudgets.java @@ -1,6 +1,7 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import com.jeesite.common.mybatis.annotation.JoinTable; @@ -48,8 +49,8 @@ public class ErpBudgets extends DataEntity implements Serializable { private String budgetId; // 唯一主键 private String categoryId; // 分类标识 private String budgetMonth; // 预算年月 - private Double budgetAmount; // 预算金额 - private Double usedAmount; // 使用金额 + private BigDecimal budgetAmount; // 预算金额 + private BigDecimal usedAmount; // 使用金额 private Double usedRatio; // 预算占比 private Double overAmount; // 超支金额 private Date updateTime; // 更新时间 diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpCategory.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpCategory.java index e2debae..cf220a7 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpCategory.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpCategory.java @@ -3,12 +3,6 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; import java.util.Date; -import com.jeesite.common.mybatis.annotation.JoinTable; -import com.jeesite.common.mybatis.annotation.JoinTable.Type; -import com.fasterxml.jackson.annotation.JsonFormat; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import jakarta.validation.constraints.NotNull; import com.jeesite.common.entity.DataEntity; import com.jeesite.common.mybatis.annotation.Column; @@ -59,9 +53,9 @@ public class ErpCategory extends DataEntity implements Serializable @ExcelField(title = "分类标识", attrName = "categoryId", align = Align.CENTER, sort = 20), @ExcelField(title = "父级名称", attrName = "parentName", align = Align.CENTER, sort = 30), @ExcelField(title = "分类名称", attrName = "categoryName", align = Align.CENTER, sort = 40), - @ExcelField(title = "分类类型", attrName = "categoryType", align = Align.CENTER, sort = 50), + @ExcelField(title = "分类类型", attrName = "categoryType", dictType = "erp_type", align = Align.CENTER, sort = 50), @ExcelField(title = "排序序号", attrName = "sortOrder", align = Align.CENTER, sort = 60), - @ExcelField(title = "是否启用", attrName = "isActive", align = Align.CENTER, sort = 70), + @ExcelField(title = "是否启用", attrName = "isActive", dictType = "is_active", align = Align.CENTER, sort = 70), @ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 80, dataFormat = "yyyy-MM-dd hh:mm"), }) public ErpCategory() { diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpDebtRecords.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpDebtRecords.java index 5b786e4..0250ff2 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpDebtRecords.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpDebtRecords.java @@ -1,6 +1,7 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import com.jeesite.common.mybatis.annotation.JoinTable; @@ -48,7 +49,7 @@ public class ErpDebtRecords extends DataEntity implements Serial private String recordId; // 唯一标识 private String debtId; // 负债标识 private String accountId; // 账户标识 - private Double repayAmount; // 还款金额 + private BigDecimal repayAmount; // 还款金额 private Date repayTime; // 还款时间 private String remark; // 备注说明 diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpDebts.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpDebts.java index f9a6c12..00ef3d1 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpDebts.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpDebts.java @@ -1,6 +1,7 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import com.jeesite.common.mybatis.annotation.JoinTable; @@ -49,8 +50,8 @@ public class ErpDebts extends DataEntity implements Serializable { private String debtId; // 唯一标识 private String debtType; // 负债类型 private String debtName; // 对方名称 - private Double debtAmount; // 借贷金额 - private Double remaining; // 未还金额 + private BigDecimal debtAmount; // 借贷金额 + private BigDecimal remaining; // 未还金额 private Date endTime; // 结清时间 private String ustatus; // 状态 diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpExpense.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpExpense.java index 6ee534c..19ea5b1 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpExpense.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpExpense.java @@ -1,14 +1,11 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import com.jeesite.common.mybatis.annotation.JoinTable; import com.jeesite.common.mybatis.annotation.JoinTable.Type; -import com.fasterxml.jackson.annotation.JsonFormat; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import jakarta.validation.constraints.NotNull; import com.jeesite.common.entity.DataEntity; import com.jeesite.common.mybatis.annotation.Column; @@ -37,6 +34,18 @@ import java.io.Serial; @Column(name = "category_id", attrName = "categoryId", label = "支出分类"), @Column(name = "amount", attrName = "amount", label = "交易金额", isQuery = false), @Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true), +}, joinTable = { + @JoinTable(type = Type.LEFT_JOIN, entity = ErpAccount.class, alias = "b", + on = "a.account_id = b.account_id", attrName = "this", + columns = { + @Column(name = "account_name", attrName = "accountName", label = "账户名称"), + }), + @JoinTable(type = Type.LEFT_JOIN, entity = ErpCategory.class, alias = "c", + on = "a.category_id = c.category_id", attrName = "this", + columns = { + @Column(name = "parent_name", attrName = "parentName", label = "父级名称"), + @Column(name = "category_name", attrName = "categoryName", label = "分类名称"), + }), }, orderBy = "a.create_time DESC" ) @Data @@ -49,15 +58,22 @@ public class ErpExpense extends DataEntity implements Serializable { private String expenseName; // 支出名称 private String accountId; // 支出账户 private String categoryId; // 支出分类 - private Double amount; // 交易金额 + private BigDecimal amount; // 交易金额 private Date updateTime; // 更新时间 + private String accountName; + + private String parentName; + + private String categoryName; + @ExcelFields({ @ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"), @ExcelField(title = "唯一标识", attrName = "expenseId", align = Align.CENTER, sort = 20), @ExcelField(title = "支出名称", attrName = "expenseName", align = Align.CENTER, sort = 30), - @ExcelField(title = "支出账户", attrName = "accountId", align = Align.CENTER, sort = 40), - @ExcelField(title = "支出分类", attrName = "categoryId", align = Align.CENTER, sort = 50), + @ExcelField(title = "支出账户", attrName = "accountName", align = Align.CENTER, sort = 40), + @ExcelField(title = "父级分类", attrName = "parentName", align = Align.CENTER, sort = 50), + @ExcelField(title = "支出分类", attrName = "categoryName", align = Align.CENTER, sort = 50), @ExcelField(title = "交易金额", attrName = "amount", align = Align.CENTER, sort = 60), @ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 70, dataFormat = "yyyy-MM-dd hh:mm"), }) diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpIncome.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpIncome.java index 6e5b8e8..1434bae 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpIncome.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpIncome.java @@ -1,11 +1,13 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import com.jeesite.common.mybatis.annotation.JoinTable; import com.jeesite.common.mybatis.annotation.JoinTable.Type; import com.fasterxml.jackson.annotation.JsonFormat; +import com.jeesite.modules.biz.entity.MyProvince; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import jakarta.validation.constraints.NotNull; @@ -37,6 +39,18 @@ import java.io.Serial; @Column(name = "category_id", attrName = "categoryId", label = "收入分类"), @Column(name = "amount", attrName = "amount", label = "交易金额", isQuery = false), @Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true), +}, joinTable = { + @JoinTable(type = Type.LEFT_JOIN, entity = ErpAccount.class, alias = "b", + on = "a.account_id = b.account_id", attrName = "this", + columns = { + @Column(name = "account_name", attrName = "accountName", label = "账户名称"), + }), + @JoinTable(type = Type.LEFT_JOIN, entity = ErpCategory.class, alias = "c", + on = "a.category_id = c.category_id", attrName = "this", + columns = { + @Column(name = "parent_name", attrName = "parentName", label = "父级名称"), + @Column(name = "category_name", attrName = "categoryName", label = "分类名称"), + }), }, orderBy = "a.create_time DESC" ) @Data @@ -49,15 +63,22 @@ public class ErpIncome extends DataEntity implements Serializable { private String incomeName; // 收入名称 private String accountId; // 收入账户 private String categoryId; // 收入分类 - private Double amount; // 交易金额 + private BigDecimal amount; // 交易金额 private Date updateTime; // 更新时间 + private String accountName; + + private String parentName; + + private String categoryName; + @ExcelFields({ @ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"), @ExcelField(title = "唯一标识", attrName = "incomeId", align = Align.CENTER, sort = 20), @ExcelField(title = "收入名称", attrName = "incomeName", align = Align.CENTER, sort = 30), - @ExcelField(title = "收入账户", attrName = "accountId", align = Align.CENTER, sort = 40), - @ExcelField(title = "收入分类", attrName = "categoryId", align = Align.CENTER, sort = 50), + @ExcelField(title = "收入账户", attrName = "accountName", align = Align.CENTER, sort = 40), + @ExcelField(title = "父级分类", attrName = "parentName", align = Align.CENTER, sort = 50), + @ExcelField(title = "收入分类", attrName = "categoryName", align = Align.CENTER, sort = 50), @ExcelField(title = "交易金额", attrName = "amount", align = Align.CENTER, sort = 60), @ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 70, dataFormat = "yyyy-MM-dd hh:mm"), }) diff --git a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpTransactionFlow.java b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpTransactionFlow.java index 87326d2..74f37d1 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpTransactionFlow.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/entity/ErpTransactionFlow.java @@ -1,6 +1,7 @@ package com.jeesite.modules.erp.entity; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import com.jeesite.common.mybatis.annotation.JoinTable; @@ -52,7 +53,7 @@ public class ErpTransactionFlow extends DataEntity implement private String flowId; // 流水 private String flowName; // 交易名称 private String flowType; // 交易类型 - private Double amount; // 交易金额 + private BigDecimal amount; // 交易金额 private Date tradeTime; // 交易时间 private String accountId; // 交易账户 private String categoryId; // 交易分类 diff --git a/web-api/src/main/java/com/jeesite/modules/erp/web/ErpCategoryController.java b/web-api/src/main/java/com/jeesite/modules/erp/web/ErpCategoryController.java index 5c8976a..265f67c 100644 --- a/web-api/src/main/java/com/jeesite/modules/erp/web/ErpCategoryController.java +++ b/web-api/src/main/java/com/jeesite/modules/erp/web/ErpCategoryController.java @@ -1,6 +1,7 @@ package com.jeesite.modules.erp.web; import java.util.List; + import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -26,6 +27,7 @@ import com.jeesite.modules.erp.service.ErpCategoryService; /** * 收支分类 Controller + * * @author gaoxq * @version 2026-03-22 */ @@ -33,114 +35,123 @@ import com.jeesite.modules.erp.service.ErpCategoryService; @RequestMapping(value = "${adminPath}/erp/category") public class ErpCategoryController extends BaseController { - private final ErpCategoryService erpCategoryService; + private final ErpCategoryService erpCategoryService; - public ErpCategoryController(ErpCategoryService erpCategoryService) { - this.erpCategoryService = erpCategoryService; - } - - /** - * 获取数据 - */ - @ModelAttribute - public ErpCategory get(String categoryId, boolean isNewRecord) { - return erpCategoryService.get(categoryId, isNewRecord); - } - - /** - * 查询列表 - */ - @RequiresPermissions("erp:category:view") - @RequestMapping(value = {"list", ""}) - public String list(ErpCategory erpCategory, Model model) { - model.addAttribute("erpCategory", erpCategory); - return "modules/erp/erpCategoryList"; - } - - /** - * 查询列表数据 - */ - @RequiresPermissions("erp:category:view") - @RequestMapping(value = "listData") - @ResponseBody - public Page listData(ErpCategory erpCategory, HttpServletRequest request, HttpServletResponse response) { - erpCategory.setPage(new Page<>(request, response)); - Page page = erpCategoryService.findPage(erpCategory); - return page; - } + public ErpCategoryController(ErpCategoryService erpCategoryService) { + this.erpCategoryService = erpCategoryService; + } - /** - * 查看编辑表单 - */ - @RequiresPermissions("erp:category:view") - @RequestMapping(value = "form") - public String form(ErpCategory erpCategory, Model model) { - model.addAttribute("erpCategory", erpCategory); - return "modules/erp/erpCategoryForm"; - } + /** + * 获取数据 + */ + @ModelAttribute + public ErpCategory get(String categoryId, boolean isNewRecord) { + return erpCategoryService.get(categoryId, isNewRecord); + } - /** - * 保存数据 - */ - @RequiresPermissions("erp:category:edit") - @PostMapping(value = "save") - @ResponseBody - public String save(@Validated ErpCategory erpCategory) { - erpCategoryService.save(erpCategory); - return renderResult(Global.TRUE, text("保存分类成功!")); - } + /** + * 查询列表 + */ + @RequiresPermissions("erp:category:view") + @RequestMapping(value = {"list", ""}) + public String list(ErpCategory erpCategory, Model model) { + model.addAttribute("erpCategory", erpCategory); + return "modules/erp/erpCategoryList"; + } - /** - * 导出数据 - */ - @RequiresPermissions("erp:category:view") - @RequestMapping(value = "exportData") - public void exportData(ErpCategory erpCategory, HttpServletResponse response) { - List list = erpCategoryService.findList(erpCategory); - String fileName = "分类" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; - try(ExcelExport ee = new ExcelExport("分类", ErpCategory.class)){ - ee.setDataList(list).write(response, fileName); - } - } + /** + * 查询列表数据 + */ + @RequiresPermissions("erp:category:view") + @RequestMapping(value = "listData") + @ResponseBody + public Page listData(ErpCategory erpCategory, HttpServletRequest request, HttpServletResponse response) { + erpCategory.setPage(new Page<>(request, response)); + Page page = erpCategoryService.findPage(erpCategory); + return page; + } - /** - * 下载模板 - */ - @RequiresPermissions("erp:category:view") - @RequestMapping(value = "importTemplate") - public void importTemplate(HttpServletResponse response) { - ErpCategory erpCategory = new ErpCategory(); - List list = ListUtils.newArrayList(erpCategory); - String fileName = "分类模板.xlsx"; - try(ExcelExport ee = new ExcelExport("分类", ErpCategory.class, Type.IMPORT)){ - ee.setDataList(list).write(response, fileName); - } - } + /** + * 查看编辑表单 + */ + @RequiresPermissions("erp:category:view") + @RequestMapping(value = "form") + public String form(ErpCategory erpCategory, Model model) { + model.addAttribute("erpCategory", erpCategory); + return "modules/erp/erpCategoryForm"; + } + + /** + * 保存数据 + */ + @RequiresPermissions("erp:category:edit") + @PostMapping(value = "save") + @ResponseBody + public String save(@Validated ErpCategory erpCategory) { + erpCategoryService.save(erpCategory); + return renderResult(Global.TRUE, text("保存分类成功!")); + } + + /** + * 导出数据 + */ + @RequiresPermissions("erp:category:view") + @RequestMapping(value = "exportData") + public void exportData(ErpCategory erpCategory, HttpServletResponse response) { + List list = erpCategoryService.findList(erpCategory); + String fileName = "分类" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; + try (ExcelExport ee = new ExcelExport("分类", ErpCategory.class)) { + ee.setDataList(list).write(response, fileName); + } + } + + /** + * 下载模板 + */ + @RequiresPermissions("erp:category:view") + @RequestMapping(value = "importTemplate") + public void importTemplate(HttpServletResponse response) { + ErpCategory erpCategory = new ErpCategory(); + List list = ListUtils.newArrayList(erpCategory); + String fileName = "分类模板.xlsx"; + try (ExcelExport ee = new ExcelExport("分类", ErpCategory.class, Type.IMPORT)) { + ee.setDataList(list).write(response, fileName); + } + } + + /** + * 导入数据 + */ + @ResponseBody + @RequiresPermissions("erp:category:edit") + @PostMapping(value = "importData") + public String importData(MultipartFile file) { + try { + String message = erpCategoryService.importData(file); + return renderResult(Global.TRUE, "posfull:" + message); + } catch (Exception ex) { + return renderResult(Global.FALSE, "posfull:" + ex.getMessage()); + } + } + + /** + * 删除数据 + */ + @RequiresPermissions("erp:category:edit") + @RequestMapping(value = "delete") + @ResponseBody + public String delete(ErpCategory erpCategory) { + erpCategoryService.delete(erpCategory); + return renderResult(Global.TRUE, text("删除分类成功!")); + } + + /** + * 列表数据 + */ + @RequestMapping(value = "listAll") + @ResponseBody + public List listAll(ErpCategory erpCategory) { + return erpCategoryService.findList(erpCategory); + } - /** - * 导入数据 - */ - @ResponseBody - @RequiresPermissions("erp:category:edit") - @PostMapping(value = "importData") - public String importData(MultipartFile file) { - try { - String message = erpCategoryService.importData(file); - return renderResult(Global.TRUE, "posfull:"+message); - } catch (Exception ex) { - return renderResult(Global.FALSE, "posfull:"+ex.getMessage()); - } - } - - /** - * 删除数据 - */ - @RequiresPermissions("erp:category:edit") - @RequestMapping(value = "delete") - @ResponseBody - public String delete(ErpCategory erpCategory) { - erpCategoryService.delete(erpCategory); - return renderResult(Global.TRUE, text("删除分类成功!")); - } - } \ No newline at end of file diff --git a/web-vue/packages/erp/views/erp/account/select.ts b/web-vue/packages/core/components/ListSelect/src/selectType/erpAccountSelect.ts similarity index 77% rename from web-vue/packages/erp/views/erp/account/select.ts rename to web-vue/packages/core/components/ListSelect/src/selectType/erpAccountSelect.ts index ecaa3da..5b9f722 100644 --- a/web-vue/packages/erp/views/erp/account/select.ts +++ b/web-vue/packages/core/components/ListSelect/src/selectType/erpAccountSelect.ts @@ -1,6 +1,6 @@ import { useI18n } from '@jeesite/core/hooks/web/useI18n'; import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table'; -import { erpAccountListData } from '@jeesite/erp/api/erp/account'; +import { ErpAccount, erpAccountListData } from '@jeesite/erp/api/erp/account'; const { t } = useI18n('erp.account'); @@ -20,12 +20,20 @@ const searchForm: FormProps = { { label: t('账户类型'), field: 'accountType', - component: 'Input', + component: 'Select', + componentProps: { + dictType: 'account_type', + allowClear: true, + }, }, { label: t('是否激活'), field: 'isActive', - component: 'Input', + component: 'Select', + componentProps: { + dictType: 'is_active', + allowClear: true, + }, }, ], }; @@ -36,16 +44,16 @@ const tableColumns: BasicColumn[] = [ dataIndex: 'createTime', key: 'a.create_time', sorter: true, - width: 230, - align: 'left', - slot: 'firstColumn', + width: 150, + align: 'center', + fixed: 'left', }, { title: t('账户名称'), dataIndex: 'accountName', key: 'a.account_name', sorter: true, - width: 130, + width: 200, align: 'left', }, { @@ -55,6 +63,7 @@ const tableColumns: BasicColumn[] = [ sorter: true, width: 130, align: 'left', + dictType: 'account_type', }, { title: t('账户卡号'), @@ -64,14 +73,6 @@ const tableColumns: BasicColumn[] = [ width: 130, align: 'left', }, - { - title: t('初始余额'), - dataIndex: 'initialBalance', - key: 'a.initial_balance', - sorter: true, - width: 130, - align: 'right', - }, { title: t('当前余额'), dataIndex: 'currentBalance', @@ -87,14 +88,7 @@ const tableColumns: BasicColumn[] = [ sorter: true, width: 130, align: 'left', - }, - { - title: t('更新时间'), - dataIndex: 'updateTime', - key: 'a.update_time', - sorter: true, - width: 130, - align: 'center', + dictType: 'is_active', }, ]; @@ -113,6 +107,6 @@ export default { modalProps, tableProps, itemCode: 'accountId', - itemName: 'accountId', - isShowCode: false, + itemName: 'accountName', + isShowCode: true, }; diff --git a/web-vue/packages/erp/views/erp/category/select.ts b/web-vue/packages/core/components/ListSelect/src/selectType/erpCategorySelect.ts similarity index 81% rename from web-vue/packages/erp/views/erp/category/select.ts rename to web-vue/packages/core/components/ListSelect/src/selectType/erpCategorySelect.ts index 81acdaa..abeffb9 100644 --- a/web-vue/packages/erp/views/erp/category/select.ts +++ b/web-vue/packages/core/components/ListSelect/src/selectType/erpCategorySelect.ts @@ -1,6 +1,6 @@ import { useI18n } from '@jeesite/core/hooks/web/useI18n'; import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table'; -import { erpCategoryListData } from '@jeesite/erp/api/erp/category'; +import { ErpCategory, erpCategoryListData } from '@jeesite/erp/api/erp/category'; const { t } = useI18n('erp.category'); @@ -20,12 +20,20 @@ const searchForm: FormProps = { { label: t('分类类型'), field: 'categoryType', - component: 'Input', + component: 'Select', + componentProps: { + dictType: 'erp_type', + allowClear: true, + }, }, { label: t('是否启用'), field: 'isActive', - component: 'Input', + component: 'Select', + componentProps: { + dictType: 'is_active', + allowClear: true, + }, }, ], }; @@ -36,9 +44,9 @@ const tableColumns: BasicColumn[] = [ dataIndex: 'createTime', key: 'a.create_time', sorter: true, - width: 230, - align: 'left', - slot: 'firstColumn', + width: 150, + align: 'center', + fixed: 'left', }, { title: t('父级名称'), @@ -63,6 +71,7 @@ const tableColumns: BasicColumn[] = [ sorter: true, width: 130, align: 'left', + dictType: 'erp_type', }, { title: t('排序序号'), @@ -79,13 +88,14 @@ const tableColumns: BasicColumn[] = [ sorter: true, width: 130, align: 'left', + dictType: 'is_active', }, { title: t('更新时间'), dataIndex: 'updateTime', key: 'a.update_time', sorter: true, - width: 130, + width: 150, align: 'center', }, ]; @@ -105,6 +115,6 @@ export default { modalProps, tableProps, itemCode: 'categoryId', - itemName: 'categoryId', - isShowCode: false, + itemName: 'categoryName', + isShowCode: true, }; diff --git a/web-vue/packages/erp/api/erp/category.ts b/web-vue/packages/erp/api/erp/category.ts index 6e63ec1..330ccb5 100644 --- a/web-vue/packages/erp/api/erp/category.ts +++ b/web-vue/packages/erp/api/erp/category.ts @@ -26,6 +26,9 @@ export interface ErpCategory extends BasicModel { export const erpCategoryList = (params?: ErpCategory | any) => defHttp.get({ url: adminPath + '/erp/category/list', params }); +export const erpCategoryListAll = (params?: ErpCategory | any) => + defHttp.get({ url: adminPath + '/erp/category/listAll', params }); + export const erpCategoryListData = (params?: ErpCategory | any) => defHttp.post>({ url: adminPath + '/erp/category/listData', params }); diff --git a/web-vue/packages/erp/views/erp/account/form.vue b/web-vue/packages/erp/views/erp/account/form.vue index 52c045c..f301018 100644 --- a/web-vue/packages/erp/views/erp/account/form.vue +++ b/web-vue/packages/erp/views/erp/account/form.vue @@ -4,20 +4,20 @@ * @author gaoxq --> diff --git a/web-vue/packages/erp/views/erp/account/list.vue b/web-vue/packages/erp/views/erp/account/list.vue index 4070634..0fd8028 100644 --- a/web-vue/packages/erp/views/erp/account/list.vue +++ b/web-vue/packages/erp/views/erp/account/list.vue @@ -27,7 +27,7 @@ {{ desensitizeBankCard(text) }} - + diff --git a/web-vue/packages/erp/views/erp/category/list.vue b/web-vue/packages/erp/views/erp/category/list.vue index aa54943..faa7f46 100644 --- a/web-vue/packages/erp/views/erp/category/list.vue +++ b/web-vue/packages/erp/views/erp/category/list.vue @@ -24,7 +24,7 @@ - + diff --git a/web-vue/packages/erp/views/erp/income/list.vue b/web-vue/packages/erp/views/erp/income/list.vue index 0e9e267..9f3427e 100644 --- a/web-vue/packages/erp/views/erp/income/list.vue +++ b/web-vue/packages/erp/views/erp/income/list.vue @@ -24,7 +24,7 @@ - +