huangbin пре 4 година
родитељ
комит
1e2268ba36

+ 1 - 1
src/views/business/purchase/components/detail/index.vue

@@ -20,7 +20,7 @@ import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 
 export default defineComponent({
-    name: 'custom-detail',
+    name: 'purchase_pending-detail',
     components: {},
     setup() {
         const { visible, cancel } = closeModal('detail');

+ 1 - 1
src/views/business/purchase/components/filterTable/index.vue

@@ -58,7 +58,7 @@ function handleSearch(context: SetupContext) {
 }
 
 export default defineComponent({
-    name: 'filter-custom-table',
+    name: 'purchase_pending-filter-table',
     components: {},
     setup(props, context) {
         return {

+ 46 - 0
src/views/business/purchase/components/funds/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 款项登记-->
+  <a-modal class="custom-detail"
+           title="款项登记"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">关闭</a-button>
+    </template>
+
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_funds',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_funds');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 46 - 0
src/views/business/purchase/components/invoice/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 发票登记-->
+  <a-modal class="custom-detail"
+           title="发票登记"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">关闭</a-button>
+    </template>
+
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_invoice',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_invoice');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 46 - 0
src/views/business/purchase/components/settlement/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 交收登记-->
+  <a-modal class="custom-detail"
+           title="交收登记"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">关闭</a-button>
+    </template>
+
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_settlement',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_settlement');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 1 - 1
src/views/business/purchase/components/someprice/index.vue

@@ -20,7 +20,7 @@ import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 
 export default defineComponent({
-    name: 'custom-detail',
+    name: 'purchase_pending_someprice',
     components: {},
     setup() {
         const { visible, cancel } = closeModal('purchase_pending_someprice');

+ 46 - 0
src/views/business/purchase/components/storage/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 入库登记-->
+  <a-modal class="custom-detail"
+           title="入库登记"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">关闭</a-button>
+    </template>
+
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'purchase_pending_storage',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('purchase_pending_storage');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 82 - 72
src/views/business/purchase/list/all/index.vue

@@ -1,83 +1,93 @@
 <template>
-    <!-- 采购: 实时敞口-->
-    <div class="purchase-real-time">
-        采购: 实时敞口
-    </div>
+  <!-- 采购: 履约交收-->
+  <div class="purchase-all"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <a-button class="operBtn"
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn"
+                 :tableList="tableList">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template> -->
+      </a-table>
+    </contextMenu>
+    <!-- 详情 -->
+    <Detail />
+    <!-- 采购点价登记 -->
+    <SomePrice />
+    <!-- 交收登记 -->
+    <Settlement />
+    <!-- 款项登记 -->
+    <Funds />
+    <!-- 发票登记 -->
+    <Invoice />
+    <!-- 入库登记 -->
+    <Storage />
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref } from 'vue';
-    import { QueryCustomInfo } from '@/services/go/ermcp/customInfo/index';
-    import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-    import { message } from 'ant-design-vue';
-    import { initData } from '@/common/methods';
+import { defineComponent } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '../../components/filterTable/index.vue';
+import { getTableList } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import Detail from '../../components/detail/index.vue';
+import Settlement from '../../components/settlement/index.vue';
+import Funds from '../../components/funds/index.vue';
+import Invoice from '../../components/invoice/index.vue';
+import Storage from '../../components/storage/index.vue';
+import SomePrice from '../../components/someprice/index.vue';
 
-    // 查询客户资料列表
-    function getCustomList() {
-        // const filteredInfo = ref();
-        // const sortedInfo = ref();
-        // const columns = computed(() => {
-        //     const filtered = filteredInfo.value || {};
-        //     const sorted = sortedInfo.value || {};
-        //     return [
-        //         {
-        //             title: '序号',
-        //             dataIndex: 'index',
-        //             key: 'index',
-        //             align: 'center',
-        //             width: 50,
-        //             customRender: (param: any) => `${param.index + 1}`,
-        //         },
-        //         {
-        //             title: 'Age',
-        //             dataIndex: 'age',
-        //             key: 'age',
-        //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
-        //             sortOrder: sorted.columnKey === 'age' && sorted.order,
-        //         },
-        //         {
-        //             title: 'Address',
-        //             dataIndex: 'address',
-        //             key: 'address',
-        //             filters: [
-        //                 { text: 'London', value: 'London' },
-        //                 { text: 'New York', value: 'New York' },
-        //             ],
-        //             filteredValue: filtered.address || null,
-        //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
-        //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
-        //             sortOrder: sorted.columnKey === 'address' && sorted.order,
-        //             ellipsis: true,
-        //         },
-        //     ];
-        // });
-        const customList = ref<QueryCustomInfoType[]>([]);
-        function actionQuery() {
-            QueryCustomInfo(4)
-                .then((res) => {
-                    console.log('L', res);
-                })
-                .catch((err) => message.error(err));
-        }
+export default defineComponent({
+    name: 'purchase-all',
+    components: {
+        contextMenu,
+        filterCustomTable,
+        Detail,
+        Settlement,
+        Funds,
+        Invoice,
+        Storage,
+        SomePrice,
+    },
+    setup() {
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('purchase_all');
 
-        return { customList, actionQuery };
-    }
+        initData(() => {
+            actionQuery(1);
+            getColumns();
+        });
 
-    export default defineComponent({
-        name: 'purchase-real-time',
-        components: {},
-        setup() {
-            const { customList, actionQuery } = getCustomList();
-            initData(() => {
-                actionQuery();
-                // 加载数据在这里
-            });
-            return { customList };
-        },
-    });
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .purchase-real-time {
-    }</style
+.purchase-history {
+}
+</style
 >;

+ 78 - 72
src/views/business/purchase/list/performance/index.vue

@@ -1,83 +1,89 @@
 <template>
-    <!-- 采购: 历史敞口-->
-    <div class="purchase-history">
-        采购:历史敞口
-    </div>
+  <!-- 采购: 履约交收-->
+  <div class="purchase-performance"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <a-button class="operBtn"
+                v-for="item in commonBtn"
+                :key="item.lable"
+                @click="item.callback">{{item.lable}}</a-button>
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn"
+                 :tableList="tableList">
+      <a-table :columns="columns"
+               class="topTable"
+               :pagination="false"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- <template #warehousetype="{ text }">
+          <span>{{ getWareHouseType(text) }}</span>
+        </template>
+        <template #warehousestatus="{ text }">
+          <span>{{ getWareHouseStatus(text) }}</span>
+        </template> -->
+      </a-table>
+    </contextMenu>
+    <!-- 详情 -->
+    <Detail />
+    <!-- 交收登记 -->
+    <Settlement />
+    <!-- 款项登记 -->
+    <Funds />
+    <!-- 发票登记 -->
+    <Invoice />
+    <!-- 入库登记 -->
+    <Storage />
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref } from 'vue';
-    import { QueryCustomInfo } from '@/services/go/ermcp/customInfo/index';
-    import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-    import { message } from 'ant-design-vue';
-    import { initData } from '@/common/methods';
+import { defineComponent } from 'vue';
+import { initData } from '@/common/methods';
+import filterCustomTable from '../../components/filterTable/index.vue';
+import { getTableList } from '../setup';
+import { getBtnList } from '@/common/setup/contextMenu/index';
+import contextMenu from '@/common/components/contextMenu/index.vue';
+import Detail from '../../components/detail/index.vue';
+import Settlement from '../../components/settlement/index.vue';
+import Funds from '../../components/funds/index.vue';
+import Invoice from '../../components/invoice/index.vue';
+import Storage from '../../components/storage/index.vue';
 
-    // 查询客户资料列表
-    function getCustomList() {
-        // const filteredInfo = ref();
-        // const sortedInfo = ref();
-        // const columns = computed(() => {
-        //     const filtered = filteredInfo.value || {};
-        //     const sorted = sortedInfo.value || {};
-        //     return [
-        //         {
-        //             title: '序号',
-        //             dataIndex: 'index',
-        //             key: 'index',
-        //             align: 'center',
-        //             width: 50,
-        //             customRender: (param: any) => `${param.index + 1}`,
-        //         },
-        //         {
-        //             title: 'Age',
-        //             dataIndex: 'age',
-        //             key: 'age',
-        //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
-        //             sortOrder: sorted.columnKey === 'age' && sorted.order,
-        //         },
-        //         {
-        //             title: 'Address',
-        //             dataIndex: 'address',
-        //             key: 'address',
-        //             filters: [
-        //                 { text: 'London', value: 'London' },
-        //                 { text: 'New York', value: 'New York' },
-        //             ],
-        //             filteredValue: filtered.address || null,
-        //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
-        //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
-        //             sortOrder: sorted.columnKey === 'address' && sorted.order,
-        //             ellipsis: true,
-        //         },
-        //     ];
-        // });
-        const customList = ref<QueryCustomInfoType[]>([]);
-        function actionQuery() {
-            QueryCustomInfo(4)
-                .then((res) => {
-                    console.log('L', res);
-                })
-                .catch((err) => message.error(err));
-        }
+export default defineComponent({
+    name: 'purchase-performance',
+    components: {
+        contextMenu,
+        filterCustomTable,
+        Detail,
+        Settlement,
+        Funds,
+        Invoice,
+        Storage,
+    },
+    setup() {
+        const { tableList, actionQuery, columns, filteredInfo, getColumns, search, loading } = getTableList();
+        const { commonBtn, forDataBtn } = getBtnList('purchase_performance');
 
-        return { customList, actionQuery };
-    }
+        initData(() => {
+            actionQuery(3);
+            getColumns();
+        });
 
-    export default defineComponent({
-        name: 'purchase-history',
-        components: {},
-        setup() {
-            const { customList, actionQuery } = getCustomList();
-            initData(() => {
-                actionQuery();
-                // 加载数据在这里
-            });
-            return { customList };
-        },
-    });
+        return {
+            tableList,
+            filteredInfo,
+            columns,
+            search,
+            loading,
+            commonBtn,
+            forDataBtn,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .purchase-history {
-    }</style
+.purchase-history {
+}
+</style
 >;