From 242d318e85df66b916f554d64a026cfe0cb58e19 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 15 一月 2026 10:26:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master
---
ui/admin-ui3/src/views/cwgl/fundFlow/index.vue | 434 +++++++++++++++++++++++++++++++++++-------------------
1 files changed, 282 insertions(+), 152 deletions(-)
diff --git a/ui/admin-ui3/src/views/cwgl/fundFlow/index.vue b/ui/admin-ui3/src/views/cwgl/fundFlow/index.vue
index 180a0df..d4a2394 100644
--- a/ui/admin-ui3/src/views/cwgl/fundFlow/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/fundFlow/index.vue
@@ -1,175 +1,305 @@
<template>
- <basicContainer >
- <avue-crud
- :option="option"
- :table-loading="pageF.loading"
- :data="tableData"
- :page="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- v-model="form"
- ref="crudRef"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @refresh-change="refreshChange"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @on-load="onLoad"
- >
+ <basicContainer>
+ <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
+ :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
+ @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+ @size-change="sizeChange" @on-load="onLoad">
<template #menu-left>
- <el-button
- type="success"
- icon="Edit"
- :disabled="pageF.single"
- v-hasPermi="['cwgl:fundFlow:edit']"
- @click="handleUpdate">淇敼
+ <!-- <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:fundFlow:edit']"
+ @click="handleUpdate">淇敼
</el-button>
- <el-button
- type="danger"
- icon="Delete"
- :disabled="pageF.multiple"
- @click="handleDelete"
- v-hasPermi="['cwgl:fundFlow:remove']"
- >鍒犻櫎
+ <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+ v-hasPermi="['cwgl:fundFlow:remove']">鍒犻櫎
+ </el-button> -->
+ <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['cwgl:fundFlow:export']">瀵煎嚭
</el-button>
- <el-button
- type="warning"
- plain
- icon="Download"
- @click="handleExport"
- v-hasPermi="['cwgl:fundFlow:export']"
- >瀵煎嚭
- </el-button>
+ </template>
+ <template #menu="{ size, row, index }">
+ <el-link v-if="row.status == '0'" class="link-btn" type="primary" icon="Edit" :underline="false" :size="size"
+ @click="crudRef.rowEdit(row, index)"> 淇敼
+ </el-link>
+
+ <el-link v-if="row.status == '0'" class="link-btn" type="primary" icon="Position" :underline="false"
+ :size="size" @click="makeInvoice(row)" v-hasPermi="['cwgl:fundFlow:confirm']"> 纭
+ </el-link>
+ <el-link v-if="row.status == '0'" class="link-btn" type="primary" icon="Delete" :underline="false" :size="size"
+ @click="crudRef.rowDel(row, index)"> 鍒犻櫎
+ </el-link>
+ <el-link v-if="['1', '2'].includes(String(row.status))" class="link-btn" type="primary" icon="Position"
+ :underline="false" :size="size" @click="handleClaim(row)" v-hasPermi="['cwgl:fundFlow:claim']">
+ 璐﹀崟璁ら
+ </el-link>
+ <el-link v-if="['1', '2','3'].includes(String(row.status))" class="link-btn" type="primary" icon="Position"
+ :underline="false" :size="size" @click="handleDetails(row)" v-hasPermi="['cwgl:fundFlow:edit']">
+ 璁ら鏄庣粏
+ </el-link>
+ <el-button type="text" icon="View" @click="handleFlow(row)"
+ v-hasPermi="['cwgl:fundFlow:flow']">鏃ュ織</el-button>
+ <!-- <el-button type="text" icon="View" @click="handleFlow(row)"
+ v-hasPermi="['cwgl:invoiceManage:flow']">鏃ュ織</el-button> -->
+
</template>
</avue-crud>
</basicContainer>
+ <OperationLogModal ref="logModalRef" />
+
+ <ClaimBillDialog ref="claimDialogRef" @submit="handleClaimSubmit" />
</template>
<script setup name="fundFlow" lang="ts">
- import {FundFlowI,addFundFlow, delFundFlow, exportFundFlow, getFundFlow, listFundFlow, updateFundFlow} from "@/api/cwgl/fundFlow";
- import useCurrentInstance from "@/utils/useCurrentInstance";
- import {computed,reactive, ref, toRefs} from "vue";
- import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
- import {usePagePlus} from "@/hooks/usePagePlus";
- import {hasPermission} from "@/utils/permissionUtils";
+import { FundFlowI, addFundFlow, delFundFlow, addFundFlowClaimDetailClaim, exportFundFlow, confirmFundFlow, getFundFlow, listFundFlow, updateFundFlow } from "@/api/cwgl/fundFlow";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+ import { listFundFlowLog} from "@/api/cwgl/fundFlowLog";
- const { proxy } = useCurrentInstance();
- const crudRef = ref();
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
+import { listFundFlowClaimDetail } from "@/api/cwgl/fundFlowClaimDetail";
+import OperationLogModal from '@/components/OperationLogModal/index.vue';
- const permissionList = computed(()=>{
- return {
- addBtn: hasPermission(["cwgl:fundFlow:add"]),
- delBtn: hasPermission(["cwgl:fundFlow:remove"]),
- editBtn: hasPermission(["cwgl:fundFlow:edit"]),
- viewBtn: hasPermission(["cwgl:fundFlow:query"]),
- }
- })
+import ClaimBillDialog from "../../../components/ClaimBillDialog/index.vue";
- const data = reactive({
- form:<FundFlowI>{},
- queryParams:<FundFlowI&PageQueryInterface>{},
- page: <PagesInterface>{
- pageSize: 10,
- total: 0,
- currentPage: 1,
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
+
+const permissionList = computed(() => {
+ return {
+ addBtn: hasPermission(["cwgl:fundFlow:add"]),
+ delBtn: hasPermission(["cwgl:fundFlow:remove"]),
+ editBtn: hasPermission(["cwgl:fundFlow:edit"]),
+ viewBtn: hasPermission(["cwgl:fundFlow:query"]),
+ }
+})
+
+const data = reactive({
+ form: <FundFlowI>{},
+ queryParams: <FundFlowI & PageQueryInterface>{},
+ page: <PagesInterface>{
+ pageSize: 10,
+ total: 0,
+ currentPage: 1,
+ },
+ selectionList: [],
+})
+const { queryParams, form, page, selectionList } = toRefs(data);
+const option = ref({
+ pageKey: 'FundFlow',
+ rowKey: 'id',
+ searchSpan: 5,
+ labelWidth: 180,
+ searchLabelWidth: 150,
+ delBtn: false,
+ editBtn: false,
+ column: {
+ // id: {
+ // label: 'ID',
+ // },
+ bankFlowNo: {
+ label: '閾惰娴佹按鍙�',
+ minWidth: 120,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "閾惰娴佹按鍙蜂笉鑳戒负绌�", trigger: "blur"
+ }
+ ],
},
- selectionList:[],
- })
- const {queryParams,form,page,selectionList} = toRefs(data);
- const option = ref({
- pageKey: 'FundFlow',
- rowKey: 'id',
- column: {
- id: {
- label: 'ID',
- },
- bankFlowNo: {
- label: '閾惰娴佹按鍙�',
- rules: [
- {
- required: true,
- message: "閾惰娴佹按鍙蜂笉鑳戒负绌�", trigger: "blur" }
- ], },
- company: {
- label: '鍗曚綅',
- },
- ourAccount: {
- label: '鏈柟璐﹀彿',
- },
- ourBankName: {
- label: '鏈柟璐︽埛寮�鎴疯',
- },
- incomeExpenseFlag: {
- label: '鏀舵敮鏍囪瘑鍊熻捶鏍囧織 0-鏀� 1-鏀�',
- },
- transactionAmount: {
- label: '浜ゆ槗閲戦',
- },
- currency: {
- label: '浜ゆ槗甯佺',
- },
- counterpartyAccount: {
- label: '瀵规柟璐﹀彿',
- },
- counterpartyName: {
- label: '瀵规柟鎴峰悕',
- },
- transactionDate: {
- label: '浜ゆ槗鏃ユ湡',
- },
- purpose: {
- label: '鐢ㄩ��',
- },
- summary: {
- label: '鎽樿',
- type: 'textarea', minRows: 3, maxRows: 5,
- },
- remarks: {
- label: '闄勮█',
- type: 'textarea', minRows: 3, maxRows: 5,
- },
- createBy: {
- label: '鍒涘缓鑰�',
- },
- createTime: {
- label: '鍒涘缓鏃堕棿',
- },
- updateBy: {
- label: '鏇存柊鑰�',
- },
- updateTime: {
- label: '鏇存柊鏃堕棿',
- },
- delFlag: {
- label: '鍒犻櫎鏍囧織',
- },
- }
- })
+ company: {
+ label: '鍗曚綅',
+ minWidth: 120,
+ },
+ ourAccount: {
+ label: '鏈柟璐﹀彿',
+ search: true,
+ minWidth: 120,
+ },
+ ourBankName: {
+ label: '鏈柟璐︽埛寮�鎴疯',
+ minWidth: 120,
+ },
+ incomeExpenseFlag: {
+ label: '鏀舵敮鏍囪瘑',
+ type: 'radio', // 璁剧疆涓哄崟閫夋寜閽�
+ search: true, // 濡傛灉闇�瑕佸湪鎼滅储鏍忎篃鏄剧ず
+ dicUrl: '/system/dict/data/type/sys_income_expenses',
+ rules: [
+ {
+ required: true,
+ message: "璇烽�夋嫨鏀舵敮鏍囪瘑",
+ trigger: "blur"
+ }
+ ],
+ },
+ transactionAmount: {
+ label: '浜ゆ槗閲戦',
+ },
+ currency: {
+ label: '浜ゆ槗甯佺',
+ search: true,
+ minWidth: 120,
+ dataType: 'string',
+ type: 'select',
+ // addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ // editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: false,
+ dicUrl: '/system/dict/data/type/sys_currency',
+ },
+ counterpartyAccount: {
+ minWidth: 150,
+ label: '瀵规柟璐﹀彿',
+ search: true,
+ },
+ counterpartyName: {
+ minWidth: 150,
+ label: '瀵规柟鎴峰悕',
+ search: true,
+ },
+ transactionDate: {
+ minWidth: 200,
+ // search: true,
+ label: '浜ゆ槗鏃ユ湡',
+ type: 'datetime', // 绫诲瀷鏀逛负 datetime
+ format: 'YYYY-MM-DD HH:mm:ss', // 鐣岄潰鏄剧ず鐨勬牸寮�
+ valueFormat: 'YYYY-MM-DD HH:mm:ss', // 鎻愪氦缁欏悗鍙扮殑鏁版嵁鏍煎紡
+ // search: true, // 濡傛灉寮�鍚悳绱�
+ rules: [
+ {
+ required: true,
+ message: "璇烽�夋嫨浜ゆ槗鏃ユ湡",
+ trigger: "change"
+ }
+ ],
- const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
- searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
- form:form,
- option:option,
- queryParams:queryParams,
- idKey:'id',
- page:page.value,
- getListApi:listFundFlow,
- getDetailApi:getFundFlow,
- exportApi:exportFundFlow,
- deleteApi:delFundFlow,
- addApi:addFundFlow,
- updateApi:updateFundFlow,
- handleUpdateFunc:()=>{
+ },
+ purpose: {
+ label: '鐢ㄩ��',
+ minWidth: 150,
+ },
+ summary: {
+ label: '鎽樿',
+ type: 'textarea', minRows: 3, maxRows: 5,
+ hide: true,
+ },
+ remarks: {
+ label: '闄勮█',
+ hide: true,
+ type: 'textarea', minRows: 3, maxRows: 5,
+ },
+ status: {
+ minWidth: 120,
+ label: '鐘舵��',
+ fixed: 'right',
+ value: '0',
+ addDisplay: false, // 琛ㄥ崟涓嶆樉绀�
+ editDisplay: false,
+ viewDisplay: true,
+ dicUrl: '/system/dict/data/type/sys_capital_status',
+ },
+ // createBy: {
+ // label: '鍒涘缓鑰�',
+ // },
+ // createTime: {
+ // label: '鍒涘缓鏃堕棿',
+ // },
+ // updateBy: {
+ // label: '鏇存柊鑰�',
+ // },
+ // updateTime: {
+ // label: '鏇存柊鏃堕棿',
+ // },
+ // delFlag: {
+ // label: '鍒犻櫎鏍囧織',
+ // },
+ }
+})
+
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+ searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+ form: form,
+ option: option,
+ queryParams: queryParams,
+ idKey: 'id',
+ page: page.value,
+ getListApi: listFundFlow,
+ getDetailApi: getFundFlow,
+ exportApi: exportFundFlow,
+ deleteApi: delFundFlow,
+ addApi: addFundFlow,
+ updateApi: updateFundFlow,
+ handleUpdateFunc: () => {
crudRef.value.rowEdit(selectionList.value[0]);
},
- handleSelectionChangeFunc:(selection:any)=>{
+ handleSelectionChangeFunc: (selection: any) => {
selectionList.value = selection;
}
})
+const makeInvoice = (row: any) => {
+ proxy.$modal.confirm('鏄惁纭閾惰娴佹按鍙蜂负"' + row.bankFlowNo + '"?').then(function () {
+ return confirmFundFlow(row.id);
+ }).then(() => {
+ onLoad(page.value);
+ proxy.$modal.msgSuccess("纭鎴愬姛");
+ }).catch(() => { });
+}
+
+
+const claimDialogRef = ref();
+// fundFlowId
+
+const handleClaim = (row: any) => {
+ getFundFlow(row.id).then((response) => {
+ if (response.code == 200) {
+ listFundFlowClaimDetail({ fundFlowId: row.id }).then((res) => {
+ if (res.code == 200) {
+ response.data.claimDetails = res.rows;
+ claimDialogRef.value.open(response.data);
+ claimDialogRef.value.open(response.data, 'edit');
+ }
+ })
+ }
+ })
+
+};
+
+const handleClaimSubmit = (payload) => {
+ addFundFlowClaimDetailClaim(payload.claimDetails, payload.id).then((response) => {
+ if (response.code == 200) {
+ onLoad(page.value);
+ proxy.$modal.msgSuccess("璁ら鎴愬姛");
+ claimDialogRef.value.handleCancel();
+ }
+ })
+ // console.log("鏈�缁堟彁浜ょ粰鍚庣鐨勬暟鎹寘:", payload);
+};
+
+const handleDetails = (row: any) => {
+ getFundFlow(row.id).then((response) => {
+ if (response.code == 200) {
+ listFundFlowClaimDetail({ fundFlowId: row.id }).then((res) => {
+ if (res.code == 200) {
+ response.data.claimDetails = res.rows;
+ claimDialogRef.value.open(response.data, 'view');
+
+ }
+ })
+ }
+ })
+
+};
+
+const logModalRef = ref(null);
+const handleFlow = (row: any,) => {
+ // 杩欓噷鍙互浠� row 涓洿鎺ヨ幏鍙栨棩蹇楋紝鎴栬�呰皟鐢ㄥ悗绔帴鍙f煡璇�
+ listFundFlowLog({flowId:row.id}).then((res) => {
+ if (res.code == 200) {
+ logModalRef.value.open(res.rows,'payable');
+ }
+ });
+}
+/* listFundFlowClaimDetail */
</script>
--
Gitblit v1.8.0