Sfoglia il codice sorgente

地址配置,资金页面新增功能

asd26269546 1 anno fa
parent
commit
ee691a05d6

+ 110 - 5
src/views/finance/fundManage/accountStatement/index.vue

@@ -9,10 +9,10 @@
         :selectConfig="selectConfig"
         highlight-current-row
         :action-list="[
-          // {
-          //   text: '导出Excel',
-          //   action: () => deriveExcel(),
-          // },
+          {
+            text: '内部转账',
+            action: () => openTransferMoney('add'),
+          },
           {
             text: '退税登记',
             action: () => openModalOne('add'),
@@ -59,7 +59,14 @@
         </template>
       </byTable>
     </div>
-
+    <el-dialog title="内部转账" v-if="transferMoneyModal" v-model="transferMoneyModal" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="transferMoneyConfig" :formOption="formOption" v-model="formData2.data" :rules="rules" ref="transferMoneySubmit">
+      </byForm>
+      <template #footer>
+        <el-button @click="transferMoneyModal = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm2()" size="large">确 定</el-button>
+      </template>
+    </el-dialog>
     <el-dialog
       :title="modalType == 'add' ? '添加流水' : '编辑流水'"
       v-if="dialogVisible"
@@ -462,6 +469,104 @@ const config = computed(() => {
     },
   ];
 });
