Pārlūkot izejas kodu

资金流水增加内部转账功能

cz 1 gadu atpakaļ
vecāks
revīzija
a1009f7eb4

+ 32 - 8
src/components/contractCom/contractDetails.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div style="background: #fff; padding: 0 20px">
     <el-tabs
       v-model="activeName"
       class="demo-tabs"
@@ -70,12 +70,14 @@
   </div>
 </template>
 
-<script setup>
+<script setup  >
 import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
 import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
 
 import byTable from "@/components/byTable/index";
 const { proxy } = getCurrentInstance();
+import { useRoute } from "vue-router";
+const route = useRoute();
 const props = defineProps({
   contractId: String,
 });
@@ -181,6 +183,23 @@ const pushProcessApproval = (row) => {
   return;
 };
 
+// const pushProcessApproval = (row) => {
+//   // 新页面打开方式
+//   const page = proxy.$router.resolve({
+//     path: "/platform_manage/process/processApproval",
+//     query: {
+//       flowKey: "contract_flow",
+//       id: row.flowId,
+//       processType: 20,
+//       random: proxy.random(),
+//       flowName: "销售合同详情",
+//       tenantType: "EHSD",
+//       businessId: row.id,
+//     },
+//   });
+//   window.open(page.href, "_blank");
+// };
+
 const handleChange = (val) => {
   if (val === "first") {
     leftList.value = contractDataList.value;
@@ -192,9 +211,9 @@ const handleChange = (val) => {
     handleItemClick(leftList.value[0]);
   }
 };
-const getDetailsData = () => {
+const getDetailsData = (id) => {
   proxy
-    .post("/contract/getVersionList", { id: props.contractId })
+    .post("/contract/getVersionList", { id: id })
     .then((res) => {
       contractDataList.value = res;
       leftList.value = contractDataList.value;
@@ -203,27 +222,32 @@ const getDetailsData = () => {
       }
     });
   proxy
-    .post("/contract/getPurchaseListByContractId", { id: props.contractId })
+    .post("/contract/getPurchaseListByContractId", { id: id })
     .then((res) => {
       purchaseDataList.value = res;
     });
 
   proxy
     .post("/contract/getAccountRunningWaterByContractId", {
-      id: props.contractId,
+      id: id,
     })
     .then((res) => {
       tableData.value = res;
     });
 };
-getDetailsData();
+if(props.contractId){
+  getDetailsData(props.contractId);
+}
+if (route.query.currentContractId) {
+  getDetailsData(route.query.currentContractId);
+}
 </script>
 
 <style lang="scss" scoped>
 .content-box {
   display: flex;
   .left {
-    width: 130px;
+    width: 140px;
     // background: #ccc;
     .left-item {
       height: 36px;

+ 33 - 13
src/components/contractCom/contractDetailsOne.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div style="background: #fff; padding: 0 20px">
     <el-tabs
       v-model="activeName"
       class="demo-tabs"
@@ -22,7 +22,7 @@
         >
           <div v-if="activeName === 'first'">
             <!-- v {{ i.version || index + 1 }} -->
-            {{ props.code }}
+            {{ i.code }}
           </div>
           <div v-if="activeName === 'second'">
             {{ i.code }}
@@ -76,9 +76,10 @@
 <script setup>
 import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
 import SamplePDF from "@/components/PDF/samplePDF.vue";
-
 import byTable from "@/components/byTable/index";
 const { proxy } = getCurrentInstance();
+import { useRoute } from "vue-router";
+const route = useRoute();
 const props = defineProps({
   sampleId: String,
   code: String,
@@ -184,6 +185,22 @@ const pushProcessApproval = (row) => {
   });
   return;
 };
+
+// const pushProcessApproval = (row) => {
+//   const page = proxy.$router.resolve({
+//     path: "/platform_manage/process/processApproval",
+//     query: {
+//       flowKey: "sample_flow",
+//       id: row.flowId,
+//       processType: 20,
+//       random: proxy.random(),
+//       flowName: "样品单详情",
+//       tenantType: "EHSD",
+//       businessId: row.id,
+//     },
+//   });
+//   window.open(page.href, "_blank");
+// };
 const handleChange = (val) => {
   if (val === "first") {
     leftList.value = sampleDataList.value;
@@ -196,36 +213,39 @@ const handleChange = (val) => {
   }
 };
 
-const getDetailsData = () => {
-  proxy.post("/sample/getVersionList", { id: props.sampleId }).then((res) => {
+const getDetailsData = (id) => {
+  proxy.post("/sample/getVersionList", { id: id }).then((res) => {
     sampleDataList.value = res;
     leftList.value = sampleDataList.value;
     if (sampleDataList.value && sampleDataList.value.length > 0) {
       handleItemClick(sampleDataList.value[0]);
     }
   });
-  proxy
-    .post("/sample/getPurchaseListBySampleId", { id: props.sampleId })
-    .then((res) => {
-      purchaseDataList.value = res;
-    });
+  proxy.post("/sample/getPurchaseListBySampleId", { id: id }).then((res) => {
+    purchaseDataList.value = res;
+  });
 
   proxy
     .post("/sample/getAccountRunningWaterBySampleId", {
-      id: props.sampleId,
+      id: id,
     })
     .then((res) => {
       tableData.value = res;
     });
 };
-getDetailsData();
+if (props.sampleId) {
+  getDetailsData(props.sampleId);
+}
+if (route.query.currentSampleId) {
+  getDetailsData(route.query.currentSampleId);
+}
 </script>
 
 <style lang="scss" scoped>
 .content-box {
   display: flex;
   .left {
-    width: 130px;
+    width: 140px;
     // background: #ccc;
     .left-item {
       height: 36px;

+ 11 - 5
src/components/process/EHSD/Contract.vue

@@ -25,7 +25,7 @@
             <el-select
               v-model="formData.data.sellCorporationId"
               style="width: 100%"
-              disabled
+              filterable
             >
               <el-option
                 v-for="item in corporationList"
@@ -995,8 +995,11 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractTemplateId: [
-    { required: true, message: "请选择合同模板", trigger: "change" },
+  // contractTemplateId: [
+  //   { required: true, message: "请选择合同模板", trigger: "change" },
+  // ],
+  sellCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
   ],
   buyCorporationId: [
     { required: true, message: "请选择公司", trigger: "change" },
@@ -1032,8 +1035,11 @@ const rules = ref({
   advanceRatio: [
     { required: true, message: "请输入预付比例", trigger: "blur" },
   ],
-  shroffAccountId: [
-    { required: true, message: "请选择收款账号", trigger: "change" },
+  // shroffAccountId: [
+  //   { required: true, message: "请选择收款账号", trigger: "change" },
+  // ],
+  beneficiaryName: [
+    { required: true, message: "请输入Beneficiary Name", trigger: "blur" },
   ],
   // tradeMethods: [
   //   { required: true, message: "请选择贸易方式", trigger: "change" },

+ 11 - 5
src/components/process/EHSD/ContractChange.vue

@@ -13,7 +13,7 @@
             <el-select
               v-model="formData.data.sellCorporationId"
               style="width: 100%"
-              disabled
+              filterable
             >
               <el-option
                 v-for="item in corporationList"
@@ -973,8 +973,11 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractTemplateId: [
-    { required: true, message: "请选择合同模板", trigger: "change" },
+  // contractTemplateId: [
+  //   { required: true, message: "请选择合同模板", trigger: "change" },
+  // ],
+  sellCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
   ],
   buyCorporationId: [
     { required: true, message: "请选择公司", trigger: "change" },
@@ -1010,8 +1013,11 @@ const rules = ref({
   advanceRatio: [
     { required: true, message: "请输入预付比例", trigger: "blur" },
   ],
-  shroffAccountId: [
-    { required: true, message: "请选择收款账号", trigger: "change" },
+  // shroffAccountId: [
+  //   { required: true, message: "请选择收款账号", trigger: "change" },
+  // ],
+  beneficiaryName: [
+    { required: true, message: "请输入Beneficiary Name", trigger: "blur" },
   ],
   // tradeMethods: [
   //   { required: true, message: "请选择贸易方式", trigger: "change" },

+ 11 - 5
src/components/process/EHSD/Sample.vue

@@ -13,7 +13,7 @@
             <el-select
               v-model="formData.data.sellCorporationId"
               style="width: 100%"
-              disabled
+              filterable
             >
               <el-option
                 v-for="item in corporationList"
@@ -971,8 +971,11 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractTemplateId: [
-    { required: true, message: "请选择合同模板", trigger: "change" },
+  // contractTemplateId: [
+  //   { required: true, message: "请选择合同模板", trigger: "change" },
+  // ],
+  sellCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
   ],
   buyCorporationId: [
     { required: true, message: "请选择公司", trigger: "change" },
@@ -1008,8 +1011,11 @@ const rules = ref({
   advanceRatio: [
     { required: true, message: "请输入预付比例", trigger: "blur" },
   ],
-  shroffAccountId: [
-    { required: true, message: "请选择收款账号", trigger: "change" },
+  // shroffAccountId: [
+  //   { required: true, message: "请选择收款账号", trigger: "change" },
+  // ],
+  beneficiaryName: [
+    { required: true, message: "请输入Beneficiary Name", trigger: "blur" },
   ],
   tradeMethods: [
     { required: true, message: "请选择贸易方式", trigger: "change" },

+ 11 - 5
src/components/process/EHSD/SampleChange.vue

@@ -13,7 +13,7 @@
             <el-select
               v-model="formData.data.sellCorporationId"
               style="width: 100%"
-              disabled
+              filterable
             >
               <el-option
                 v-for="item in corporationList"
@@ -982,8 +982,11 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  contractTemplateId: [
-    { required: true, message: "请选择合同模板", trigger: "change" },
+  // contractTemplateId: [
+  //   { required: true, message: "请选择合同模板", trigger: "change" },
+  // ],
+  sellCorporationId: [
+    { required: true, message: "请选择公司", trigger: "change" },
   ],
   buyCorporationId: [
     { required: true, message: "请选择公司", trigger: "change" },
@@ -1019,8 +1022,11 @@ const rules = ref({
   advanceRatio: [
     { required: true, message: "请输入预付比例", trigger: "blur" },
   ],
-  shroffAccountId: [
-    { required: true, message: "请选择收款账号", trigger: "change" },
+  // shroffAccountId: [
+  //   { required: true, message: "请选择收款账号", trigger: "change" },
+  // ],
+  beneficiaryName: [
+    { required: true, message: "请输入Beneficiary Name", trigger: "blur" },
   ],
   tradeMethods: [
     { required: true, message: "请选择贸易方式", trigger: "change" },

+ 93 - 59
src/router/index.js

@@ -1,4 +1,7 @@
-import { createWebHistory, createRouter } from "vue-router";
+import {
+  createWebHistory,
+  createRouter
+} from "vue-router";
 /* Layout */
 import Layout from "@/layout";
 
@@ -25,17 +28,14 @@ import Layout from "@/layout";
  */
 
 // 公共路由
-export const constantRoutes = [
-  {
+export const constantRoutes = [{
     path: "/redirect",
     component: Layout,
     hidden: true,
-    children: [
-      {
-        path: "/redirect/:path(.*)",
-        component: () => import("@/views/redirect/index.vue"),
-      },
-    ],
+    children: [{
+      path: "/redirect/:path(.*)",
+      component: () => import("@/views/redirect/index.vue"),
+    }, ],
   },
   {
     path: "/login",
@@ -61,18 +61,45 @@ export const constantRoutes = [
     path: "",
     component: Layout,
     redirect: "/index",
-    children: [
-      {
+    children: [{
         path: "/index",
         component: () => import("@/views/index"),
         name: "Index",
-        meta: { title: "首页", icon: "dashboard", affix: true },
+        meta: {
+          title: "首页",
+          icon: "dashboard",
+          affix: true
+        },
       },
       {
         path: "/platform_manage/process/processApproval",
         component: () => import("@/views/process/processApproval/index.vue"),
         name: "ProcessApproval",
-        meta: { title: "流程审批", icon: "dashboard", affix: false },
+        meta: {
+          title: "流程审批",
+          icon: "dashboard",
+          affix: false
+        },
+      },
+      {
+        path: "/sampleDetails",
+        component: () => import("@/components/contractCom/contractDetailsOne.vue"),
+        name: "sampleDetails",
+        meta: {
+          title: "样品单详情",
+          icon: "dashboard",
+          affix: false
+        },
+      },
+      {
+        path: "/contractDetails",
+        component: () => import("@/components/contractCom/contractDetails.vue"),
+        name: "contractDetails",
+        meta: {
+          title: "合同详情",
+          icon: "dashboard",
+          affix: false
+        },
       },
     ],
   },
@@ -81,87 +108,92 @@ export const constantRoutes = [
     component: Layout,
     hidden: true,
     redirect: "noredirect",
-    children: [
-      {
-        path: "profile",
-        component: () => import("@/views/system/user/profile/index"),
-        name: "Profile",
-        meta: { title: "个人中心", icon: "user" },
+    children: [{
+      path: "profile",
+      component: () => import("@/views/system/user/profile/index"),
+      name: "Profile",
+      meta: {
+        title: "个人中心",
+        icon: "user"
       },
-    ],
+    }, ],
   },
 ];
 // 动态路由,基于用户权限动态去加载
-export const dynamicRoutes = [
-  {
+export const dynamicRoutes = [{
     path: "/system/user-auth",
     component: Layout,
     hidden: true,
     permissions: ["system:user:edit"],
-    children: [
-      {
-        path: "role/:userId(\\d+)",
-        component: () => import("@/views/system/user/authRole"),
-        name: "AuthRole",
-        meta: { title: "分配角色", activeMenu: "/system/user" },
+    children: [{
+      path: "role/:userId(\\d+)",
+      component: () => import("@/views/system/user/authRole"),
+      name: "AuthRole",
+      meta: {
+        title: "分配角色",
+        activeMenu: "/system/user"
       },
-    ],
+    }, ],
   },
   {
     path: "/system/role-auth",
     component: Layout,
     hidden: true,
     permissions: ["system:role:edit"],
-    children: [
-      {
-        path: "user/:roleId(\\d+)",
-        component: () => import("@/views/system/role/authUser"),
-        name: "AuthUser",
-        meta: { title: "分配用户", activeMenu: "/system/role" },
+    children: [{
+      path: "user/:roleId(\\d+)",
+      component: () => import("@/views/system/role/authUser"),
+      name: "AuthUser",
+      meta: {
+        title: "分配用户",
+        activeMenu: "/system/role"
       },
-    ],
+    }, ],
   },
   {
     path: "/system/dict-data",
     component: Layout,
     hidden: true,
     permissions: ["system:dict:list"],
-    children: [
-      {
-        path: "index/:dictId(\\d+)",
-        component: () => import("@/views/system/dict/data"),
-        name: "Data",
-        meta: { title: "字典数据", activeMenu: "/system/dict" },
+    children: [{
+      path: "index/:dictId(\\d+)",
+      component: () => import("@/views/system/dict/data"),
+      name: "Data",
+      meta: {
+        title: "字典数据",
+        activeMenu: "/system/dict"
       },
-    ],
+    }, ],
   },
   {
     path: "/monitor/job-log",
     component: Layout,
     hidden: true,
     permissions: ["monitor:job:list"],
-    children: [
-      {
-        path: "index/:jobId(\\d+)",
-        component: () => import("@/views/monitor/job/log"),
-        name: "JobLog",
-        meta: { title: "调度日志", activeMenu: "/monitor/job" },
+    children: [{
+      path: "index/:jobId(\\d+)",
+      component: () => import("@/views/monitor/job/log"),
+      name: "JobLog",
+      meta: {
+        title: "调度日志",
+        activeMenu: "/monitor/job"
       },
-    ],
+    }, ],
   },
   {
     path: "/tool/gen-edit",
     component: Layout,
     hidden: true,
     permissions: ["tool:gen:edit"],
-    children: [
-      {
-        path: "index/:tableId(\\d+)",
-        component: () => import("@/views/tool/gen/editTable"),
-        name: "GenEdit",
-        meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
+    children: [{
+      path: "index/:tableId(\\d+)",
+      component: () => import("@/views/tool/gen/editTable"),
+      name: "GenEdit",
+      meta: {
+        title: "修改生成配置",
+        activeMenu: "/tool/gen"
       },
-    ],
+    }, ],
   },
 ];
 
@@ -172,9 +204,11 @@ const router = createRouter({
     if (savedPosition) {
       return savedPosition;
     } else {
-      return { top: 0 };
+      return {
+        top: 0
+      };
     }
   },
 });
 
-export default router;
+export default router;

+ 10 - 2
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -760,8 +760,16 @@ const showSelect = (item) => {
 
 const currentContractId = ref("");
 const openDetails = (row) => {
-  currentContractId.value = row.id;
-  openDetailsDialog.value = true;
+  // currentContractId.value = row.id;
+  // openDetailsDialog.value = true;
+  // 新页面打开方式
+  const page = proxy.$router.resolve({
+    name: "contractDetails",
+    query: {
+      currentContractId: row.id,
+    },
+  });
+  window.open(page.href, "_blank");
 };
 
 const computeScale = (item) => {

+ 12 - 3
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -747,9 +747,18 @@ const tagClose = (val, item) => {
 const currentSampleId = ref("");
 const currentCode = ref("");
 const openDetails = (row) => {
-  currentSampleId.value = row.id;
-  currentCode.value = row.code;
-  openDetailsDialog.value = true;
+  // currentSampleId.value = row.id;
+  // currentCode.value = row.code;
+  // openDetailsDialog.value = true;
+
+  // 新页面打开方式
+  const page = proxy.$router.resolve({
+    name: "sampleDetails",
+    query: {
+      currentSampleId: row.id,
+    },
+  });
+  window.open(page.href, "_blank");
 };
 
 const showSelect = (item) => {

+ 183 - 0
src/views/finance/fundManage/accountStatement/index.vue

@@ -14,6 +14,10 @@
           //   action: () => deriveExcel(),
           // },
           {
+            text: '内部转账',
+            action: () => openModalTwo('add'),
+          },
+          {
             text: '退税登记',
             action: () => openModalOne('add'),
           },
@@ -246,6 +250,30 @@
       </template>
     </el-dialog>
 
+    <el-dialog
+      :title="'内部转账'"
+      v-if="dialogVisibleTwo"
+      v-model="dialogVisibleTwo"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfigTwo"
+        :formOption="formOption"
+        v-model="formData.dataTwo"
+        :rules="rulesTwo"
+        ref="submitTwo"
+        v-loading="loadingDialog"
+      >
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisibleTwo = false" size="large"
+          >取 消</el-button
+        >
+        <el-button type="primary" @click="submitFormTwo()" size="large"
+          >确 定</el-button
+        >
+      </template>
+    </el-dialog>
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
       <ContractPDF :rowData="rowData"></ContractPDF>
       <template #footer>
@@ -541,6 +569,7 @@ const formData = reactive({
   dataOne: {
     taxRefundDetailsList: [],
   },
+  dataTwo: {},
 });
 const formConfig = computed(() => {
   return [
@@ -875,6 +904,160 @@ const printObj = ref({
 const clickDownload = () => {
   proxy.getPdf("外销合同PDF文件");
 };
+
+const dialogVisibleTwo = ref(false);
+const submitTwo = ref(null);
+const formConfigTwo = computed(() => {
+  return [
+    {
+      type: "title",
+      title: "转出信息",
+    },
+    {
+      type: "select",
+      prop: "accountManagementId",
+      label: "转出账户",
+      data: accountList.value,
+    },
+    {
+      type: "select",
+      label: "转出币种",
+      prop: "currency",
+      data: accountCurrency.value,
+      itemWidth: 50,
+      fn: (val) => {
+        formData.dataTwo.inCurrency = val;
+        formData.dataTwo.commissionCurrency = val;
+      },
+    },
+    {
+      type: "number",
+      label: "转出金额",
+      prop: "amount",
+      itemWidth: 50,
+      precision: 2,
+      min: 0,
+      controls: false,
+      style: {
+        width: "100%",
+      },
+    },
+    {
+      type: "date",
+      itemType: "datetime",
+      prop: "transactionTime",
+      label: "转出时间",
+    },
+    {
+      type: "title",
+      title: "转入信息",
+    },
+    {
+      type: "select",
+      prop: "inAccountManagementId",
+      label: "转入账户",
+      data: accountList.value,
+    },
+    {
+      type: "select",
+      label: "转入币种",
+      prop: "inCurrency",
+      data: accountCurrency.value,
+      disabled: true,
+      itemWidth: 50,
+    },
+    {
+      type: "number",
+      label: "转入金额",
+      prop: "inAmount",
+      itemWidth: 50,
+      precision: 2,
+      min: 0,
+      controls: false,
+      style: {
+        width: "100%",
+      },
+    },
+    {
+      type: "title",
+      title: "其他信息",
+    },
+    {
+      type: "select",
+      label: "手续费币种",
+      prop: "commissionCurrency",
+      data: accountCurrency.value,
+      disabled: true,
+      itemWidth: 50,
+    },
+    {
+      type: "number",
+      label: "手续费",
+      prop: "commissionAmount",
+      itemWidth: 50,
+      precision: 2,
+      min: 0,
+      controls: false,
+      style: {
+        width: "100%",
+      },
+    },
+    {
+      type: "input",
+      prop: "remarks",
+      label: "摘要",
+      itemType: "textarea",
+    },
+  ];
+});
+const rulesTwo = ref({
+  accountManagementId: [
+    { required: true, message: "请选择转出账户", trigger: "change" },
+  ],
+  inAccountManagementId: [
+    { required: true, message: "请选择转入账户", trigger: "change" },
+  ],
+  transactionTime: [
+    { required: true, message: "请选择转出时间", trigger: "change" },
+  ],
+  amount: [{ required: true, message: "请输入转出金额", trigger: "blur" }],
+  inAmount: [{ required: true, message: "请输入转入金额", trigger: "blur" }],
+  commissionAmount: [
+    { required: true, message: "请输入手续费", trigger: "blur" },
+  ],
+  currency: [{ required: true, message: "请选择转出币种", trigger: "change" }],
+});
+const openModalTwo = () => {
+  modalType.value = "add";
+  formData.dataTwo = {
+    transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
+    currency: accountCurrency.value[0].value,
+    inCurrency: accountCurrency.value[0].value,
+    commissionCurrency: accountCurrency.value[0].value,
+  };
+  dialogVisibleTwo.value = true;
+};
+const submitFormTwo = () => {
+  submitTwo.value.handleSubmit(() => {
+    const submitData = { ...formData.dataTwo };
+    loadingDialog.value = true;
+    proxy.post("/accountRunningWater/internalTransfer", submitData).then(
+      () => {
+        ElMessage({
+          message: modalType.value == "add" ? "操作成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisibleTwo.value = false;
+        loadingDialog.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 325 - 51
src/views/finance/fundManage/flow/index.vue

@@ -10,6 +10,10 @@
         highlight-current-row
         :action-list="[
           {
+            text: '内部转账',
+            action: () => openModalTwo('add'),
+          },
+          {
             text: '导出Excel',
             action: () => deriveExcel(),
           },
@@ -19,10 +23,15 @@
           },
         ]"
         @moreSearch="moreSearch"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
-          <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
-            <span style="padding-right: 4px" v-if="item.currency">{{ item.currency }}</span>
+          <div
+            :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')"
+          >
+            <span style="padding-right: 4px" v-if="item.currency">{{
+              item.currency
+            }}</span>
             <span style="padding-right: 4px" v-else>
               {{ accountCurrency[0].value }}
             </span>
@@ -33,8 +42,15 @@
         <template #contractCodes="{ item }">
           <div style="width: 100%">
             <div v-if="item.contractCodes">
-              <div v-for="(contract, index) in item.contractCodes.split(',')" :key="index">
-                <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(contract)">{{ contract }}</a>
+              <div
+                v-for="(contract, index) in item.contractCodes.split(',')"
+                :key="index"
+              >
+                <a
+                  style="color: #409eff; cursor: pointer; word-break: break-all"
+                  @click="openDetails(contract)"
+                  >{{ contract }}</a
+                >
               </div>
             </div>
           </div>
@@ -42,11 +58,28 @@
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '添加流水' : '编辑流水'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog
+      :title="modalType == 'add' ? '添加流水' : '编辑流水'"
+      v-if="dialogVisible"
+      v-model="dialogVisible"
+      width="600"
+      v-loading="loadingDialog"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="submit"
+      >
         <template #transactionTime>
           <div>
-            <el-date-picker v-model="formData.data.transactionTime" type="datetime" placeholder="请选择交易时间" value-format="YYYY-MM-DD HH:mm:ss" />
+            <el-date-picker
+              v-model="formData.data.transactionTime"
+              type="datetime"
+              placeholder="请选择交易时间"
+              value-format="YYYY-MM-DD HH:mm:ss"
+            />
           </div>
         </template>
         <template #money>
@@ -54,15 +87,34 @@
             <el-row :gutter="10">
               <el-col :span="6">
                 <el-form-item prop="status">
-                  <el-select v-model="formData.data.status" placeholder="请选择" style="width: 100%" @change="changeStatus()">
-                    <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formData.data.status"
+                    placeholder="请选择"
+                    style="width: 100%"
+                    @change="changeStatus()"
+                  >
+                    <el-option
+                      v-for="item in status"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item prop="currency">
-                  <el-select v-model="formData.data.currency" placeholder="请选择" style="width: 100%">
-                    <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
+                  <el-select
+                    v-model="formData.data.currency"
+                    placeholder="请选择"
+                    style="width: 100%"
+                  >
+                    <el-option
+                      v-for="item in accountCurrency"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value"
+                    />
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -75,7 +127,8 @@
                     style="width: 100%"
                     :precision="2"
                     :controls="false"
-                    :min="0" />
+                    :min="0"
+                  />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -85,7 +138,13 @@
           <div>
             <el-form-item prop="received">
               <el-radio-group v-model="formData.data.received">
-                <el-radio v-for="item in received" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
+                <el-radio
+                  v-for="item in received"
+                  :key="item.value"
+                  :label="item.value"
+                  border
+                  >{{ item.label }}</el-radio
+                >
               </el-radio-group>
             </el-form-item>
           </div>
@@ -93,12 +152,24 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
-    <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600" :before-close="cancelSearch">
-      <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
+    <el-dialog
+      title="高级检索"
+      v-if="openSearch"
+      v-model="openSearch"
+      width="600"
+      :before-close="cancelSearch"
+    >
+      <byForm
+        :formConfig="formSearchConfig"
+        :formOption="formOption"
+        v-model="sourceList.pagination"
+      >
         <template #money>
           <div style="width: 100%">
             <el-row :gutter="10">
@@ -110,7 +181,8 @@
                   style="width: 100%"
                   :precision="2"
                   :controls="false"
-                  :min="0" />
+                  :min="0"
+                />
               </el-col>
               <el-col :span="2" style="text-align: center">到</el-col>
               <el-col :span="11">
@@ -121,7 +193,8 @@
                   style="width: 100%"
                   :precision="2"
                   :controls="false"
-                  :min="0" />
+                  :min="0"
+                />
               </el-col>
             </el-row>
           </div>
@@ -135,7 +208,8 @@
                   type="datetime"
                   placeholder="请选择"
                   style="width: 100%"
-                  value-format="YYYY-MM-DD HH:mm:ss" />
+                  value-format="YYYY-MM-DD HH:mm:ss"
+                />
               </el-col>
               <el-col :span="2" style="text-align: center">到</el-col>
               <el-col :span="11">
@@ -144,7 +218,8 @@
                   type="datetime"
                   placeholder="请选择"
                   style="width: 100%"
-                  value-format="YYYY-MM-DD HH:mm:ss" />
+                  value-format="YYYY-MM-DD HH:mm:ss"
+                />
               </el-col>
             </el-row>
           </div>
@@ -152,7 +227,34 @@
       </byForm>
       <template #footer>
         <el-button @click="cancelSearch()" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitSearch()" size="large"
+          >确 定</el-button
+        >
+      </template>
+    </el-dialog>
+
+    <el-dialog
+      :title="'内部转账'"
+      v-if="dialogVisibleTwo"
+      v-model="dialogVisibleTwo"
+      width="600"
+    >
+      <byForm
+        :formConfig="formConfigTwo"
+        :formOption="formOption"
+        v-model="formData.dataTwo"
+        :rules="rulesTwo"
+        ref="submitTwo"
+        v-loading="loadingDialog"
+      >
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisibleTwo = false" size="large"
+          >取 消</el-button
+        >
+        <el-button type="primary" @click="submitFormTwo()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
@@ -161,7 +263,9 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -328,11 +432,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/accountRunningWater/delete", {
                     id: row.id,
@@ -370,27 +478,31 @@ const getDict = () => {
         });
       }
     });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      accountList.value = res.rows.map((item) => {
-        return {
-          label: item.alias,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountList.value = res.rows.map((item) => {
+          return {
+            label: item.alias,
+            value: item.id,
+          };
+        });
+      }
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/accountRunningWater/page", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/accountRunningWater/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 getList();
@@ -474,11 +586,17 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  accountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
-  transactionTime: [{ required: true, message: "请选择交易时间", trigger: "change" }],
+  accountManagementId: [
+    { required: true, message: "请选择账户", trigger: "change" },
+  ],
+  transactionTime: [
+    { required: true, message: "请选择交易时间", trigger: "change" },
+  ],
   status: [{ required: true, message: "请选择收支类型", trigger: "change" }],
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
-  received: [{ required: true, message: "请选择合同是否到账", trigger: "change" }],
+  received: [
+    { required: true, message: "请选择合同是否到账", trigger: "change" },
+  ],
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
   // name: [{ required: true, message: "请输入账户名称", trigger: "blur" }],
   // openingBank: [{ required: true, message: "请输入开户银行", trigger: "blur" }],
@@ -616,7 +734,8 @@ const submitSearch = () => {
   if (
     sourceList.value.pagination.beginAmount &&
     sourceList.value.pagination.endAmount &&
-    Number(sourceList.value.pagination.beginAmount) > Number(sourceList.value.pagination.endAmount)
+    Number(sourceList.value.pagination.beginAmount) >
+      Number(sourceList.value.pagination.endAmount)
   ) {
     return ElMessage("交易金额输入错误");
   }
@@ -628,7 +747,7 @@ const submitSearch = () => {
     return ElMessage("开始时间不能大于结束时间");
   }
   openSearch.value = false;
-  sourceList.value.pagination.keyword = '';
+  sourceList.value.pagination.keyword = "";
   sourceList.value.pagination.pageNum = 1;
   getList();
 };
@@ -643,12 +762,167 @@ const openDetails = (val) => {
 const printObj = ref({
   id: "printMe",
   popTitle: "",
-  extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
   extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
 });
 const clickDownload = () => {
   proxy.getPdf("外销合同PDF文件");
 };
+
+const dialogVisibleTwo = ref(false);
+const submitTwo = ref(null);
+const formConfigTwo = computed(() => {
+  return [
+    {
+      type: "title",
+      title: "转出信息",
+    },
+    {
+      type: "select",
+      prop: "accountManagementId",
+      label: "转出账户",
+      data: accountList.value,
+    },
+    {
+      type: "select",
+      label: "转出币种",
+      prop: "currency",
+      data: accountCurrency.value,
+      itemWidth: 50,
+      fn: (val) => {
+        formData.dataTwo.inCurrency = val;
+        formData.dataTwo.commissionCurrency = val;
+      },
+    },
+    {
+      type: "number",
+      label: "转出金额",
+      prop: "amount",
+      itemWidth: 50,
+      precision: 2,
+      min: 0,
+      controls: false,
+      style: {
+        width: "100%",
+      },
+    },
+    {
+      type: "date",
+      itemType: "datetime",
+      prop: "transactionTime",
+      label: "转出时间",
+    },
+    {
+      type: "title",
+      title: "转入信息",
+    },
+    {
+      type: "select",
+      prop: "inAccountManagementId",
+      label: "转入账户",
+      data: accountList.value,
+    },
+    {
+      type: "select",
+      label: "转入币种",
+      prop: "inCurrency",
+      data: accountCurrency.value,
+      disabled: true,
+      itemWidth: 50,
+    },
+    {
+      type: "number",
+      label: "转入金额",
+      prop: "inAmount",
+      itemWidth: 50,
+      precision: 2,
+      min: 0,
+      controls: false,
+      style: {
+        width: "100%",
+      },
+    },
+    {
+      type: "title",
+      title: "其他信息",
+    },
+    {
+      type: "select",
+      label: "手续费币种",
+      prop: "commissionCurrency",
+      data: accountCurrency.value,
+      disabled: true,
+      itemWidth: 50,
+    },
+    {
+      type: "number",
+      label: "手续费",
+      prop: "commissionAmount",
+      itemWidth: 50,
+      precision: 2,
+      min: 0,
+      controls: false,
+      style: {
+        width: "100%",
+      },
+    },
+    {
+      type: "input",
+      prop: "remarks",
+      label: "摘要",
+      itemType: "textarea",
+    },
+  ];
+});
+const rulesTwo = ref({
+  accountManagementId: [
+    { required: true, message: "请选择转出账户", trigger: "change" },
+  ],
+  inAccountManagementId: [
+    { required: true, message: "请选择转入账户", trigger: "change" },
+  ],
+  transactionTime: [
+    { required: true, message: "请选择转出时间", trigger: "change" },
+  ],
+  amount: [{ required: true, message: "请输入转出金额", trigger: "blur" }],
+  inAmount: [{ required: true, message: "请输入转入金额", trigger: "blur" }],
+  commissionAmount: [
+    { required: true, message: "请输入手续费", trigger: "blur" },
+  ],
+  currency: [{ required: true, message: "请选择转出币种", trigger: "change" }],
+});
+const openModalTwo = () => {
+  modalType.value = "add";
+  formData.dataTwo = {
+    transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
+    currency: accountCurrency.value[0].value,
+    inCurrency: accountCurrency.value[0].value,
+    commissionCurrency: accountCurrency.value[0].value,
+  };
+  dialogVisibleTwo.value = true;
+};
+const submitFormTwo = () => {
+  submitTwo.value.handleSubmit(() => {
+    const submitData = { ...formData.dataTwo };
+    loadingDialog.value = true;
+    proxy.post("/accountRunningWater/internalTransfer", submitData).then(
+      () => {
+        ElMessage({
+          message: modalType.value == "add" ? "操作成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisibleTwo.value = false;
+        loadingDialog.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 7 - 0
src/views/finance/fundManage/funds/index.vue

@@ -494,6 +494,7 @@ const formSearchConfig = computed(() => {
       label: "归属公司",
       data: companyData.value,
       clearable: true,
+      filterable: true,
     },
     {
       type: "slot",
@@ -508,6 +509,7 @@ const formSearchConfig = computed(() => {
       data: userList.value,
       itemWidth: 50,
       clearable: true,
+      filterable: true,
     },
     {
       type: "select",
@@ -515,6 +517,7 @@ const formSearchConfig = computed(() => {
       label: "请款类型",
       data: fundsType.value,
       clearable: true,
+      filterable: true,
     },
     {
       type: "select",
@@ -522,6 +525,7 @@ const formSearchConfig = computed(() => {
       label: "币种",
       data: accountCurrency.value,
       clearable: true,
+      filterable: true,
     },
     {
       type: "slot",
@@ -546,6 +550,7 @@ const formSearchConfig = computed(() => {
       data: fundsPaymentMethod.value,
       clearable: true,
       itemWidth: 50,
+      filterable: true,
     },
     {
       type: "input",
@@ -560,6 +565,7 @@ const formSearchConfig = computed(() => {
       data: status.value,
       itemWidth: 50,
       clearable: true,
+      filterable: true,
     },
     {
       type: "select",
@@ -568,6 +574,7 @@ const formSearchConfig = computed(() => {
       data: paymentStatus.value,
       itemWidth: 50,
       clearable: true,
+      filterable: true,
     },
   ];
 });