lxf 1 年之前
父节点
当前提交
5a2a6ca699

+ 5 - 2
src/components/testForm/index.vue

@@ -10,7 +10,7 @@
       ref="testForm">
       <van-cell-group inset>
         <div v-for="(i, index) in formConfig" :key="index" :style="i.style || ''">
-          <van-field v-if="i.type == 'title'">
+          <van-field v-if="i.type == 'title'" style="background: #ecebeb;">
             <template #input>
               <div class="_title">
                 {{ i.title }}
@@ -64,7 +64,7 @@
             is-link
             :readonly="true"
             :placeholder="i.placeholder ? i.placeholder : '请选择'"
-            @click="() => (!formOption.readonly ? (i.showPicker = true) : '')"
+            @click="() => (formOption.readonly || i.readonly ? '' : (i.showPicker = true))"
             :rules="getRules(i.prop)"
             :required="getRequired(i.prop)">
           </van-field>
@@ -781,5 +781,8 @@ const changeCheckboxGroup = (form, label, data, fieldNames) => {
       margin: 10px 40px;
     }
   }
+  .van-form {
+    margin-top: 0px !important; 
+  }
 }
 </style>

+ 27 - 2
src/lang/cn.js

@@ -48,6 +48,8 @@ export const lang = {
 		minutesAgo:'分钟之前',
 		searchResults:'搜索结果',
 		noMatchingData:'无匹配数据',
+		selectDate:'选择日期',
+		selectTime:'选择时间',
 	},
 	processApproval:{
 		//流程办理,流程类型,流程标题,发起人
@@ -1163,9 +1165,32 @@ export const lang = {
 		content: '跟进记录',
 		contentTwo: '跟进内容',
 		contentTwoMsg: '请输入跟进内容',
-		selectDate:'选择日期',
-		selectTime:'选择时间',
 		highseasName: '公海客户',
 		privateseaName: '私海客户',
+	},
+	accountPayment: {
+		name: '打款',
+		corporationName: '归属公司',
+		createTime: '请款时间',
+		currencyAmount: '请款金额',
+		paymentRemark: '请款说明',
+		statusText: '打款状态',
+		requestInformation: '请款信息',
+		businessManagementName: '付款账户',
+		paymentMethodText: '付款方式',
+		collectionName: '收款户名',
+		accountOpening: '银行账号',
+		openingBank: '开户银行',
+		interbankNumber: '联行号',
+		paymentInformation: '打款信息',
+		accountManagementId: '打款账户',
+		accountManagementIdMsg: '请选择打款账户',
+		currency: '打款币种',
+		currencyMsg: '请选择打款币种',
+		amount: '打款金额',
+		amountMsg: '请选择打款金额',
+		expensesTime: '打款时间',
+		expensesTimeMsg: '请选择打款时间',
+		remark: '摘要',
 	}
 }

+ 15 - 0
src/router/routerLXF.js

@@ -115,6 +115,21 @@ export function routesLXF() {
       name: "私海客户",
       component: () => import("../views/customer/privatesea/index.vue"),
     },
+    {
+      path: "accountPayment",
+      name: "打款",
+      component: () => import("../views/fund/account-payment/index.vue"),
+    },
+    {
+      path: "accountPaymentAdd",
+      name: "添加打款",
+      component: () => import("../views/fund/account-payment/add.vue"),
+    },
+    {
+      path: "accountPaymentDetail",
+      name: "打款详情",
+      component: () => import("../views/fund/account-payment/detail.vue"),
+    },
   ];
   return routesLXF;
 }

+ 5 - 1
src/views/customer/file/addRecords.vue

@@ -15,7 +15,11 @@
               :required="true"
               @click="clickDate" />
             <van-popup v-model:show="showPicker" round position="bottom">
-              <van-picker-group :title="$t('customerFile.date')" :tabs="[$t('customerFile.selectDate'), $t('customerFile.selectTime')]" @confirm="onConfirm" @cancel="onCancel">
+              <van-picker-group
+                :title="$t('customerFile.date')"
+                :tabs="[$t('common.selectDate'), $t('common.selectTime')]"
+                @confirm="onConfirm"
+                @cancel="onCancel">
                 <van-date-picker v-model="currentDate" />
                 <van-time-picker v-model="currentTime" :columns-type="columnsType" />
               </van-picker-group>

+ 254 - 0
src/views/fund/account-payment/add.vue