+let transferMoneyModal = ref(false);
+const openTransferMoney = () => {
+  transferMoneyModal.value = true;
+};
+const formData2 = reactive({
+  data: {},
+});
+const transferMoneyConfig = computed(() => {
+  return [
+    {
+      label: "转出信息",
+    },
+    {
+      type: "select",
+      prop: "accountManagementId",
+      label: "转出账户",
+      data: accountList.value,
+    },
+    {
+			type: 'selectInput',
+			label: '转出金额',
+      prop: "amount",
+			itemWidth: 60,
+			data: accountCurrency.value,
+			placeholder: '请输入',
+			selectPlaceholder: '币种',
+			selectProp: 'currency',
+		},
+    
+    { 
+      type: "date",
+      prop: "transactionTime",
+      label: "转出时间",
+      itemType: "datetime",
+    },
+    
+    {
+      label: "转入信息",
+    },
+    {
+      type: "select",
+      prop: "inAccountManagementId",
+      label: "转入账户",
+      data: accountList.value,
+    },
+    {
+			type: 'selectInput',
+			label: '转入金额',
+      prop: "inAmount",
+			itemWidth: 60,
+			data: accountCurrency.value,
+			placeholder: '请输入',
+			selectPlaceholder: '币种',
+			selectProp: 'inCurrency',
+		},
+    {
+      label: "其他信息",
+    },
+    {
+			type: 'selectInput',
+			label: '手续费',
+      prop: "commissionAmount",
+			itemWidth: 60,
+			data: accountCurrency.value,
+			placeholder: '请输入',
+			selectPlaceholder: '币种',
+			selectProp: 'commissionCurrency',
+		},
+    
+    {
+      type: "input",
+      prop: "remarks",
+      label: "摘要",
+      itemType: "textarea",
+    },
+  ];
+});
+const transferMoneySubmit = ref(null);
+const submitForm2 = () => {
+  transferMoneySubmit.value.handleSubmit(() => {
+    
+    loadingDialog.value = true;
+    proxy.post("/accountRunningWater/internalTransfer", formData2.data).then(
+      () => {
+        ElMessage({
+          message: modalType.value == "add" ? "转账成功" : "转账成功",
+          type: "success",
+        });
+        transferMoneyModal.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+  });
+};
 const getCurrency = () => {
   return proxy
     .post("/dictTenantData/page", {

+ 113 - 1
src/views/finance/fundManage/flow/index.vue

@@ -17,6 +17,10 @@
             text: '添加流水',
             action: () => openModal('add'),
           },
+          {
+            text: '内部转账',
+            action: () => openTransferMoney('add'),
+          },
         ]"
         @moreSearch="moreSearch"
         @get-list="getList">
@@ -96,7 +100,14 @@
         <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
-
+    <el-dialog title="内部转账" v-if="transferMoneyModal" v-model="transferMoneyModal" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="transferMoneyConfig" :formOption="formOption" v-model="formData2.data" :rules="rules" ref="transferMoneySubmit">
+      </byForm>
+      <template #footer>
+        <el-button @click="transferMoneyModal = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm2()" 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">
         <template #money>
@@ -394,6 +405,10 @@ const getList = async (req) => {
 };
 getDict();
 getList();
+let transferMoneyModal = ref(false);
+const openTransferMoney = () => {
+  transferMoneyModal.value = true;
+};
 const modalType = ref("add");
 const dialogVisible = ref(false);
 const loadingDialog = ref(false);
@@ -407,6 +422,79 @@ const formOption = reactive({
 const formData = reactive({
   data: {},
 });
+const formData2 = reactive({
+  data: {},
+});
+const transferMoneyConfig = computed(() => {
+  return [
+    {
+      label: "转出信息",
+    },
+    {
+      type: "select",
+      prop: "accountManagementId",
+      label: "转出账户",
+      data: accountList.value,
+    },
+    {
+			type: 'selectInput',
+			label: '转出金额',
+      prop: "amount",
+			itemWidth: 60,
+			data: accountCurrency.value,
+			placeholder: '请输入',
+			selectPlaceholder: '币种',
+			selectProp: 'currency',
+		},
+    
+    { 
+      type: "date",
+      prop: "transactionTime",
+      label: "转出时间",
+      itemType: "datetime",
+    },
+    
+    {
+      label: "转入信息",
+    },
+    {
+      type: "select",
+      prop: "inAccountManagementId",
+      label: "转入账户",
+      data: accountList.value,
+    },
+    {
+			type: 'selectInput',
+			label: '转入金额',
+      prop: "inAmount",
+			itemWidth: 60,
+			data: accountCurrency.value,
+			placeholder: '请输入',
+			selectPlaceholder: '币种',
+			selectProp: 'inCurrency',
+		},
+    {
+      label: "其他信息",
+    },
+    {
+			type: 'selectInput',
+			label: '手续费',
+      prop: "commissionAmount",
+			itemWidth: 60,
+			data: accountCurrency.value,
+			placeholder: '请输入',
+			selectPlaceholder: '币种',
+			selectProp: 'commissionCurrency',
+		},
+    
+    {
+      type: "input",
+      prop: "remarks",
+      label: "摘要",
+      itemType: "textarea",
+    },
+  ];
+});
 const formConfig = computed(() => {
   return [
     {
@@ -480,6 +568,9 @@ const rules = ref({
   currency: [{ required: true, message: "请选择币种", trigger: "change" }],
   received: [{ required: true, message: "请选择合同是否到账", trigger: "change" }],
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
+  inAccountManagementId: [{ required: true, message: "请选择账户", trigger: "change" }],
+  inAmount: [{ required: true, message: "请输入金额", trigger: "blur" }],
+  
   // name: [{ required: true, message: "请输入账户名称", trigger: "blur" }],
   // openingBank: [{ required: true, message: "请输入开户银行", trigger: "blur" }],
   // accountOpening: [{ required: true, message: "请输入银行账号", trigger: "blur" }],
@@ -495,6 +586,27 @@ const openModal = (val) => {
 const changeStatus = () => {
   formData.data.received = "";
 };
+const transferMoneySubmit = ref(null);
+const submitForm2 = () => {
+  transferMoneySubmit.value.handleSubmit(() => {
+    
+    loadingDialog.value = true;
+    proxy.post("/accountRunningWater/internalTransfer", formData2.data).then(
+      () => {
+        ElMessage({
+          message: modalType.value == "add" ? "转账成功" : "转账成功",
+          type: "success",
+        });
+        transferMoneyModal.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+  });
+};
 const submitForm = () => {
   submit.value.handleSubmit(() => {
     if (!formData.data.amount || Number(formData.data.amount) == 0) {

+ 83 - 13
src/views/salesMange/salesMange/profitSettlement/index.vue

@@ -10,10 +10,7 @@
       :selectConfig="selectConfig"
       highlight-current-row
       :action-list="[
-        {
-          text: '默认汇率',
-          action: () => openModal(),
-        },
+        
       ]"
       @get-list="getList"
     >
@@ -57,39 +54,108 @@
         <el-table-column label="收入(CNY)">
           <el-table-column label="合同到账" width="120">
             <template #default="{ row }">
-              <div>{{ moneyFormat(row.contractArrival, 2) }}</div>
+              <el-popover placement="top" :width="580" trigger="click">
+                <template #reference>
+                  <span class="table-btn">{{ moneyFormat(row.contractArrival, 2) }}</span>
+                </template>
+                <el-table :data="row.claimList">
+                  <el-table-column width="150" property="date" label="认领金额">
+                    <template #default="{ row }">
+                      <div>{{row.currency}} {{ moneyFormat(row.money, 2) }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="60" property="rate" label="汇率" />
+                  <el-table-column width="160" property="userName" label="操作人" />
+                  <el-table-column width="190" property="createTime" label="操作时间" />
+                </el-table>
+              </el-popover>
+              
             </template>
           </el-table-column>
           <el-table-column label="退税" width="120">
             <template #default="{ row }">
-              <div>{{ moneyFormat(row.taxReturnMoney, 2) }}</div>
+              <el-popover placement="top" :width="580" trigger="click">
+                <template #reference>
+                  <span class="table-btn">{{moneyFormat(row.taxReturnMoney, 2) }}</span>
+                </template>
+                <el-table :data="row.taxReturnList">
+                  <el-table-column width="150" property="date" label="交易金额">
+                    <template #default="{ row }">
+                      <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="60" property="rate" label="汇率" />
+                  <el-table-column width="160" property="userName" label="操作人" />
+                  <el-table-column width="190" property="createTime" label="操作时间" />
+                </el-table>
+              </el-popover>
             </template>
           </el-table-column>
           <el-table-column label="其他收入" width="120">
             <template #default="{ row }">
-              <div>{{ moneyFormat(row.otherIncome, 2) }}</div>
+              <el-popover placement="top" :width="580" trigger="click">
+                <template #reference>
+                  <span class="table-btn">{{moneyFormat(row.otherIncome, 2) }}</span>
+                </template>
+                <el-table :data="row.accountRequestFundsDetailList">
+                  <el-table-column width="150" property="date" label="交易金额">
+                    <template #default="{ row }">
+                      <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="60" property="rate" label="汇率" />
+                  <el-table-column width="160" property="userName" label="操作人" />
+                  <el-table-column width="190" property="createTime" label="操作时间" />
+                </el-table>
+              </el-popover>
             </template>
           </el-table-column>
         </el-table-column>
         <el-table-column label="采购合同金额">
           <el-table-column label="" width="120">
             <template #default="{ row }">
-              <div>
-                <!-- {{ row.currency }} {{ moneyFormat(row.purchaseAmount, 2) }} -->
-                CNY {{ moneyFormat(row.purchaseAmount, 2) }}
-              </div>
+              <el-popover placement="top" :width="580" trigger="click">
+                <template #reference>
+                  <span class="table-btn">CNY {{ moneyFormat(row.purchaseAmount, 2) }}</span>
+                </template>
+                <el-table :data="row.purchaseList">
+                  <el-table-column width="150" property="date" label="交易金额">
+                    <template #default="{ row }">
+                      <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="60" property="rate" label="汇率" />
+                  <el-table-column width="160" property="purchaseName" label="业务员" />
+                  <el-table-column width="190" property="createTime" label="操作时间" />
+                </el-table>
+              </el-popover>
             </template>
           </el-table-column>
         </el-table-column>
         <el-table-column label="支出(CNY)">
           <el-table-column label="支付货款" width="120">
             <template #default="{ row }">
-              <div>{{ moneyFormat(row.payForGoods, 2) }}</div>
+              <el-popover placement="top" :width="580" trigger="click">
+                <template #reference>
+                  <span class="table-btn">{{ moneyFormat(row.payForGoods, 2) }}</span>
+                </template>
+                <el-table :data="row.payList">
+                  <el-table-column width="150" property="date" label="交易金额">
+                    <template #default="{ row }">
+                      <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="60" property="rate" label="汇率" />
+                  <el-table-column width="160" property="userName" label="操作人" />
+                  <el-table-column width="190" property="createTime" label="操作时间" />
+                </el-table>
+              </el-popover>
             </template>
           </el-table-column>
           <el-table-column label="其他支出" width="120">
             <template #default="{ row }">
-              <div>{{ moneyFormat(row.otherExpenses, 2) }}</div>
+              
+              <div class="table-btn">{{ moneyFormat(row.otherExpenses, 2) }}</div>
             </template>
           </el-table-column>
         </el-table-column>
@@ -653,4 +719,8 @@ const openDetails = (row) => {
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
+.table-btn{
+  cursor: pointer;
+  color: #409EFF;
+}
 </style>

+ 199 - 0
src/views/system/addressConfig/index.vue

@@ -0,0 +1,199 @@
+<template>
+    <div class="app-container">
+    <el-table
+      :data="tableData"
+      style="width: 100%"
+      row-key="id"
+      border
+      lazy
+      :load="load"
+      :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+    >
+      <el-table-column prop="chineseName" label="中文名" />
+      <el-table-column prop="name" label="名称" />
+      <el-table-column prop="address" label="操作">
+        <template #default="scope">
+            <el-button size="small" @click="handleEdit(scope.$index, scope.row)"
+            >修改</el-button
+            >
+            <el-button
+            size="small"
+            type="danger"
+            @click="handleDelete(scope.$index, scope.row)"
+            >删除</el-button
+            >
+        </template>
+      </el-table-column>
+    </el-table>
+ 
+       <pagination
+          v-show="total > 0"
+          :total="total"
+          v-model:page="queryParams.pageNum"
+          v-model:limit="queryParams.pageSize"
+          @pagination="getList"
+       />
+    </div>
+ </template>
+ 
+ <script setup name="Config">
+ import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
+ 
+ const { proxy } = getCurrentInstance();
+ const { sys_yes_no } = proxy.useDict("sys_yes_no");
+ 
+ const configList = ref([]);
+ const open = ref(false);
+ const loading = ref(true);
+ const showSearch = ref(true);
+ const ids = ref([]);
+ const single = ref(true);
+ const multiple = ref(true);
+ const total = ref(0);
+ const title = ref("");
+ const dateRange = ref([]);
+ 
+ const data = reactive({
+   form: {},
+   queryParams: {
+     pageNum: 1,
+     pageSize: 10,
+     configName: undefined,
+     configKey: undefined,
+     configType: undefined
+   },
+   rules: {
+     configName: [{ required: true, message: "参数名称不能为空", trigger: "blur" }],
+     configKey: [{ required: true, message: "参数键名不能为空", trigger: "blur" }],
+     configValue: [{ required: true, message: "参数键值不能为空", trigger: "blur" }]
+   }
+ });
+ let tableData = ref([]);
+ const { queryParams, form, rules } = toRefs(data);
+ 
+ const load = (row, treeNode, resolve) => {
+   console.log(row, treeNode, resolve)
+   proxy.post('/customizeArea/list',{parentId:row.id}).then(res=>{
+    console.log(res)
+    resolve(
+        res.map(item=>{
+            return {
+             ...item,
+             hasChildren:true,
+            }
+        })
+    )
+    
+     
+   })
+ };
+
+ /** 查询参数列表 */
+ function getList() {
+   loading.value = true;
+   proxy.post('/customizeArea/list',{parentId:0}).then(res=>{
+     console.log(res)
+     tableData.value = res.map(item=>{
+       return {
+        ...item,
+        hasChildren:true,
+       }
+     })
+   })
+ }
+ /** 取消按钮 */
+ function cancel() {
+   open.value = false;
+   reset();
+ }
+ /** 表单重置 */
+ function reset() {
+   form.value = {
+     configId: undefined,
+     configName: undefined,
+     configKey: undefined,
+     configValue: undefined,
+     configType: "Y",
+     remark: undefined
+   };
+   proxy.resetForm("configRef");
+ }
+ /** 搜索按钮操作 */
+ function handleQuery() {
+   queryParams.value.pageNum = 1;
+   getList();
+ }
+ /** 重置按钮操作 */
+ function resetQuery() {
+   dateRange.value = [];
+   proxy.resetForm("queryRef");
+   handleQuery();
+ }
+ /** 多选框选中数据 */
+ function handleSelectionChange(selection) {
+   ids.value = selection.map(item => item.configId);
+   single.value = selection.length != 1;
+   multiple.value = !selection.length;
+ }
+ /** 新增按钮操作 */
+ function handleAdd() {
+   reset();
+   open.value = true;
+   title.value = "添加参数";
+ }
+ /** 修改按钮操作 */
+ function handleUpdate(row) {
+   reset();
+   const configId = row.configId || ids.value;
+   getConfig(configId).then(response => {
+     form.value = response.data;
+     open.value = true;
+     title.value = "修改参数";
+   });
+ }
+ /** 提交按钮 */
+ function submitForm() {
+   proxy.$refs["configRef"].validate(valid => {
+     if (valid) {
+       if (form.value.configId != undefined) {
+         updateConfig(form.value).then(response => {
+           proxy.$modal.msgSuccess("修改成功");
+           open.value = false;
+           getList();
+         });
+       } else {
+         addConfig(form.value).then(response => {
+           proxy.$modal.msgSuccess("新增成功");
+           open.value = false;
+           getList();
+         });
+       }
+     }
+   });
+ }
+ /** 删除按钮操作 */
+ function handleDelete(row) {
+   const configIds = row.configId || ids.value;
+   proxy.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function () {
+     return delConfig(configIds);
+   }).then(() => {
+     getList();
+     proxy.$modal.msgSuccess("删除成功");
+   }).catch(() => {});
+ }
+ /** 导出按钮操作 */
+ function handleExport() {
+   proxy.download("system/config/export", {
+     ...queryParams.value
+   }, `config_${new Date().getTime()}.xlsx`);
+ }
+ /** 刷新缓存按钮操作 */
+ function handleRefreshCache() {
+   refreshCache().then(() => {
+     proxy.$modal.msgSuccess("刷新缓存成功");
+   });
+ }
+ 
+ getList();
+ </script>
+