From 7e53b41a3c3a8f63719045af9893905748563af5 Mon Sep 17 00:00:00 2001 From: liuminghui <468701464@qq.com> Date: Tue, 27 Oct 2026 11:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/BmsSupplierTypeController.java | 117 +++++++++ .../bms/system/domain/BmsSupplierType.java | 112 +++++++++ .../system/mapper/BmsSupplierTypeMapper.java | 112 +++++++++ .../service/IBmsSupplierTypeService.java | 60 +++++ .../impl/BmsSupplierTypeServiceImpl.java | 232 ++++++++++++++++++ .../mapper/data/BmsSupplierTypeMapper.xml | 130 ++++++++++ bms-front/src/api/data/supplierType.js | 47 ++++ .../supplierinfo/index.vue | 11 +- .../supplierinfo/supplieredit/index.vue | 9 +- 9 files changed, 812 insertions(+), 18 deletions(-) create mode 100644 bms-back/bms-admin/src/main/java/com/bms/web/controller/data/BmsSupplierTypeController.java create mode 100644 bms-back/bms-system/src/main/java/com/bms/system/domain/BmsSupplierType.java create mode 100644 bms-back/bms-system/src/main/java/com/bms/system/mapper/BmsSupplierTypeMapper.java create mode 100644 bms-back/bms-system/src/main/java/com/bms/system/service/IBmsSupplierTypeService.java create mode 100644 bms-back/bms-system/src/main/java/com/bms/system/service/impl/BmsSupplierTypeServiceImpl.java create mode 100644 bms-back/bms-system/src/main/resources/mapper/data/BmsSupplierTypeMapper.xml create mode 100644 bms-front/src/api/data/supplierType.js diff --git a/bms-back/bms-admin/src/main/java/com/bms/web/controller/data/BmsSupplierTypeController.java b/bms-back/bms-admin/src/main/java/com/bms/web/controller/data/BmsSupplierTypeController.java new file mode 100644 index 00000000..60094a9f --- /dev/null +++ b/bms-back/bms-admin/src/main/java/com/bms/web/controller/data/BmsSupplierTypeController.java @@ -0,0 +1,117 @@ +package com.bms.web.controller.data; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.bms.common.annotation.Log; +import com.bms.common.core.controller.BaseController; +import com.bms.common.core.domain.AjaxResult; +import com.bms.common.core.page.TableDataInfo; +import com.bms.common.enums.BusinessType; +import com.bms.common.utils.poi.ExcelUtil; +import com.bms.system.domain.BmsSupplierType; +import com.bms.system.service.IBmsSupplierTypeService; + +/** + * 数据管理:供应商类型 + * + * @author bms + */ +@RestController +@RequestMapping("/data/supplierType") +public class BmsSupplierTypeController extends BaseController +{ + @Autowired + private IBmsSupplierTypeService supplierTypeService; + + /** + * 分页查询。名称模糊、状态精确。 + */ + @PreAuthorize("@ss.hasPermi('data:supplierType:list')") + @GetMapping("/list") + public TableDataInfo list(BmsSupplierType query) + { + startPage(); + List list = supplierTypeService.selectList(query); + return getDataTable(list); + } + + /** + * 按当前查询条件导出 + */ + @Log(title = "供应商类型", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('data:supplierType:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, BmsSupplierType query) + { + List list = supplierTypeService.selectList(query); + ExcelUtil util = new ExcelUtil(BmsSupplierType.class); + util.exportExcel(response, list, "供应商类型"); + } + + /** + * 查询详情 + */ + @PreAuthorize("@ss.hasPermi('data:supplierType:query')") + @GetMapping("/{typeId}") + public AjaxResult getInfo(@PathVariable Long typeId) + { + return success(supplierTypeService.selectById(typeId)); + } + + /** + * 新增 + */ + @PreAuthorize("@ss.hasPermi('data:supplierType:add')") + @Log(title = "供应商类型", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BmsSupplierType row) + { + row.setCreateBy(getUsername()); + return toAjax(supplierTypeService.insert(row)); + } + + /** + * 修改 + */ + @PreAuthorize("@ss.hasPermi('data:supplierType:edit')") + @Log(title = "供应商类型", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BmsSupplierType row) + { + row.setUpdateBy(getUsername()); + return toAjax(supplierTypeService.update(row)); + } + + /** + * 启用或停用 + */ + @PreAuthorize("@ss.hasPermi('data:supplierType:changeStatus')") + @Log(title = "供应商类型", businessType = BusinessType.UPDATE) + @PutMapping("/changeStatus") + public AjaxResult changeStatus(@RequestBody BmsSupplierType row) + { + row.setUpdateBy(getUsername()); + return toAjax(supplierTypeService.changeStatus(row)); + } + + /** + * 删除 + */ + @PreAuthorize("@ss.hasPermi('data:supplierType:remove')") + @Log(title = "供应商类型", businessType = BusinessType.DELETE) + @DeleteMapping("/{typeIds}") + public AjaxResult remove(@PathVariable Long[] typeIds) + { + return toAjax(supplierTypeService.deleteByIds(typeIds)); + } +} diff --git a/bms-back/bms-system/src/main/java/com/bms/system/domain/BmsSupplierType.java b/bms-back/bms-system/src/main/java/com/bms/system/domain/BmsSupplierType.java new file mode 100644 index 00000000..8b2a7366 --- /dev/null +++ b/bms-back/bms-system/src/main/java/com/bms/system/domain/BmsSupplierType.java @@ -0,0 +1,112 @@ +package com.bms.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.bms.common.annotation.Excel; +import com.bms.common.core.domain.BaseEntity; + +/** + * 供应商类型 bms_supplier_type + * 类型编码与字典 bms_supplier_type 的字典键值一致,供供应商档案引用。 + * + * @author bms + */ +public class BmsSupplierType extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 类型ID */ + private Long typeId; + + /** 类型编码(字典键值) */ + @Excel(name = "类型编码") + private String typeCode; + + /** 类型名称 */ + @Excel(name = "类型名称") + private String typeName; + + /** 显示排序 */ + @Excel(name = "显示排序") + private Integer typeSort; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String status; + + /** 删除标记(0存在 1删除) */ + private String delFlag; + + public Long getTypeId() + { + return typeId; + } + + public void setTypeId(Long typeId) + { + this.typeId = typeId; + } + + public String getTypeCode() + { + return typeCode; + } + + public void setTypeCode(String typeCode) + { + this.typeCode = typeCode; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public Integer getTypeSort() + { + return typeSort; + } + + public void setTypeSort(Integer typeSort) + { + this.typeSort = typeSort; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getDelFlag() + { + return delFlag; + } + + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + @Override + public String toString() + { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("typeId", getTypeId()) + .append("typeCode", getTypeCode()) + .append("typeName", getTypeName()) + .append("typeSort", getTypeSort()) + .append("status", getStatus()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/bms-back/bms-system/src/main/java/com/bms/system/mapper/BmsSupplierTypeMapper.java b/bms-back/bms-system/src/main/java/com/bms/system/mapper/BmsSupplierTypeMapper.java new file mode 100644 index 00000000..282c912a --- /dev/null +++ b/bms-back/bms-system/src/main/java/com/bms/system/mapper/BmsSupplierTypeMapper.java @@ -0,0 +1,112 @@ +package com.bms.system.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import com.bms.system.domain.BmsSupplierType; + +/** + * 供应商类型数据层 + * + * @author bms + */ +public interface BmsSupplierTypeMapper +{ + /** + * 按名称、状态查询供应商类型 + * + * @param query 查询条件 + * @return 类型列表 + */ + List selectList(BmsSupplierType query); + + /** + * 按主键查询未删除的类型 + * + * @param typeId 类型ID + * @return 类型 + */ + BmsSupplierType selectById(Long typeId); + + /** + * 统计未删除的同编码数量 + * + * @param typeCode 类型编码 + * @param excludeId 排除的类型ID,新增时为空 + * @return 数量 + */ + int countByTypeCode(@Param("typeCode") String typeCode, @Param("excludeId") Long excludeId); + + /** + * 统计未删除的同名称数量 + * + * @param typeName 类型名称 + * @param excludeId 排除的类型ID,新增时为空 + * @return 数量 + */ + int countByTypeName(@Param("typeName") String typeName, @Param("excludeId") Long excludeId); + + /** + * 新增供应商类型 + * + * @param row 类型 + * @return 影响行数 + */ + int insert(BmsSupplierType row); + + /** + * 修改供应商类型(不改编码,避免已引用的供应商失联) + * + * @param row 类型 + * @return 影响行数 + */ + int update(BmsSupplierType row); + + /** + * 只更新启用状态 + * + * @param row 含 typeId、status、updateBy + * @return 影响行数 + */ + int updateStatus(BmsSupplierType row); + + /** + * 逻辑删除 + * + * @param typeIds 类型ID + * @return 影响行数 + */ + int deleteByIds(Long[] typeIds); + + /** + * 按字典类型和键值取字典编码 + * + * @param dictType 字典类型 + * @param dictValue 字典键值 + * @return 字典编码,不存在时为空 + */ + Long selectDictCode(@Param("dictType") String dictType, @Param("dictValue") String dictValue); + + /** + * 写入字典数据 + * + * @param row 类型,字典类型由调用方放入 remark 以外的固定值,见 XML + * @return 影响行数 + */ + int insertDict(BmsSupplierType row); + + /** + * 按类型编码更新字典标签、排序和状态 + * + * @param row 类型 + * @return 影响行数 + */ + int updateDict(BmsSupplierType row); + + /** + * 按类型编码删除字典数据 + * + * @param typeCode 类型编码 + * @return 影响行数 + */ + int deleteDictByCode(String typeCode); +} diff --git a/bms-back/bms-system/src/main/java/com/bms/system/service/IBmsSupplierTypeService.java b/bms-back/bms-system/src/main/java/com/bms/system/service/IBmsSupplierTypeService.java new file mode 100644 index 00000000..1f97c5be --- /dev/null +++ b/bms-back/bms-system/src/main/java/com/bms/system/service/IBmsSupplierTypeService.java @@ -0,0 +1,60 @@ +package com.bms.system.service; + +import java.util.List; +import com.bms.system.domain.BmsSupplierType; + +/** + * 供应商类型服务 + * + * @author bms + */ +public interface IBmsSupplierTypeService +{ + /** + * 分页前的条件查询,分页由调用方开启 + * + * @param query 名称、状态 + * @return 类型列表 + */ + List selectList(BmsSupplierType query); + + /** + * 查询单个类型 + * + * @param typeId 类型ID + * @return 类型 + */ + BmsSupplierType selectById(Long typeId); + + /** + * 新增类型,并同步字典 bms_supplier_type + * + * @param row 类型 + * @return 影响行数 + */ + int insert(BmsSupplierType row); + + /** + * 修改类型名称、排序、状态、备注,并同步字典 + * + * @param row 类型 + * @return 影响行数 + */ + int update(BmsSupplierType row); + + /** + * 启用或停用,并同步字典状态 + * + * @param row 含 typeId 与 status + * @return 影响行数 + */ + int changeStatus(BmsSupplierType row); + + /** + * 逻辑删除,并从字典中移除对应键值 + * + * @param typeIds 类型ID + * @return 影响行数 + */ + int deleteByIds(Long[] typeIds); +} diff --git a/bms-back/bms-system/src/main/java/com/bms/system/service/impl/BmsSupplierTypeServiceImpl.java b/bms-back/bms-system/src/main/java/com/bms/system/service/impl/BmsSupplierTypeServiceImpl.java new file mode 100644 index 00000000..3e607da6 --- /dev/null +++ b/bms-back/bms-system/src/main/java/com/bms/system/service/impl/BmsSupplierTypeServiceImpl.java @@ -0,0 +1,232 @@ +package com.bms.system.service.impl; + +import java.util.ArrayList; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.bms.common.core.domain.entity.SysDictData; +import com.bms.common.exception.ServiceException; +import com.bms.common.utils.DictUtils; +import com.bms.common.utils.StringUtils; +import com.bms.system.domain.BmsSupplierType; +import com.bms.system.mapper.BmsSupplierTypeMapper; +import com.bms.system.mapper.SysDictDataMapper; +import com.bms.system.service.IBmsSupplierTypeService; + +/** + * 供应商类型服务实现。 + * 供应商类型服务实现。_DETAIL + * + * @author bms + */ +@Service +public class BmsSupplierTypeServiceImpl implements IBmsSupplierTypeService +{ + /** 字典类型,与系统字典管理中的类型编码一致 */ + public static final String DICT_TYPE = "bms_supplier_type"; + + @Autowired + private BmsSupplierTypeMapper supplierTypeMapper; + + @Autowired + private SysDictDataMapper dictDataMapper; + + @Override + public List selectList(BmsSupplierType query) + { + return supplierTypeMapper.selectList(query); + } + + @Override + public BmsSupplierType selectById(Long typeId) + { + return supplierTypeMapper.selectById(typeId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int insert(BmsSupplierType row) + { + normalize(row); + validate(row, null); + if (row.getTypeSort() == null) + { + row.setTypeSort(0); + } + if (StringUtils.isEmpty(row.getStatus())) + { + row.setStatus("0"); + } + int rows = supplierTypeMapper.insert(row); + syncDict(row); + return rows; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int update(BmsSupplierType row) + { + if (row.getTypeId() == null) + { + throw new ServiceException("类型ID不能为空"); + } + BmsSupplierType existing = requireActive(row.getTypeId()); + normalize(row); + if (StringUtils.isEmpty(row.getTypeName())) + { + row.setTypeName(existing.getTypeName()); + } + if (row.getTypeSort() == null) + { + row.setTypeSort(existing.getTypeSort()); + } + if (StringUtils.isEmpty(row.getStatus())) + { + row.setStatus(existing.getStatus()); + } + validateNameAndStatus(row, row.getTypeId()); + row.setTypeCode(existing.getTypeCode()); + int rows = supplierTypeMapper.update(row); + syncDict(row); + return rows; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int changeStatus(BmsSupplierType row) + { + if (row.getTypeId() == null) + { + throw new ServiceException("类型ID不能为空"); + } + if (!"0".equals(row.getStatus()) && !"1".equals(row.getStatus())) + { + throw new ServiceException("状态只能是正常或停用"); + } + BmsSupplierType existing = requireActive(row.getTypeId()); + existing.setStatus(row.getStatus()); + existing.setUpdateBy(row.getUpdateBy()); + int rows = supplierTypeMapper.updateStatus(existing); + syncDict(existing); + return rows; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int deleteByIds(Long[] typeIds) + { + if (typeIds == null || typeIds.length == 0) + { + return 0; + } + for (Long typeId : typeIds) + { + BmsSupplierType existing = supplierTypeMapper.selectById(typeId); + if (existing != null && StringUtils.isNotEmpty(existing.getTypeCode())) + { + supplierTypeMapper.deleteDictByCode(existing.getTypeCode()); + } + } + int rows = supplierTypeMapper.deleteByIds(typeIds); + refreshDictCache(); + return rows; + } + + /** + * 校验编码、名称唯一,并整理状态 + */ + private void validate(BmsSupplierType row, Long excludeId) + { + if (StringUtils.isEmpty(row.getTypeCode())) + { + throw new ServiceException("类型编码不能为空"); + } + if (!row.getTypeCode().matches("[0-9A-Za-z_-]{1,32}")) + { + throw new ServiceException("类型编码只能是字母、数字、下划线或中划线,最长32位"); + } + if (supplierTypeMapper.countByTypeCode(row.getTypeCode(), excludeId) > 0) + { + throw new ServiceException("类型编码已存在:" + row.getTypeCode()); + } + validateNameAndStatus(row, excludeId); + } + + private void validateNameAndStatus(BmsSupplierType row, Long excludeId) + { + if (StringUtils.isEmpty(row.getTypeName())) + { + throw new ServiceException("类型名称不能为空"); + } + if (row.getTypeName().length() > 100) + { + throw new ServiceException("类型名称不能超过100个字符"); + } + if (supplierTypeMapper.countByTypeName(row.getTypeName(), excludeId) > 0) + { + throw new ServiceException("类型名称已存在:" + row.getTypeName()); + } + if (StringUtils.isNotEmpty(row.getStatus()) + && !"0".equals(row.getStatus()) && !"1".equals(row.getStatus())) + { + throw new ServiceException("状态只能是正常或停用"); + } + } + + private BmsSupplierType requireActive(Long typeId) + { + BmsSupplierType existing = supplierTypeMapper.selectById(typeId); + if (existing == null) + { + throw new ServiceException("供应商类型不存在或已删除"); + } + return existing; + } + + private void normalize(BmsSupplierType row) + { + if (row.getTypeCode() != null) + { + row.setTypeCode(row.getTypeCode().trim()); + } + if (row.getTypeName() != null) + { + row.setTypeName(row.getTypeName().trim()); + } + if (row.getRemark() != null) + { + row.setRemark(row.getRemark().trim()); + } + } + + /** + * 按类型编码新增或更新字典项,并刷新该字典缓存 + */ + private void syncDict(BmsSupplierType row) + { + Long dictCode = supplierTypeMapper.selectDictCode(DICT_TYPE, row.getTypeCode()); + if (dictCode == null) + { + if (StringUtils.isEmpty(row.getCreateBy())) + { + row.setCreateBy(row.getUpdateBy()); + } + supplierTypeMapper.insertDict(row); + } + else + { + supplierTypeMapper.updateDict(row); + } + refreshDictCache(); + } + + /** + * 只缓存正常状态的字典项,停用后下拉不再出现 + */ + private void refreshDictCache() + { + List dictDatas = dictDataMapper.selectDictDataByType(DICT_TYPE); + DictUtils.setDictCache(DICT_TYPE, dictDatas == null ? new ArrayList() : dictDatas); + } +} diff --git a/bms-back/bms-system/src/main/resources/mapper/data/BmsSupplierTypeMapper.xml b/bms-back/bms-system/src/main/resources/mapper/data/BmsSupplierTypeMapper.xml new file mode 100644 index 00000000..220cfc0d --- /dev/null +++ b/bms-back/bms-system/src/main/resources/mapper/data/BmsSupplierTypeMapper.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + select type_id, type_code, type_name, type_sort, status, remark, + create_by, create_time, update_by, update_time, del_flag + from bms_supplier_type + + + + + + + + + + + + insert into bms_supplier_type ( + type_code, type_name, type_sort, status, remark, create_by, create_time, del_flag + ) values ( + #{typeCode}, #{typeName}, #{typeSort}, #{status}, #{remark}, #{createBy}, sysdate(), '0' + ) + + + + update bms_supplier_type + + type_name = #{typeName}, + type_sort = #{typeSort}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where type_id = #{typeId} and del_flag = '0' + + + + update bms_supplier_type + set status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + where type_id = #{typeId} and del_flag = '0' + + + + update bms_supplier_type + set del_flag = '1', + type_code = concat(type_code, '#', type_id), + type_name = concat(type_name, '#', type_id), + update_time = sysdate() + where del_flag = '0' and type_id in + + #{id} + + + + + + + insert into sys_dict_data ( + dict_sort, dict_label, dict_value, dict_type, css_class, list_class, + is_default, status, create_by, create_time, remark + ) values ( + #{typeSort}, #{typeName}, #{typeCode}, 'bms_supplier_type', '', 'primary', + 'N', #{status}, #{createBy}, sysdate(), #{remark} + ) + + + + update sys_dict_data + set dict_sort = #{typeSort}, + dict_label = #{typeName}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + where dict_type = 'bms_supplier_type' and dict_value = #{typeCode} + + + + delete from sys_dict_data + where dict_type = 'bms_supplier_type' and dict_value = #{typeCode} + + diff --git a/bms-front/src/api/data/supplierType.js b/bms-front/src/api/data/supplierType.js new file mode 100644 index 00000000..1d3f5f41 --- /dev/null +++ b/bms-front/src/api/data/supplierType.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function listSupplierType(query) { + return request({ + url: '/data/supplierType/list', + method: 'get', + params: query + }) +} + +export function getSupplierType(typeId) { + return request({ + url: '/data/supplierType/' + typeId, + method: 'get' + }) +} + +export function addSupplierType(data) { + return request({ + url: '/data/supplierType', + method: 'post', + data + }) +} + +export function updateSupplierType(data) { + return request({ + url: '/data/supplierType', + method: 'put', + data + }) +} + +export function changeSupplierTypeStatus(data) { + return request({ + url: '/data/supplierType/changeStatus', + method: 'put', + data + }) +} + +export function delSupplierType(typeIds) { + return request({ + url: '/data/supplierType/' + typeIds, + method: 'delete' + }) +} diff --git a/bms-front/src/views/customersuppliermanagement/supplierinfo/index.vue b/bms-front/src/views/customersuppliermanagement/supplierinfo/index.vue index 163873bd..a96193fa 100644 --- a/bms-front/src/views/customersuppliermanagement/supplierinfo/index.vue +++ b/bms-front/src/views/customersuppliermanagement/supplierinfo/index.vue @@ -254,16 +254,7 @@ const single = ref(true) const multiple = ref(true) const total = ref(0) -const { sys_normal_disable, settlement_type } = useDict("sys_normal_disable", "settlement_type") - -const supplierTypeOptions = ref([ - { value: "1", label: "卡车行" }, - { value: "2", label: "航司代理" }, - { value: "3", label: "报关行" }, - { value: "4", label: "清关行" }, - { value: "5", label: "尾派服务商" }, - { value: "6", label: "报关代理" } -]) +const { sys_normal_disable, settlement_type, bms_supplier_type: supplierTypeOptions } = useDict("sys_normal_disable", "settlement_type", "bms_supplier_type") const invoiceTypeOptions = ref([ { value: "1", label: "增值税普通发票" }, { value: "2", label: "增值税专用发票" }, diff --git a/bms-front/src/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue b/bms-front/src/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue index c5d814a8..7a0d8765 100644 --- a/bms-front/src/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue +++ b/bms-front/src/views/customersuppliermanagement/supplierinfo/supplieredit/index.vue @@ -640,14 +640,7 @@ const rules = { supplierName: [{ required: true, message: '供应商名称不能为空', trigger: 'blur' }] } -const supplierTypeOptions = ref([ - { value: '1', label: '卡车行' }, - { value: '2', label: '航司代理' }, - { value: '3', label: '报关行' }, - { value: '4', label: '清关行' }, - { value: '5', label: '尾派服务商' }, - { value: '6', label: '报关代理' } -]) +const { bms_supplier_type: supplierTypeOptions } = useDict('bms_supplier_type') const invoiceTypeOptions = ref([ { value: '1', label: '增值税普通发票' }, { value: '2', label: '增值税专用发票' },