@@ -0,0 +1,254 @@
+<template>
+  <div class="form">
+    <van-nav-bar :title="$t('accountPayment.name')" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+    <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" @onSubmit="onSubmit" ref="formDom">
+      <template #date>
+        <div style="width: 100%">
+          <van-cell-group inset>
+            <van-field
+              v-model="formData.data.expensesTime"
+              is-link
+              readonly
+              :label="$t('accountPayment.expensesTime')"
+              :placeholder="$t('common.pleaseSelect')"
+              style="padding: 0 !important"
+              :required="true"
+              @click="clickDate" />
+            <van-popup v-model:show="showPicker" round position="bottom">
+              <van-picker-group
+                :title="$t('accountPayment.expensesTime')"
+                :tabs="[$t('common.selectDate'), $t('common.selectTime')]"
+                @confirm="onConfirm"
+                @cancel="onCancel">
+                <van-date-picker v-model="currentDate" />
+                <van-time-picker v-model="currentTime" :columns-type="columnsType" />
+              </van-picker-group>
+            </van-popup>
+          </van-cell-group>
+        </div>
+      </template>
+    </testForm>
+  </div>
+</template>
+
+<script setup>
+import { ref, getCurrentInstance, onMounted, reactive } from "vue";
+import { showSuccessToast } from "vant";
+import { useRoute } from "vue-router";
+import { getUserInfo, formatDate } from "@/utils/auth";
+import testForm from "@/components/testForm/index.vue";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => history.back();
+const route = useRoute();
+const showPicker = ref(false);
+const currentDate = ref([]);
+const currentTime = ref([]);
+const columnsType = ["hour", "minute", "second"];
+const onConfirm = () => {
+  formData.data.expensesTime = currentDate.value.join("-") + " " + currentTime.value.join(":");
+  showPicker.value = false;
+};
+const onCancel = () => {
+  showPicker.value = false;
+};
+const clickDate = () => {
+  currentDate.value = formatDate(new Date(formData.data.expensesTime), "yyyy-MM-dd").split("-");
+  currentTime.value = formatDate(new Date(formData.data.expensesTime), "hh:mm:ss").split(":");
+  showPicker.value = true;
+};
+const formData = reactive({
+  data: {
+    expensesTime: "",
+  },
+});
+const formDom = ref(null);
+const formOption = reactive({
+  readonly: false, //用于控制整个表单是否只读
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  hiddenSubmitBtn: false,
+});
+const formConfig = reactive([
+  {
+    type: "title",
+    title: proxy.t("accountPayment.requestInformation"),
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.businessManagementName"),
+    prop: "businessManagementName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.currencyAmount"),
+    prop: "currencyAmount",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.paymentMethodText"),
+    prop: "paymentMethodText",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.collectionName"),
+    prop: "name",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.accountOpening"),
+    prop: "accountOpening",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.openingBank"),
+    prop: "openingBank",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.interbankNumber"),
+    prop: "interbankNumber",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "title",
+    title: proxy.t("accountPayment.paymentInformation"),
+  },
+  {
+    type: "picker",
+    label: proxy.t("accountPayment.accountManagementId"),
+    prop: "accountManagementId",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+  },
+  {
+    type: "picker",
+    label: proxy.t("accountPayment.currency"),
+    prop: "currency",
+    itemType: "onePicker",
+    showPicker: false,
+    readonly: true,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.amount"),
+    prop: "amount",
+    itemType: "number",
+    readonly: true,
+  },
+  {
+    type: "slot",
+    slotName: "date",
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.remark"),
+    prop: "remark",
+    itemType: "textarea",
+  },
+]);
+const rules = {
+  accountManagementId: [{ required: true, message: proxy.t("accountPayment.accountManagementIdMsg") }],
+  currency: [{ required: true, message: proxy.t("accountPayment.currencyMsg") }],
+  amount: [{ required: true, message: proxy.t("accountPayment.amountMsg") }],
+  expensesTime: [{ required: true, message: proxy.t("accountPayment.expensesTimeMsg") }],
+};
+const onSubmit = () => {
+  proxy.post("/accountPayment/add", formData.data).then(() => {
+    showSuccessToast(proxy.t("common.addSuccess"));
+    setTimeout(() => {
+      history.back();
+    }, 500);
+  });
+};
+const fundsPayment = ref([]);
+const gerFundsPayment = () => {
+  return proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: getUserInfo().tenantId,
+      dictCode: "funds_payment_method",
+    })
+    .then((res) => {
+      fundsPayment.value = res.data.rows;
+    });
+};
+const accountList = ref([]);
+const gerAccountList = () => {
+  return proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
+    if (res.data.rows && res.data.rows.length > 0) {
+      accountList.value = res.data.rows.map((item) => {
+        return {
+          label: item.alias + " (" + item.name + ")",
+          value: item.id,
+        };
+      });
+      formConfig[9].data = accountList.value;
+    }
+  });
+};
+const gerCurrency = () => {
+  return proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: getUserInfo().tenantId,
+      dictCode: "account_currency",
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[10].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+};
+onMounted(() => {
+  Promise.all([gerFundsPayment(), gerAccountList(), gerCurrency()]).then(() => {
+    if (route.query.id) {
+      proxy.post("/accountPayment/detail", { id: route.query.id }).then((res) => {
+        formData.data = res.data;
+        formData.data.expensesTime = formatDate(new Date(), "yyyy-MM-dd hh:mm:ss");
+        formData.data.currencyAmount = formData.data.currency + " " + formData.data.amount;
+        let paymentMethodText = "";
+        if (formData.data.paymentMethod && fundsPayment.value && fundsPayment.value.length > 0) {
+          let list = fundsPayment.value.filter((item) => item.dictKey == formData.data.paymentMethod);
+          if (list && list.length > 0) {
+            paymentMethodText = list[0].dictValue;
+          }
+        }
+        formData.data.paymentMethodText = paymentMethodText;
+      });
+    }
+  });
+});
+</script>

