瀏覽代碼

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

huangbin 4 年之前
父節點
當前提交
e6b7ffbfe3

+ 0 - 33
src/views/information/warehouse-info/index.vue

@@ -1,33 +0,0 @@
-<template>
-    <!-- 仓库信息 -->
-    <div class="warehouse-info">
-        <firstMenu :list="list" :value="'title'" @selectMenu="selectMenu" />
-        <router-view />
-    </div>
-</template>
-
-<script lang="ts">
-    import { defineComponent } from 'vue';
-    import firstMenu from '@/common/components/firstMenu/index.vue';
-    import { handleRouterMenu } from '@/common/setup/router/index';
-    import { initData } from '@/common/methods';
-
-    export default defineComponent({
-        name: 'warehouse-info',
-        components: {
-            firstMenu,
-        },
-        setup() {
-            const { list, selectMenu, getMenuList } = handleRouterMenu();
-            initData(() => {
-                getMenuList();
-            });
-            return { list, selectMenu };
-        },
-    });
-</script>
-
-<style lang="less">
-    .warehouse-info {
-    }
-</style>;

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

@@ -4,7 +4,7 @@ import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface
 import { message } from 'ant-design-vue';
 import { ref } from 'vue';
 
-// 客户资料列表
+// 列表
 export function getTableList() {
     // 表格数据
     const tableList = ref<ErmcpWareHouseInfo[]>([]);

+ 0 - 23
src/views/manage/business-review/index.vue

@@ -1,23 +0,0 @@
-<template>
-  <!-- 业务审核 -->
-  <div class="business-review">
-    业务审核
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'business-review',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.business-review {
-}
-</style>;

+ 76 - 0
src/views/manage/business-review/list/settlement/index.vue

@@ -0,0 +1,76 @@
+<template>
+  <!-- 管理-业务审核-交收 -->
+  <div class="business-review-js"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template>
+      </a-table>
+    </contextMenu>
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '@/views/information/warehouse-info/compoments/filterTable/index.vue';
+import { getTableList } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
+
+export default defineComponent({
+    name: 'warehouse-info-normal',
+    components: {
+        contextMenu,
+        filterCustomTable,
+        BtnList,
+    },
+    setup() {
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal', true);
+
+        initData(() => {
+            actionQuery();
+            getColumns();
+        });
+
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+            ...handleTableEvent(),
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.business-review-js {
+}
+</style
+>;
+

+ 71 - 0
src/views/manage/business-review/list/settlement/setup.ts

@@ -0,0 +1,71 @@
+import { ColumnType, getTableHead } from '@/common/methods/table';
+import { QueryBusinessJs } from '@/services/go/ermcp/business-review/index';
+import { getUserId } from '@/services/bus/account';
+import { QryBussinessJsRsp } from '@/services/go/ermcp/business-review/interface';
+import { message } from 'ant-design-vue';
+import { ref } from 'vue';
+
+// 管理-业务审核-点价
+export function getTableList() {
+    // 表格数据
+    const tableList = ref<QryBussinessJsRsp[]>([]);
+    // 表头数据
+    const columns = ref<ColumnType[]>([]);
+    // 过滤项
+    const filteredInfo = ref();
+    const loading = ref<boolean>(false);
+    
+    // 获取表头
+    function getColumns() {
+        const list = getTableHead('table_pcweb_business_aduit_js');
+        const filtered = filteredInfo.value || {};
+        columns.value.length = 0;
+        list.forEach((e, i) => {
+            const { columnfield, columntitle, aligntype } = e;
+            const item: ColumnType = {
+                key: String(i),
+                dataIndex: columnfield, // 表格数据对应的key
+                title: columntitle,
+                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
+                slots: { customRender: columnfield },
+            };
+            // 以下添加过滤数据对应的方法
+            // if (e.columnfield === 'warehousetype') {
+            //     item.onFilter = (value: string, record: QryBusinessDjRsp) => String(record.warehousetype).includes(String(value));
+            //     item.filteredValue = filtered.warehousetype || null;
+            // }
+            // if (e.columnfield === 'warehousename') {
+            //     item.onFilter = (value: string, record: QryBusinessDjRsp) => record.warehousename.includes(value);
+            //     item.filteredValue = filtered.warehousename || null;
+            // }
+            // if (e.columnfield === 'address') {
+            //     item.onFilter = (value: string, record: QryBusinessDjRsp) => record.address.includes(value);
+            //     item.filteredValue = filtered.address || null;
+            // }
+            columns.value.push(item);
+        });
+    }
+    // 查询列表
+    function actionQuery() {
+        loading.value = true;
+        QueryBusinessJs({UserId: getUserId()})
+            .then((res) => {
+                tableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', tableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    // 查询
+    function search(value: any) {
+        filteredInfo.value = value;
+        getColumns();
+    }
+
+    return { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading, };
+}

+ 76 - 0
src/views/manage/business-review/list/someprice/index.vue

@@ -0,0 +1,76 @@
+<template>
+  <!-- 管理-业务审核-点价 -->
+  <div class="business-review-dj"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <!-- <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template> -->
+      </a-table>
+    </contextMenu>
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '@/views/information/warehouse-info/compoments/filterTable/index.vue';
+import { getTableList } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import { handleTableEvent } from '@/common/setup/event/index';
+import BtnList from '@/common/components/buttonList/index.vue';
+
+export default defineComponent({
+    name: 'warehouse-info-normal',
+    components: {
+        contextMenu,
+        filterCustomTable,
+        BtnList,
+    },
+    setup() {
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal', true);
+
+        initData(() => {
+            actionQuery();
+            getColumns();
+        });
+
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+            ...handleTableEvent(),
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.business-review-dj {
+}
+</style
+>;
+

+ 71 - 0
src/views/manage/business-review/list/someprice/setup.ts

@@ -0,0 +1,71 @@
+import { ColumnType, getTableHead } from '@/common/methods/table';
+import { QueryBusinessDj } from '@/services/go/ermcp/business-review/index';
+import { getUserId } from '@/services/bus/account';
+import { QryBusinessDjRsp } from '@/services/go/ermcp/business-review/interface';
+import { message } from 'ant-design-vue';
+import { ref } from 'vue';
+
+// 管理-业务审核-点价
+export function getTableList() {
+    // 表格数据
+    const tableList = ref<QryBusinessDjRsp[]>([]);
+    // 表头数据
+    const columns = ref<ColumnType[]>([]);
+    // 过滤项
+    const filteredInfo = ref();
+    const loading = ref<boolean>(false);
+    
+    // 获取表头
+    function getColumns() {
+        const list = getTableHead('table_pcweb_business_aduit_dj');
+        const filtered = filteredInfo.value || {};
+        columns.value.length = 0;
+        list.forEach((e, i) => {
+            const { columnfield, columntitle, aligntype } = e;
+            const item: ColumnType = {
+                key: String(i),
+                dataIndex: columnfield, // 表格数据对应的key
+                title: columntitle,
+                align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
+                slots: { customRender: columnfield },
+            };
+            // 以下添加过滤数据对应的方法
+            // if (e.columnfield === 'warehousetype') {
+            //     item.onFilter = (value: string, record: QryBusinessDjRsp) => String(record.warehousetype).includes(String(value));
+            //     item.filteredValue = filtered.warehousetype || null;
+            // }
+            // if (e.columnfield === 'warehousename') {
+            //     item.onFilter = (value: string, record: QryBusinessDjRsp) => record.warehousename.includes(value);
+            //     item.filteredValue = filtered.warehousename || null;
+            // }
+            // if (e.columnfield === 'address') {
+            //     item.onFilter = (value: string, record: QryBusinessDjRsp) => record.address.includes(value);
+            //     item.filteredValue = filtered.address || null;
+            // }
+            columns.value.push(item);
+        });
+    }
+    // 查询列表
+    function actionQuery() {
+        loading.value = true;
+        QueryBusinessDj({UserId: getUserId()})
+            .then((res) => {
+                tableList.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                loading.value = false;
+                console.log('查询列表', tableList);
+            })
+            .catch((err) => {
+                message.error(err);
+                loading.value = false;
+            });
+    }
+    // 查询
+    function search(value: any) {
+        filteredInfo.value = value;
+        getColumns();
+    }
+
+    return { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading, };
+}

+ 0 - 2
src/views/manage/business-review/setup.ts

@@ -1,2 +0,0 @@
-import { ColumnType, getTableHead } from '@/common/methods/table';
-