huangbin 4 年 前
コミット
3e2a0ea071

+ 5 - 5
src/common/constants/enumsName.ts

@@ -218,19 +218,19 @@ export function getPickUpStateName(type: number): string {
             result = "备货中";
             break
         case 2:
-            result = "待取货(自提)";
+            result = "待取货";
             break
         case 3:
-            result = "已取货(自提)";
+            result = "已取货";
             break
         case 4:
-            result = "待收货(邮寄)";
+            result = "待收货";
             break
         case 5:
-            result = "已收货(邮寄)";
+            result = "已收货";
             break
         case 6:
-            result = "自动收货(邮寄)";
+            result = "自动收货";
             break
         case 7:
             result = "已拒绝";

+ 3 - 2
src/views/platinum/platinum_pick_query/list/tab/index.vue

@@ -12,7 +12,7 @@
                :data-source="tableList">
         <!-- 额外的展开行 -->
         <template #expandedRowRender="{ record }">
-          <BtnList :btnList="firstBtn"
+          <BtnList :btnList="handleTableList(firstBtn, record)"
                    @onClick="btnClick(record)" />
         </template>
         <!-- 提货状态 -->
@@ -32,7 +32,7 @@
 <script lang="ts">
 import { defineComponent, initData, getTableColumns, getTableEvent, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
 import Filter from '../../compoments/filter/index.vue';
-import { queryTableList } from './setup';
+import { queryTableList, handleTableList } from './setup';
 import ControlModal from './compoments/controlModal/index.vue';
 import { QhjTradeGoodsPickup } from '@/services/go/ermcp/qhj/interface';
 import { getPickUpStateName, getTakeStateName } from '@/common/constants/enumsName';
@@ -72,6 +72,7 @@ export default defineComponent({
             btnClick,
             getPickUpStateName,
             getTakeStateName,
+            handleTableList,
         };
     },
 });

+ 21 - 0
src/views/platinum/platinum_pick_query/list/tab/setup.ts

@@ -1,3 +1,4 @@
+import { BtnList } from '@/common/components/buttonList/interface';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { queryTradeGoodsPickup } from '@/services/go/ermcp/qhj';
 import { QhjTradeGoodsPickup } from '@/services/go/ermcp/qhj/interface';
@@ -15,4 +16,24 @@ export function queryTableList() {
             })
     }
     return { loading, tableList, queryTable }
+}
+
+export function handleTableList(btnList: BtnList[], record: QhjTradeGoodsPickup): BtnList[] {
+    // 1:备货中  完成备货
+    // 2:待取货(自提) 确认取货
+    // 4:待收货(邮寄) 上传物流信息、确认收货
+    const arr: string[] = ['详情']
+    switch (record.takeorderstatus) {
+        case 1: // 1:备货中  完成备货
+            arr.push('完成备货')
+            break
+        case 2: // 2:待取货(自提) 确认取货
+            arr.push('确认取货')
+            break
+        case 4: // 4:待收货(邮寄) 上传物流信息、确认收货
+            arr.push('上传物流')
+            arr.push('确认收货')
+            break
+    }
+    return btnList.filter((e) => arr.includes(e.lable));
 }