Переглянути джерело

错误 #96600 已停用的现货品种不会在停用列表中显示

Administrator 4 роки тому
батько
коміт
2e68f55552

+ 3 - 3
src/views/information/goods/components/rightSpot/index.vue

@@ -9,13 +9,13 @@
           </svg>
           {{selctedDeliveryGoods.data.deliverygoodsname}}({{selctedDeliveryGoods.data.enumdicname}})
         </span>
-        <span class="green ml10">{{selctedDeliveryGoods.data.dgstatus ? '正常' : '停用'}}</span>
+        <span class="green ml10">{{selctedDeliveryGoods.data.isvalid ? '正常' : '停用'}}</span>
       </div>
       <div class="tltBtns">
-        <template v-if="isNormal">
+        <template v-if="selctedDeliveryGoods.data.isvalid">
           <BtnList :btnList="forDataBtn" />
         </template>
-        <template>
+        <template v-else>
           <a-button class="blueBtn">恢复</a-button>
         </template>
       </div>

+ 11 - 13
src/views/information/goods/list/spot-variety/setup.ts

@@ -64,19 +64,17 @@ export function handleDG() {
         deliveryGoodsList.value = res;
         res.forEach(e => {
             const { dgstatus, isvalid, deliverygoodsname, deliverygoodsid } = e.data
-            if (isvalid) { // 有效 
-                const normal = 'goods_info_spot_normal', disable = 'goods_info_spot_disable';
-                const result = { key: deliverygoodsid.toString(), title: deliverygoodsname }
-                if (dgstatus) { //1:正常
-                    if (menuMap.has(normal)) {
-                        const index = menuMap.get(normal) as number;
-                        menuList.value[index].children?.push(result)
-                    }
-                } else {    // 0:未激活 
-                    if (menuMap.has(disable)) {
-                        const index = menuMap.get(disable) as number;
-                        menuList.value[index].children?.push(result)
-                    }
+            const normal = 'goods_info_spot_normal', disable = 'goods_info_spot_disable';
+            const result = { key: deliverygoodsid.toString(), title: deliverygoodsname }
+            if (isvalid) { //1:正常
+                if (menuMap.has(normal)) {
+                    const index = menuMap.get(normal) as number;
+                    menuList.value[index].children?.push(result)
+                }
+            } else {    // 0:未激活 
+                if (menuMap.has(disable)) {
+                    const index = menuMap.get(disable) as number;
+                    menuList.value[index].children?.push(result)
                 }
             }
         })