Selaa lähdekoodia

数据字典删除

xiongwanxiong 1 viikko sitten
vanhempi
sitoutus
2f4d0a9ba2

+ 1 - 1
wxjy-wxjy-service/src/main/java/cn/gov/customs/wxjy/analyze/controller/NewDeclaredGoodsController.java

@@ -70,7 +70,7 @@ public class NewDeclaredGoodsController extends BaseController {
      * 删除新申报商品提示
      */
     @PostMapping("/delete-newDeclaredGoods")
-    public Result<Integer> remove(@PathVariable String[] ids) {
+    public Result<Integer> remove(@RequestBody String[] ids) {
         return Result.success(newDeclaredGoodsService.deleteByIDs(ids));
     }
 

+ 16 - 3
wxjy-wxjy-service/src/main/java/cn/gov/customs/wxjy/system/controller/DictTypeController.java

@@ -1,6 +1,8 @@
 package cn.gov.customs.wxjy.system.controller;
 
+import cn.gov.customs.cacp.sdks.core.result.CacpResultCodeMessage;
 import cn.gov.customs.cacp.sdks.core.result.Result;
+import cn.gov.customs.cacp.sdks.core.result.ResultCodeMessage;
 import cn.gov.customs.wxjy.common.annotation.Log;
 import cn.gov.customs.wxjy.common.core.controller.BaseController;
 import cn.gov.customs.wxjy.common.core.domain.AjaxResult;
@@ -95,9 +97,20 @@ public class DictTypeController extends BaseController {
     /**
      * 删除字典类型
      */
+    @PostMapping("/delete-dictTypes")
+    public Result<Integer> remove(@RequestBody Long[] ids) {
+        for (Long PkDictType : ids)
+        {
+            DictType dictType = dictTypeService.selectDictTypeById(PkDictType);
+            if (dictDataService.countDictDataByType(dictType.getDictType()) > 0)
+            {
+                return Result.fail(CacpResultCodeMessage.WARNING,"字典类型'" + dictType.getDictType() + "'已被使用,不能删除,请先删除字典项值");
+            }
+        }
+        return Result.success(dictTypeService.deleteDictTypeByIds(ids));
+    }
 //    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
-    @Log(title = "字典类型", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{PkDictTypes}")
+/*    @PostMapping("/{PkDictTypes}")
     public AjaxResult remove(@PathVariable Long[] PkDictTypes)
     {
         for (Long PkDictType : PkDictTypes)
@@ -110,7 +123,7 @@ public class DictTypeController extends BaseController {
         }
         dictTypeService.deleteDictTypeByIds(PkDictTypes);
         return success();
-    }
+    }*/
 
     /**
      * 刷新字典缓存

+ 1 - 1
wxjy-wxjy-service/src/main/java/cn/gov/customs/wxjy/system/service/DictTypeService.java

@@ -58,7 +58,7 @@ public interface DictTypeService {
      *
      * @param dictIds 需要删除的字典ID
      */
-    public void deleteDictTypeByIds(Long[] dictIds);
+    public int deleteDictTypeByIds(Long[] dictIds);
 
     /**
      * 加载字典缓存数据

+ 4 - 1
wxjy-wxjy-service/src/main/java/cn/gov/customs/wxjy/system/service/impl/DictTypeServiceImpl.java

@@ -127,8 +127,9 @@ public class DictTypeServiceImpl implements DictTypeService {
      * @param PkDictTypes 需要删除的字典ID
      */
     @Override
-    public void deleteDictTypeByIds(Long[] PkDictTypes)
+    public int deleteDictTypeByIds(Long[] PkDictTypes)
     {
+        int i = 0;
         for (Long PkDictType : PkDictTypes)
         {
            DictType dictType = selectDictTypeById(PkDictType);
@@ -138,7 +139,9 @@ public class DictTypeServiceImpl implements DictTypeService {
 //            }
             dictTypeMapper.deleteDictTypeById(PkDictType);
             DictUtils.removeDictCache(dictType.getDictType());
+            i++;
         }
+        return i;
     }
 
     /**

+ 181 - 175
wxjy-wxjy-service/src/main/resources/mapper/analyze/NewDeclaredGoodsMapper.xml

@@ -74,185 +74,191 @@
     <select id="selectList" parameterType="NewDeclaredGoodsQuery" resultMap="NewDeclaredGoodsResult">
         <include refid="baseVo"/>
         <where>
-        <if test="entryId != null  and entryId != ''">
-            and ENTRY_ID = #{entryId}
-        </if>
-        <if test="gNo != null  and gNo != ''">
-            and G_NO = #{gNo}
-        </if>
-        <if test="ieFlag != null  and ieFlag != ''">
-            and IE_FLAG = #{ieFlag}
-        </if>
-        <if test="iePort != null  and iePort != ''">
-            and IE_PORT = #{iePort}
-        </if>
-        <if test="declPort != null  and declPort != ''">
-            and DECL_PORT = #{declPort}
-        </if>
-        <if test="customsCode != null  and customsCode != ''">
-            and CUSTOMS_CODE = #{customsCode}
-        </if>
-        <if test="declDate != null  and declDate != ''">
-            and DECL_DATE = #{declDate}
-        </if>
-        <if test="consignScc != null  and consignScc != ''">
-            and CONSIGN_SCC = #{consignScc}
-        </if>
-        <if test="consignCode != null  and consignCode != ''">
-            and CONSIGN_CODE = #{consignCode}
-        </if>
-        <if test="consignName != null  and consignName != ''">
-            and CONSIGN_NAME like concat('%', #{consignName}, '%')
-        </if>
-        <if test="codeTs != null  and codeTs != ''">
-            and CODE_TS = #{codeTs}
-        </if>
-        <if test="iqCode != null  and iqCode != ''">
-            and IQ_CODE = #{iqCode}
-        </if>
-        <if test="gName != null  and gName != ''">
-            and G_NAME like concat('%', #{gName}, '%')
-        </if>
-        <if test="iqGName != null  and iqGName != ''">
-            and IQ_G_NAME like concat('%', #{iqGName}, '%')
-        </if>
-        <if test="gNameFn != null  and gNameFn != ''">
-            and G_NAME_FN = #{gNameFn}
-        </if>
-        <if test="gModel != null  and gModel != ''">
-            and G_MODEL = #{gModel}
-        </if>
-        <if test="iqGModel != null  and iqGModel != ''">
-            and IQ_G_MODEL = #{iqGModel}
-        </if>
-        <if test="gComposition != null  and gComposition != ''">
-            and G_COMPOSITION = #{gComposition}
-        </if>
-        <if test="prodWarranty != null  and prodWarranty != ''">
-            and PROD_WARRANTY = #{prodWarranty}
-        </if>
-        <if test="prodValidaty != null  and prodValidaty != ''">
-            and PROD_VALIDATY = #{prodValidaty}
-        </if>
-        <if test="dutyMode != null  and dutyMode != ''">
-            and DUTY_MODE = #{dutyMode}
-        </if>
-        <if test="GTIN != null  and GTIN != ''">
-            and GTIN = #{GTIN}
-        </if>
-        <if test="gQty != null  and gQty != ''">
-            and G_QTY = #{gQty}
-        </if>
-        <if test="gUnit != null  and gUnit != ''">
-            and G_UNIT = #{gUnit}
-        </if>
-        <if test="qty1 != null  and qty1 != ''">
-            and QTY_1 = #{qty1}
-        </if>
-        <if test="unit1 != null  and unit1 != ''">
-            and UNIT_1 = #{unit1}
-        </if>
-        <if test="qty2 != null  and qty2 != ''">
-            and QTY_2 = #{qty2}
-        </if>
-        <if test="unit2 != null  and unit2 != ''">
-            and UNIT_2 = #{unit2}
-        </if>
-        <if test="declPrice != null  and declPrice != ''">
-            and DECL_PRICE = #{declPrice}
-        </if>
-        <if test="declTotal != null  and declTotal != ''">
-            and DECL_TOTAL = #{declTotal}
-        </if>
-        <if test="tradeCurr != null  and tradeCurr != ''">
-            and TRADE_CURR = #{tradeCurr}
-        </if>
-        <if test="tradeTotal != null  and tradeTotal != ''">
-            and TRADE_TOTAL = #{tradeTotal}
-        </if>
-        <if test="dutyValue != null  and dutyValue != ''">
-            and DUTY_VALUE = #{dutyValue}
-        </if>
-        <if test="rmbPrice != null  and rmbPrice != ''">
-            and RMB_PRICE = #{rmbPrice}
-        </if>
-        <if test="usdPrice != null  and usdPrice != ''">
-            and USD_PRICE = #{usdPrice}
-        </if>
-        <if test="exchangeRate != null  and exchangeRate != ''">
-            and EXCHANGE_RATE = #{exchangeRate}
-        </if>
-        <if test="originCountry != null  and originCountry != ''">
-            and ORIGIN_COUNTRY = #{originCountry}
-        </if>
-        <if test="originRegionCode != null  and originRegionCode != ''">
-            and ORIGIN_REGION_CODE = #{originRegionCode}
-        </if>
-        <if test="destCountry != null  and destCountry != ''">
-            and DEST_COUNTRY = #{destCountry}
-        </if>
-        <if test="ieDistrictCode != null  and ieDistrictCode != ''">
-            and IE_DISTRICT_CODE = #{ieDistrictCode}
-        </if>
-        <if test="iqIeDistrictCode != null  and iqIeDistrictCode != ''">
-            and IQ_IE_DISTRICT_CODE = #{iqIeDistrictCode}
-        </if>
-        <if test="frnProducerName != null  and frnProducerName != ''">
-            and FRN_PRODUCER_NAME like concat('%', #{frnProducerName}, '%')
-        </if>
-        <if test="productModel != null  and productModel != ''">
-            and PRODUCT_MODEL = #{productModel}
-        </if>
-        <if test="productBrand != null  and productBrand != ''">
-            and PRODUCT_BRAND = #{productBrand}
-        </if>
-        <if test="productDate != null  and productDate != ''">
-            and PRODUCT_DATE = #{productDate}
-        </if>
-        <if test="productBatch != null  and productBatch != ''">
-            and PRODUCT_BATCH = #{productBatch}
-        </if>
-        <if test="UNGID != null  and UNGID != ''">
-            and UNGID = #{UNGID}
-        </if>
-        <if test="ungFlag != null  and ungFlag != ''">
-            and UNG_FLAG = #{ungFlag}
-        </if>
-        <if test="ungModel != null  and ungModel != ''">
-            and UNG_MODEL = #{ungModel}
-        </if>
-        <if test="ungClassify != null  and ungClassify != ''">
-            and UNG_CLASSIFY = #{ungClassify}
-        </if>
-        <if test="ungGName != null  and ungGName != ''">
-            and UNG_G_NAME like concat('%', #{ungGName}, '%')
-        </if>
-        <if test="productCharCode != null  and productCharCode != ''">
-            and PRODUCT_CHAR_CODE = #{productCharCode}
-        </if>
-        <if test="goodsId != null  and goodsId != ''">
-            and GOODS_ID = #{goodsId}
-        </if>
-        <if test="useTo != null  and useTo != ''">
-            and USE_TO = #{useTo}
-        </if>
-        <if test="gCertFlag != null  and gCertFlag != ''">
-            and G_CERT_FLAG = #{gCertFlag}
-        </if>
-        <if test="mnufctrRegNo != null  and mnufctrRegNo != ''">
-            and MNUFCTR_REG_NO = #{mnufctrRegNo}
-        </if>
-        <if test="CAS != null  and CAS != ''">
-            and CAS = #{CAS}
-        </if>
-        <if test="goodsType != null  and goodsType != ''">
-            and GOODS_TYPE = #{goodsType}
-        </if>
+            <if test="entryId != null  and entryId != ''">
+                and ENTRY_ID = #{entryId}
+            </if>
+            <if test="gNo != null  and gNo != ''">
+                and G_NO = #{gNo}
+            </if>
+            <if test="ieFlag != null  and ieFlag != ''">
+                and IE_FLAG = #{ieFlag}
+            </if>
+            <if test="iePort != null  and iePort != ''">
+                and IE_PORT = #{iePort}
+            </if>
+            <if test="declPort != null  and declPort != ''">
+                and DECL_PORT = #{declPort}
+            </if>
+            <if test="customsCode != null  and customsCode != ''">
+                and CUSTOMS_CODE = #{customsCode}
+            </if>
+            <if test="declDate != null  and declDate != ''">
+                and DECL_DATE = #{declDate}
+            </if>
+            <if test="consignScc != null  and consignScc != ''">
+                and CONSIGN_SCC = #{consignScc}
+            </if>
+            <if test="consignCode != null  and consignCode != ''">
+                and CONSIGN_CODE = #{consignCode}
+            </if>
+            <if test="consignName != null  and consignName != ''">
+                and CONSIGN_NAME like concat('%', #{consignName}, '%')
+            </if>
+            <if test="codeTs != null  and codeTs != ''">
+                and CODE_TS = #{codeTs}
+            </if>
+            <if test="iqCode != null  and iqCode != ''">
+                and IQ_CODE = #{iqCode}
+            </if>
+            <if test="gName != null  and gName != ''">
+                and G_NAME like concat('%', #{gName}, '%')
+            </if>
+            <if test="iqGName != null  and iqGName != ''">
+                and IQ_G_NAME like concat('%', #{iqGName}, '%')
+            </if>
+            <if test="gNameFn != null  and gNameFn != ''">
+                and G_NAME_FN = #{gNameFn}
+            </if>
+            <if test="gModel != null  and gModel != ''">
+                and G_MODEL = #{gModel}
+            </if>
+            <if test="iqGModel != null  and iqGModel != ''">
+                and IQ_G_MODEL = #{iqGModel}
+            </if>
+            <if test="gComposition != null  and gComposition != ''">
+                and G_COMPOSITION = #{gComposition}
+            </if>
+            <if test="prodWarranty != null  and prodWarranty != ''">
+                and PROD_WARRANTY = #{prodWarranty}
+            </if>
+            <if test="prodValidaty != null  and prodValidaty != ''">
+                and PROD_VALIDATY = #{prodValidaty}
+            </if>
+            <if test="dutyMode != null  and dutyMode != ''">
+                and DUTY_MODE = #{dutyMode}
+            </if>
+            <if test="GTIN != null  and GTIN != ''">
+                and GTIN = #{GTIN}
+            </if>
+            <if test="gQty != null  and gQty != ''">
+                and G_QTY = #{gQty}
+            </if>
+            <if test="gUnit != null  and gUnit != ''">
+                and G_UNIT = #{gUnit}
+            </if>
+            <if test="qty1 != null  and qty1 != ''">
+                and QTY_1 = #{qty1}
+            </if>
+            <if test="unit1 != null  and unit1 != ''">
+                and UNIT_1 = #{unit1}
+            </if>
+            <if test="qty2 != null  and qty2 != ''">
+                and QTY_2 = #{qty2}
+            </if>
+            <if test="unit2 != null  and unit2 != ''">
+                and UNIT_2 = #{unit2}
+            </if>
+            <if test="declPrice != null  and declPrice != ''">
+                and DECL_PRICE = #{declPrice}
+            </if>
+            <if test="declTotal != null  and declTotal != ''">
+                and DECL_TOTAL = #{declTotal}
+            </if>
+            <if test="tradeCurr != null  and tradeCurr != ''">
+                and TRADE_CURR = #{tradeCurr}
+            </if>
+            <if test="tradeTotal != null  and tradeTotal != ''">
+                and TRADE_TOTAL = #{tradeTotal}
+            </if>
+            <if test="dutyValue != null  and dutyValue != ''">
+                and DUTY_VALUE = #{dutyValue}
+            </if>
+            <if test="rmbPrice != null  and rmbPrice != ''">
+                and RMB_PRICE = #{rmbPrice}
+            </if>
+            <if test="usdPrice != null  and usdPrice != ''">
+                and USD_PRICE = #{usdPrice}
+            </if>
+            <if test="exchangeRate != null  and exchangeRate != ''">
+                and EXCHANGE_RATE = #{exchangeRate}
+            </if>
+            <if test="originCountry != null  and originCountry != ''">
+                and ORIGIN_COUNTRY = #{originCountry}
+            </if>
+            <if test="originRegionCode != null  and originRegionCode != ''">
+                and ORIGIN_REGION_CODE = #{originRegionCode}
+            </if>
+            <if test="destCountry != null  and destCountry != ''">
+                and DEST_COUNTRY = #{destCountry}
+            </if>
+            <if test="ieDistrictCode != null  and ieDistrictCode != ''">
+                and IE_DISTRICT_CODE = #{ieDistrictCode}
+            </if>
+            <if test="iqIeDistrictCode != null  and iqIeDistrictCode != ''">
+                and IQ_IE_DISTRICT_CODE = #{iqIeDistrictCode}
+            </if>
+            <if test="frnProducerName != null  and frnProducerName != ''">
+                and FRN_PRODUCER_NAME like concat('%', #{frnProducerName}, '%')
+            </if>
+            <if test="productModel != null  and productModel != ''">
+                and PRODUCT_MODEL = #{productModel}
+            </if>
+            <if test="productBrand != null  and productBrand != ''">
+                and PRODUCT_BRAND = #{productBrand}
+            </if>
+            <if test="productDate != null  and productDate != ''">
+                and PRODUCT_DATE = #{productDate}
+            </if>
+            <if test="productBatch != null  and productBatch != ''">
+                and PRODUCT_BATCH = #{productBatch}
+            </if>
+            <if test="UNGID != null  and UNGID != ''">
+                and UNGID = #{UNGID}
+            </if>
+            <if test="ungFlag != null  and ungFlag != ''">
+                and UNG_FLAG = #{ungFlag}
+            </if>
+            <if test="ungModel != null  and ungModel != ''">
+                and UNG_MODEL = #{ungModel}
+            </if>
+            <if test="ungClassify != null  and ungClassify != ''">
+                and UNG_CLASSIFY = #{ungClassify}
+            </if>
+            <if test="ungGName != null  and ungGName != ''">
+                and UNG_G_NAME like concat('%', #{ungGName}, '%')
+            </if>
+            <if test="productCharCode != null  and productCharCode != ''">
+                and PRODUCT_CHAR_CODE = #{productCharCode}
+            </if>
+            <if test="goodsId != null  and goodsId != ''">
+                and GOODS_ID = #{goodsId}
+            </if>
+            <if test="useTo != null  and useTo != ''">
+                and USE_TO = #{useTo}
+            </if>
+            <if test="gCertFlag != null  and gCertFlag != ''">
+                and G_CERT_FLAG = #{gCertFlag}
+            </if>
+            <if test="mnufctrRegNo != null  and mnufctrRegNo != ''">
+                and MNUFCTR_REG_NO = #{mnufctrRegNo}
+            </if>
+            <if test="CAS != null  and CAS != ''">
+                and CAS = #{CAS}
+            </if>
+            <if test="goodsType != null  and goodsType != ''">
+                and GOODS_TYPE = #{goodsType}
+            </if>
+            <if test="beginDate != null ">
+                and DECL_DATE &gt;= #{beginDate}
+            </if>
+            <if test="endDate != null ">
+                and DECL_DATE &lt;= #{endDate}
+            </if>
         </where>
     </select>
 
     <select id="selectByID" parameterType="String"
-        resultMap="NewDeclaredGoodsResult">
+            resultMap="NewDeclaredGoodsResult">
         <include refid="baseVo"/>
         where ID = #{ID}
     </select>

+ 1 - 1
wxjy-wxjy-service/src/main/resources/vm/java/controller.java.vm

@@ -81,7 +81,7 @@ public class ${ClassName}Controller extends BaseController {
      * 删除${functionName}
      */
     @PostMapping("/delete-${className}")
-    public Result<Integer> remove(@PathVariable ${pkColumn.javaType}[] ids) {
+    public Result<Integer> remove(@RequestBody ${pkColumn.javaType}[] ids) {
         return Result.success(${className}Service.deleteBy${pkColumn.capJavaField}s(ids));
     }
 

+ 1 - 1
wxjy-wxjy-web/src/apis/base/baseCode.ts

@@ -7,7 +7,7 @@ import type { JSONObject } from '@antv/x6'
 const contextPath = '/baseCode'
 
 // 获取基础数据列表
-export async function getList(code: string): Promise<Result<Array<JSONObject>>> {
+export async function getBaseCodeList(code: string): Promise<Result<Array<JSONObject>>> {
   const res: AxiosResponse<Result<Array<JSONObject>>> = await request.get(`${contextPath}/appBase?code=${code}`)
   return res.data
 }

+ 11 - 0
wxjy-wxjy-web/src/apis/system/dictType.ts

@@ -34,6 +34,17 @@ export async function delType(dictId: number[]): Promise<AjaxResult<string>> {
   return res.data
 }
 
+// 删除采购入库单
+export async function remove(dictId: number | number[]): Promise<Result<number>> {
+  // 统一转换为数组格式
+  const ids = Array.isArray(dictId) ? dictId : [dictId];
+  console.log(ids);
+  const res: AxiosResponse<Result<number>> = await request.post(
+    `${contextPath}/delete-dictTypes?ids`,ids
+  )
+  return res.data
+}
+
 // 刷新字典缓存
 export async function refreshCache(): Promise<AjaxResult<string>> {
   const res: AxiosResponse<AjaxResult<string>> = await request.delete(`${contextPath}/refreshCache`)

+ 1 - 0
wxjy-wxjy-web/src/components/DictTag/index.vue → wxjy-wxjy-web/src/components/DictTag/dictTag.vue

@@ -60,6 +60,7 @@ const values = computed(() => {
 
 // 计算属性:是否有未匹配的值
 const unmatch = computed(() => {
+  // eslint-disable-next-line vue/no-side-effects-in-computed-properties
   unmatchArray.value = []
 
   // 没有value不显示

+ 1 - 1
wxjy-wxjy-web/src/main.ts

@@ -15,7 +15,7 @@ import directives from './directives'
 import { pinia } from './stores'
 import { addEventListener } from './utils/frame'
 import { BridgeCore } from '@cacp/bridge-core'
-import DictTag from '@/components/DictTag/index.vue'
+import DictTag from '@/components/DictTag/dictTag.vue'
 import { getDict } from '@/utils/dict'
 
 // 初始化通信实例

+ 13 - 13
wxjy-wxjy-web/src/types/analyze/NewDeclaredGoods.ts

@@ -1,8 +1,8 @@
 // 新申报商品提示
 export interface NewDeclaredGoods {
-  ID?: string
+  id?: string
   entryId?: string
-  gNo?: string
+  gno?: string
   ieFlag?: string
   iePort?: string
   declPort?: string
@@ -13,10 +13,10 @@ export interface NewDeclaredGoods {
   consignName?: string
   codeTs?: string
   iqCode?: string
-  gName?: string
+  gname?: string
   iqGName?: string
   gNameFn?: string
-  gModel?: string
+  gmodel?: string
   iqGModel?: string
   gComposition?: string
   prodWarranty?: string
@@ -47,7 +47,7 @@ export interface NewDeclaredGoods {
   productBrand?: string
   productDate?: string
   productBatch?: string
-  UNGID?: string
+  ungid?: string
   ungFlag?: string
   ungModel?: string
   ungClassify?: string
@@ -56,15 +56,15 @@ export interface NewDeclaredGoods {
   goodsId?: string
   useTo?: string
   gCertFlag?: string
-  mnufctrRegNo?: string
-  CAS?: string
+  mnufctrRegno?: string
+  cas?: string
   goodsType?: string
 }
 
 // 新申报商品提示查询参数
 export interface NewDeclaredGoodsQuery {
   entryId?: string
-  gNo?: string
+  gno?: string
   ieFlag?: string
   iePort?: string
   declPort?: string
@@ -75,10 +75,10 @@ export interface NewDeclaredGoodsQuery {
   consignName?: string
   codeTs?: string
   iqCode?: string
-  gName?: string
+  gname?: string
   iqGName?: string
   gNameFn?: string
-  gModel?: string
+  gmodel?: string
   iqGModel?: string
   gComposition?: string
   prodWarranty?: string
@@ -109,7 +109,7 @@ export interface NewDeclaredGoodsQuery {
   productBrand?: string
   productDate?: string
   productBatch?: string
-  UNGID?: string
+  ungid?: string
   ungFlag?: string
   ungModel?: string
   ungClassify?: string
@@ -118,8 +118,8 @@ export interface NewDeclaredGoodsQuery {
   goodsId?: string
   useTo?: string
   gCertFlag?: string
-  mnufctrRegNo?: string
-  CAS?: string
+  mnufctrRegno?: string
+  cas?: string
   goodsType?: string
   beginDate?: string
   endDate?: string

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 271 - 524
wxjy-wxjy-web/src/views/analyze/NewDeclaredGoods.vue


+ 5 - 4
wxjy-wxjy-web/src/views/system/dictType.vue

@@ -118,7 +118,7 @@
 </template>
 <script setup lang="ts">
 import { useLoading } from '@cacp/ui'
-import { listType,addType,updateType,delType,refreshCache } from '@/apis/system/dictType'
+import { listType, addType, updateType, delType, refreshCache, remove } from '@/apis/system/dictType'
 import config from '@/config'
 
 import dayjs from 'dayjs'
@@ -277,12 +277,13 @@ function onCreate() {
 }
 
 async function onDelete(row: DictTypeInfo) {
-  const res = await delType([row.pkDictType] || ids.value)
-  if (res.code == "200") {
+  const res = await remove([row.pkDictType] || ids.value)
+  console.log(res);
+  if (res.code == "0") {
     ElMessage.success("修改成功")
     onPageChange(1)
   } else {
-    ElMessage.error(res.msg)
+    ElMessage.error(res.message)
   }
 }
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä