Przeglądaj źródła

修好平安 仓库 表头

huangbin 4 lat temu
rodzic
commit
57023c9089

+ 12 - 1
src/views/information/warehouse-info/list/normal-use/index.vue

@@ -17,10 +17,14 @@
         <!-- 额外的展开行 -->
         <template #expandedRowRender="{ record }">
           <BtnList :selectedData="record"
-          class="btn-list-sticky"
+                   class="btn-list-sticky"
                    :btnList="forDataBtn"
                    @onClick="btnClick" />
         </template>
+        <template v-if="isPingAnOem()"
+                  #index="{ index }">
+          <span>{{ index + 1 }}</span>
+        </template>
         <template #warehousetype="{ text }">
           <span>{{ getWareHouseTypeName(text) }}</span>
         </template>
@@ -48,6 +52,8 @@
 import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 import { filterCustomTable, Add, Disable, Detail, Modify } from '../../compoments';
 import { gerWareHouseStatusName, getWareHouseTypeName, queryTableList, ErmcpWareHouseInfo } from '../index';
+import { isPingAnOem } from '@/common/config/projectName';
+import { pingan_cwarehousecolumn } from '../setup';
 
 export default defineComponent({
     name: 'warehouse-info-normal',
@@ -74,6 +80,10 @@ export default defineComponent({
             queryTable();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+            // 平安表头
+            if (isPingAnOem()) {
+                columns.value = pingan_cwarehousecolumn();
+            }
         });
 
         return {
@@ -91,6 +101,7 @@ export default defineComponent({
             gerWareHouseStatusName,
             queryTable,
             btnClick,
+            isPingAnOem,
         };
     },
 });

+ 59 - 3
src/views/information/warehouse-info/list/setup.ts

@@ -6,8 +6,8 @@ import { ref } from 'vue';
 
 /**
  * 获取表格列表数据
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function queryTableList(type: string) {
     // 加载状态
@@ -31,4 +31,60 @@ export function queryTableList(type: string) {
     return { loading, tableList, queryTable }
 }
 
-
+// 平安 仓库信息 表头
+export function pingan_cwarehousecolumn() {
+    return [
+        {
+            key: '9th',
+            dataIndex: 'index',
+            title: '序号',
+            align: 'center',
+            slots: {
+                customRender: 'index',
+            },
+            width: 80
+        },
+        {
+            key: '0th',
+            dataIndex: 'warehousestatus',
+            title: '状态',
+            align: 'center',
+            slots: {
+                customRender: 'warehousestatus',
+            },
+            width: 120,
+        },
+        {
+            key: '1th',
+            dataIndex: 'warehousecode',
+            title: '仓库简称',
+            align: 'center',
+            slots: {
+                customRender: 'warehousecode',
+            },
+            width: 120,
+        },
+        {
+            key: '2th',
+            dataIndex: 'warehousetype',
+            title: '仓库类型',
+            align: 'center',
+            slots: {
+                customRender: 'warehousetype',
+            },
+            width: 120,
+            filteredValue: null,
+        },
+        {
+            key: '3th',
+            dataIndex: 'warehousename',
+            title: '仓库名称',
+            align: 'center',
+            slots: {
+                customRender: 'warehousename',
+            },
+            width: 120,
+            filteredValue: null,
+        },
+    ];
+}

+ 11 - 0
src/views/information/warehouse-info/list/stop-use/index.vue

@@ -17,6 +17,10 @@
         <template #expandedRowRender="{  }">
           <BtnList :btnList="forDataBtn" />
         </template>
+        <template v-if="isPingAnOem()"
+                  #index="{ index }">
+          <span>{{ index + 1 }}</span>
+        </template>
         <template #warehousetype="{ text }">
           <span>{{ getWareHouseTypeName(text) }}</span>
         </template>
@@ -38,6 +42,8 @@
 import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 import { filterCustomTable, Detail, Recover } from '../../compoments';
 import { gerWareHouseStatusName, getWareHouseTypeName, queryTableList, ErmcpWareHouseInfo } from '../index';
+import { isPingAnOem } from '@/common/config/projectName';
+import { pingan_cwarehousecolumn } from '../setup';
 
 export default defineComponent({
     name: 'warehouse-info-stop',
@@ -62,6 +68,10 @@ export default defineComponent({
             queryTable();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_warehouse', ['warehousetype', 'warehousename', 'address']);
+            // 平安表头
+            if (isPingAnOem()) {
+                columns.value = pingan_cwarehousecolumn();
+            }
         });
 
         return {
@@ -78,6 +88,7 @@ export default defineComponent({
             getWareHouseTypeName,
             gerWareHouseStatusName,
             queryTable,
+            isPingAnOem,
         };
     },
 });