+ 204 - 0
src/views/fund/account-payment/detail.vue

@@ -0,0 +1,204 @@
+<template>
+  <div class="form">
+    <van-nav-bar :title="$t('accountPayment.name')" :left-text="$t('common.back')" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+    <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" ref="formDom"> </testForm>
+  </div>
+</template>
+
+<script setup>
+import { ref, getCurrentInstance, onMounted, reactive } from "vue";
+import { useRoute } from "vue-router";
+import { getUserInfo } from "@/utils/auth";
+import testForm from "@/components/testForm/index.vue";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => history.back();
+const route = useRoute();
+const formData = reactive({
+  data: {},
+});
+const formDom = ref(null);
+const formOption = reactive({
+  readonly: false, //用于控制整个表单是否只读
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+  hiddenSubmitBtn: true,
+});
+const formConfig = reactive([
+  {
+    type: "title",
+    title: proxy.t("accountPayment.requestInformation"),
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.businessManagementName"),
+    prop: "businessManagementName",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.currencyAmount"),
+    prop: "currencyAmount",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.paymentMethodText"),
+    prop: "paymentMethodText",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.collectionName"),
+    prop: "name",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.accountOpening"),
+    prop: "accountOpening",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.openingBank"),
+    prop: "openingBank",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.interbankNumber"),
+    prop: "interbankNumber",
+    itemType: "text",
+    readonly: true,
+  },
+  {
+    type: "title",
+    title: proxy.t("accountPayment.paymentInformation"),
+  },
+  {
+    type: "picker",
+    label: proxy.t("accountPayment.accountManagementId"),
+    prop: "accountManagementId",
+    itemType: "onePicker",
+    showPicker: false,
+    readonly: true,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+  },
+  {
+    type: "picker",
+    label: proxy.t("accountPayment.currency"),
+    prop: "currency",
+    itemType: "onePicker",
+    showPicker: false,
+    readonly: true,
+    fieldNames: {
+      text: "label",
+      value: "value",
+    },
+    data: [],
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.amount"),
+    prop: "amount",
+    itemType: "number",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.expensesTime"),
+    prop: "expensesTime",
+    readonly: true,
+  },
+  {
+    type: "input",
+    label: proxy.t("accountPayment.remark"),
+    prop: "remark",
+    itemType: "textarea",
+    readonly: true,
+  },
+]);
+const rules = {
+  accountManagementId: [{ required: true, message: proxy.t("accountPayment.accountManagementIdMsg") }],
+  currency: [{ required: true, message: proxy.t("accountPayment.currencyMsg") }],
+  amount: [{ required: true, message: proxy.t("accountPayment.amountMsg") }],
+  expensesTime: [{ required: true, message: proxy.t("accountPayment.expensesTimeMsg") }],
+};
+const fundsPayment = ref([]);
+const gerFundsPayment = () => {
+  return proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: getUserInfo().tenantId,
+      dictCode: "funds_payment_method",
+    })
+    .then((res) => {
+      fundsPayment.value = res.data.rows;
+    });
+};
+const accountList = ref([]);
+const gerAccountList = () => {
+  return proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
+    if (res.data.rows && res.data.rows.length > 0) {
+      accountList.value = res.data.rows.map((item) => {
+        return {
+          label: item.alias + " (" + item.name + ")",
+          value: item.id,
+        };
+      });
+      formConfig[9].data = accountList.value;
+    }
+  });
+};
+const gerCurrency = () => {
+  return proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: getUserInfo().tenantId,
+      dictCode: "account_currency",
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[10].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+};
+onMounted(() => {
+  Promise.all([gerFundsPayment(), gerAccountList(), gerCurrency()]).then(() => {
+    if (route.query.id) {
+      proxy.post("/accountPayment/detail", { id: route.query.id }).then((res) => {
+        formData.data = res.data;
+        formData.data.currencyAmount = formData.data.currency + " " + formData.data.amount;
+        let paymentMethodText = "";
+        if (formData.data.paymentMethod && fundsPayment.value && fundsPayment.value.length > 0) {
+          let list = fundsPayment.value.filter((item) => item.dictKey == formData.data.paymentMethod);
+          if (list && list.length > 0) {
+            paymentMethodText = list[0].dictValue;
+          }
+        }
+        formData.data.paymentMethodText = paymentMethodText;
+      });
+    }
+  });
+});
+</script>

+ 106 - 0
src/views/fund/account-payment/index.vue

@@ -0,0 +1,106 @@
+<template>
+  <van-nav-bar :title="$t('accountPayment.name')" left-text="" left-arrow @click-left="onClickLeft"> </van-nav-bar>
+  <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
+  <van-pull-refresh v-model="loading" @refresh="onRefresh">
+    <div class="list">
+      <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
+        <commonList :data="listData" @onClick="toDtl" :config="listConfig"></commonList>
+      </van-list>
+    </div>
+  </van-pull-refresh>
+</template>
+<script setup>
+import { ref, getCurrentInstance } from "vue";
+import commonList from "@/components/common-list.vue";
+
+const proxy = getCurrentInstance().proxy;
+const onClickLeft = () => proxy.$router.push("/main/working");
+const req = ref({
+  pageNum: 1,
+  keyword: null,
+});
+const finished = ref(false);
+const onRefresh = () => {
+  req.value.pageNum = 1;
+  finished.value = false;
+  getList("refresh");
+};
+const loading = ref(false);
+const listData = ref([]);
+const getList = (type) => {
+  loading.value = true;
+  proxy
+    .post("/accountPayment/page", req.value)
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        res.data.rows = res.data.rows.map((item) => {
+          let statusText = "";
+          if (item.status == "10") {
+            statusText = "已打款";
+          } else if (item.status == "20") {
+            statusText = "未打款";
+          }
+          return {
+            ...item,
+            currencyAmount: item.currency + " " + item.amount,
+            statusText: statusText,
+          };
+        });
+      }
+      listData.value = type === "refresh" ? res.data.rows : listData.value.concat(res.data.rows);
+      if (req.value.pageNum * 10 >= res.data.total) {
+        finished.value = true;
+      }
+      req.value.pageNum++;
+      loading.value = false;
+    })
+    .catch(() => {
+      loading.value = false;
+    });
+};
+const toDtl = (row) => {
+  if (row.status == "10") {
+    proxy.$router.push({
+      path: "accountPaymentDetail",
+      query: {
+        id: row.id,
+      },
+    });
+  } else if (row.status == "20") {
+    proxy.$router.push({
+      path: "accountPaymentAdd",
+      query: {
+        id: row.id,
+      },
+    });
+  }
+};
+const listConfig = ref([
+  {
+    label: proxy.t("accountPayment.corporationName"),
+    prop: "corporationName",
+  },
+  {
+    label: proxy.t("accountPayment.createTime"),
+    prop: "createTime",
+  },
+  {
+    label: proxy.t("accountPayment.currencyAmount"),
+    prop: "currencyAmount",
+  },
+  {
+    label: proxy.t("accountPayment.paymentRemark"),
+    prop: "paymentRemark",
+  },
+  {
+    label: proxy.t("accountPayment.statusText"),
+    prop: "statusText",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>