瀏覽代碼

搬运客户、请款、资金流水页面

cz 1 年之前
父節點
當前提交
d8ee50e31b

+ 103 - 44
src/views/customer/file/add.vue

@@ -21,46 +21,58 @@ const getDict = () => {
     pageSize: 999,
     tenantId: getUserInfo().tenantId,
   };
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "customer_source" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[4].data = res.data.rows.map((item) => {
-        return {
-          text: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "customer_status" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[5].data = res.data.rows.map((item) => {
-        return {
-          text: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "customer_tag" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[7].data = res.data.rows.map((item) => {
-        return {
-          text: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: getUserInfo().tenantId }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      formConfig[6].data = res.rows.map((item) => {
-        return {
-          text: item.nickName,
-          value: item.userId,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "customer_source" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[4].data = res.data.rows.map((item) => {
+          return {
+            text: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "customer_status" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[5].data = res.data.rows.map((item) => {
+          return {
+            text: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "customer_tag" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[7].data = res.data.rows.map((item) => {
+          return {
+            text: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: getUserInfo().tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        formConfig[6].data = res.rows.map((item) => {
+          return {
+            text: item.nickName,
+            value: item.userId,
+          };
+        });
+      }
+    });
 };
 getDict();
 const formData = reactive({
@@ -105,7 +117,10 @@ const formOption = reactive({
       },
     ],
     clickFn: () => {
-      if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+      if (
+        formData.data.customerUserList &&
+        formData.data.customerUserList.length > 0
+      ) {
         formData.data.customerUserList.push({
           name: null,
           email: null,
@@ -195,6 +210,42 @@ const formConfig = reactive([
     },
     data: [],
   },
+  {
+    type: "input",
+    label: "Beneficiary Name",
+    prop: "beneficiaryName",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Beneficiary Account Number",
+    prop: "beneficiaryAccountNumber",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Beneficiary Bank",
+    prop: "beneficiaryBank",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Swift Code",
+    prop: "swiftCode",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Beneficiary Bank Address",
+    prop: "beneficiaryBankAddress",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Beneficiary Address",
+    prop: "beneficiaryAddress",
+    itemType: "text",
+  },
 ]);
 const rules = {
   name: [{ required: true, message: proxy.t("customerFile.customerNameMsg") }],
@@ -204,12 +255,20 @@ const rules = {
   email: [{ required: true, message: proxy.t("customerFile.emailMsg") }],
 };
 const onSubmit = () => {
-  if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
+  if (
+    formData.data.customerUserList &&
+    formData.data.customerUserList.length > 0
+  ) {
     if (formData.data.cityObj) {
       formData.data.countryId = formData.data.cityObj.selectedOptions[0].value;
-      formData.data.provinceId = formData.data.cityObj.tabIndex === 2 ? formData.data.cityObj.selectedOptions[1].value : null;
+      formData.data.provinceId =
+        formData.data.cityObj.tabIndex === 2
+          ? formData.data.cityObj.selectedOptions[1].value
+          : null;
       formData.data.cityId =
-        formData.data.cityObj.tabIndex === 1 ? formData.data.cityObj.selectedOptions[1].value : formData.data.cityObj.selectedOptions[2].value;
+        formData.data.cityObj.tabIndex === 1
+          ? formData.data.cityObj.selectedOptions[1].value
+          : formData.data.cityObj.selectedOptions[2].value;
     }
     if (formData.data.tags && formData.data.tags.length > 0) {
       formData.data.tag = formData.data.tags.join(",");

+ 88 - 20
src/views/customer/file/detail.vue

@@ -110,6 +110,42 @@ const formConfig = reactive([
     prop: "tagText",
     itemType: "text",
   },
+  {
+    type: "input",
+    label: "Beneficiary Name",
+    prop: "beneficiaryName",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Beneficiary Account Number",
+    prop: "beneficiaryAccountNumber",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Beneficiary Bank",
+    prop: "beneficiaryBank",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Swift Code",
+    prop: "swiftCode",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Beneficiary Bank Address",
+    prop: "beneficiaryBankAddress",
+    itemType: "text",
+  },
+  {
+    type: "input",
+    label: "Beneficiary Address",
+    prop: "beneficiaryAddress",
+    itemType: "text",
+  },
 ]);
 const formOptionTwo = reactive({
   readonly: true, //用于控制整个表单是否只读
@@ -153,16 +189,22 @@ const onSubmit = () => {
   });
 };
 const getUser = () => {
-  return proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: getUserInfo().tenantId }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      userList.value = res.rows.map((item) => {
-        return {
-          text: item.nickName,
-          value: item.userId,
-        };
-      });
-    }
-  });
+  return proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: getUserInfo().tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        userList.value = res.rows.map((item) => {
+          return {
+            text: item.nickName,
+            value: item.userId,
+          };
+        });
+      }
+    });
 };
 const getSource = () => {
   return proxy
@@ -217,24 +259,42 @@ onMounted(() => {
         }
         formData.data.cityText = cityText;
         let sourceText = "";
-        if (formData.data.source && customerSource.value && customerSource.value.length > 0) {
-          let list = customerSource.value.filter((item) => item.dictKey == formData.data.source);
+        if (
+          formData.data.source &&
+          customerSource.value &&
+          customerSource.value.length > 0
+        ) {
+          let list = customerSource.value.filter(
+            (item) => item.dictKey == formData.data.source
+          );
           if (list && list.length > 0) {
             sourceText = list[0].dictValue;
           }
         }
         formData.data.sourceText = sourceText;
         let statusText = "";
-        if (formData.data.status && customerStatus.value && customerStatus.value.length > 0) {
-          let list = customerStatus.value.filter((item) => item.dictKey == formData.data.status);
+        if (
+          formData.data.status &&
+          customerStatus.value &&
+          customerStatus.value.length > 0
+        ) {
+          let list = customerStatus.value.filter(
+            (item) => item.dictKey == formData.data.status
+          );
           if (list && list.length > 0) {
             statusText = list[0].dictValue;
           }
         }
         formData.data.statusText = statusText;
         let userText = "";
-        if (formData.data.userId && userList.value && userList.value.length > 0) {
-          let list = userList.value.filter((item) => item.value == formData.data.userId);
+        if (
+          formData.data.userId &&
+          userList.value &&
+          userList.value.length > 0
+        ) {
+          let list = userList.value.filter(
+            (item) => item.value == formData.data.userId
+          );
           if (list && list.length > 0) {
             userText = list[0].text;
           }
@@ -245,7 +305,9 @@ onMounted(() => {
           let tags = formData.data.tag.split(",");
           if (tags && tags.length > 0) {
             for (let i = 0; i < tags.length; i++) {
-              let list = customerTag.value.filter((item) => item.dictKey == tags[i]);
+              let list = customerTag.value.filter(
+                (item) => item.dictKey == tags[i]
+              );
               if (list && list.length > 0) {
                 if (i === 0) {
                   tagText = list[0].dictValue;
@@ -257,9 +319,15 @@ onMounted(() => {
           }
           formData.data.tagText = tagText;
         }
-        proxy.post("/customerFollowRecords/page", { pageNum: 1, pageSize: 999, customerId: route.query.id }).then((resRecords) => {
-          formData.data.recordsList = resRecords.data.rows;
-        });
+        proxy
+          .post("/customerFollowRecords/page", {
+            pageNum: 1,
+            pageSize: 999,
+            customerId: route.query.id,
+          })
+          .then((resRecords) => {
+            formData.data.recordsList = resRecords.data.rows;
+          });
       });
     }
   });

+ 22 - 2
src/views/customer/file/index.vue

@@ -37,6 +37,22 @@ const onRefresh = () => {
 };
 const loading = ref(false);
 const listData = ref([]);
+const customerSource = ref([]);
+const customerStatus = ref([]);
+
+const getDict = () => {
+  proxy.getDictOne(["customer_source", "customer_status"]).then((res) => {
+    customerSource.value = res["customer_source"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    customerStatus.value = res["customer_status"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
+};
+// getDict();
 const getList = (type) => {
   loading.value = true;
   proxy
@@ -49,11 +65,15 @@ const getList = (type) => {
           item.cityName = item.cityName ? item.cityName : "";
           return {
             ...item,
-            cityText: item.countryName + "," + item.provinceName   + "," + item.cityName ,
+            cityText:
+              item.countryName + "," + item.provinceName + "," + item.cityName,
           };
         });
       }
-      listData.value = type === "refresh" ? res.data.rows : listData.value.concat(res.data.rows);
+      listData.value =
+        type === "refresh"
+          ? res.data.rows
+          : listData.value.concat(res.data.rows);
       if (req.value.pageNum * 10 >= res.data.total) {
         finished.value = true;
       }

+ 222 - 203
src/views/fund/flow-of-funds/add.vue

@@ -1,39 +1,41 @@
 <template>
-    <div class="form">
-      <van-nav-bar :title="$t('flowFunds.' + route.query.type)" :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"> </testForm>
-    </div>
-  </template>
+  <div class="form">
+    <van-nav-bar :title="$t('flowFunds.' + route.query.type)" :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"> </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 getDict = () => {
-    proxy
-      .post("/dictTenantData/page", {
-        pageNum: 1,
-        pageSize: 999,
-        dictCode: "account_currency",
-        tenantId: getUserInfo().tenantId,
-      })
-      .then((res) => {
-        if (res.data.rows && res.data.rows.length > 0) {
-          formConfig[4].data = res.data.rows.map((item) => {
-            return {
-              text: item.dictValue,
-              value: item.dictKey,
-            };
-          });
-        }
-      });
-    proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+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 getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: getUserInfo().tenantId,
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[4].data = res.data.rows.map((item) => {
+          return {
+            text: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
       if (res.data.rows && res.data.rows.length > 0) {
         formConfig[1].data = res.data.rows.map((item) => {
           return {
@@ -43,189 +45,206 @@
         });
       }
     });
-  };
-  getDict();
-  const formData = reactive({
-    data: {
-      accountManagementId: null,
-      status: null,
-      amount: null,
-      currency: null,
-      name: null,
-      openingBank: null,
-      accountOpening: null,
-      transactionTime: formatDate(new Date(), "yyyy-MM-dd"),
-      remarks: null,
-      received: "20",
-    },
-  });
-  const formDom = ref(null);
-  const formOption = reactive({
-    readonly: false, //用于控制整个表单是否只读
-    disabled: false,
-    labelAlign: "top",
-    scroll: true,
-    labelWidth: "62pk",
-  });
-  const formConfig = reactive([
-    {
-      type: "title",
-      title: proxy.t("flowFunds.tradeInformation"),
-    },
-    {
-      type: "picker",
-      label: proxy.t("flowFunds.selectAccount"),
-      prop: "accountManagementId",
-      itemType: "onePicker",
-      showPicker: false,
-      fieldNames: {
-        text: "text",
-        value: "value",
-      },
-      data: [],
+};
+getDict();
+const formData = reactive({
+  data: {
+    accountManagementId: null,
+    status: null,
+    amount: null,
+    currency: null,
+    name: null,
+    openingBank: null,
+    accountOpening: null,
+    transactionTime: formatDate(new Date(), "yyyy-MM-dd"),
+    remarks: null,
+    received: "20",
+  },
+});
+const formDom = ref(null);
+const formOption = reactive({
+  readonly: false, //用于控制整个表单是否只读
+  disabled: false,
+  labelAlign: "top",
+  scroll: true,
+  labelWidth: "62pk",
+});
+const formConfig = reactive([
+  {
+    type: "title",
+    title: proxy.t("flowFunds.tradeInformation"),
+  },
+  {
+    type: "picker",
+    label: proxy.t("flowFunds.selectAccount"),
+    prop: "accountManagementId",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "text",
+      value: "value",
     },
-    {
-      type: "picker",
-      label: proxy.t("flowFunds.tradingHour"),
-      prop: "transactionTime",
-      itemType: "datePicker",
-      showPicker: false,
-      split: "-",
-      columnsType: ["year", "month", "day"],
+    data: [],
+  },
+  {
+    type: "picker",
+    label: proxy.t("flowFunds.tradingHour"),
+    prop: "transactionTime",
+    itemType: "datePicker",
+    showPicker: false,
+    split: "-",
+    columnsType: ["year", "month", "day"],
+  },
+  {
+    type: "picker",
+    label: proxy.t("flowFunds.tradeType"),
+    prop: "status",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "label",
+      value: "value",
     },
-    {
-      type: "picker",
-      label: proxy.t("flowFunds.tradeType"),
-      prop: "status",
-      itemType: "onePicker",
-      showPicker: false,
-      fieldNames: {
-        text: "label",
-        value: "value",
+    data: [
+      {
+        label: proxy.t("flowFunds.income"),
+        value: "10",
       },
-      data: [
-        {
-          label: proxy.t("flowFunds.income"),
-          value: "10",
-        },
-        {
-          label: proxy.t("flowFunds.disburse"),
-          value: "20",
-        },
-      ],
-      changeFn: (option, item, index) => {
-        formData.data[item.prop] = option.selectedOptions[0].value;
-        formData.data[item.prop + "Name"] = option.selectedOptions[0].label;
-        formConfig[index].showPicker = false;
-        formData.data.received = "20";
-        formData.data.receivedName = "否";
-        if (option.selectedOptions[0].value == "10") {
-          formConfig[6].showStatus = false;
-        } else {
-          formConfig[6].showStatus = true;
-        }
+      {
+        label: proxy.t("flowFunds.disburse"),
+        value: "20",
       },
+    ],
+    changeFn: (option, item, index) => {
+      formData.data[item.prop] = option.selectedOptions[0].value;
+      formData.data[item.prop + "Name"] = option.selectedOptions[0].label;
+      formConfig[index].showPicker = false;
+      formData.data.received = "20";
+      formData.data.receivedName = "否";
+      if (option.selectedOptions[0].value == "10") {
+        formConfig[6].showStatus = false;
+      } else {
+        formConfig[6].showStatus = true;
+      }
     },
-    {
-      type: "picker",
-      label: proxy.t("flowFunds.currency"),
-      prop: "currency",
-      itemType: "onePicker",
-      showPicker: false,
-      fieldNames: {
-        text: "text",
-        value: "value",
-      },
-      data: [],
+  },
+  {
+    type: "picker",
+    label: proxy.t("flowFunds.currency"),
+    prop: "currency",
+    itemType: "onePicker",
+    showPicker: false,
+    fieldNames: {
+      text: "text",
+      value: "value",
     },
-    {
-      type: "input",
-      label: proxy.t("flowFunds.amount"),
-      prop: "amount",
-      itemType: "number",
+    data: [],
+  },
+  {
+    type: "input",
+    label: proxy.t("flowFunds.amount"),
+    prop: "amount",
+    itemType: "number",
+  },
+  {
+    type: "input",
+    label: "汇算人民币金额",
+    prop: "amountCny",
+    itemType: "number",
+  },
+  {
+    type: "picker",
+    label: proxy.t("flowFunds.contractArrival"),
+    prop: "received",
+    itemType: "onePicker",
+    showPicker: false,
+    showStatus: true,
+    fieldNames: {
+      text: "label",
+      value: "value",
     },
-    {
-      type: "picker",
-      label: proxy.t("flowFunds.contractArrival"),
-      prop: "received",
-      itemType: "onePicker",
-      showPicker: false,
-      showStatus: true,
-      fieldNames: {
-        text: "label",
-        value: "value",
+    data: [
+      {
+        label: proxy.t("flowFunds.yes"),
+        value: "10",
       },
-      data: [
-        {
-          label: proxy.t("flowFunds.yes"),
-          value: "10",
-        },
-        {
-          label: proxy.t("flowFunds.no"),
-          value: "20",
-        },
-      ],
-    },
-    {
-      type: "title",
-      title: proxy.t("flowFunds.peerInformation"),
-    },
-    {
-      type: "input",
-      itemType: "text",
-      label: proxy.t("flowFunds.accountName"),
-      prop: "name",
-      clearable: true,
-    },
-    {
-      type: "input",
-      itemType: "text",
-      label: proxy.t("flowFunds.bankDeposit"),
-      prop: "openingBank",
-      clearable: true,
-    },
-    {
-      type: "input",
-      itemType: "text",
-      label: proxy.t("flowFunds.bankAccountNumber"),
-      prop: "accountOpening",
-      clearable: true,
-    },
-    {
-      type: "title",
-      title: proxy.t("flowFunds.otherInformation"),
-    },
-    {
-      type: "input",
-      itemType: "textarea",
-      label: proxy.t("flowFunds.remark"),
-      prop: "remarks",
-      clearable: true,
-    },
-  ]);
-  const rules = {
-    accountManagementId: [{ required: true, message: proxy.t("flowFunds.selectAccountMsg") }],
-    transactionTime: [{ required: true, message: proxy.t("flowFunds.tradingHourMsg") }],
-    status: [{ required: true, message: proxy.t("flowFunds.tradeTypeMsg") }],
-    currency: [{ required: true, message: proxy.t("flowFunds.currencyMsg") }],
-    amount: [{ required: true, message: proxy.t("flowFunds.amountMsg") }],
-    received: [{ required: true, message: proxy.t("flowFunds.contractArrivalMsg") }],
-  };
-  const onSubmit = () => {
-    formData.data.transactionTime = formData.data.transactionTime + " " + formatDate(new Date(), "hh:mm:ss");
-    proxy.post("/accountRunningWater/" + route.query.type, formData.data).then(() => {
+      {
+        label: proxy.t("flowFunds.no"),
+        value: "20",
+      },
+    ],
+  },
+  {
+    type: "title",
+    title: proxy.t("flowFunds.peerInformation"),
+  },
+  {
+    type: "input",
+    itemType: "text",
+    label: proxy.t("flowFunds.accountName"),
+    prop: "name",
+    clearable: true,
+  },
+  {
+    type: "input",
+    itemType: "text",
+    label: proxy.t("flowFunds.bankDeposit"),
+    prop: "openingBank",
+    clearable: true,
+  },
+  {
+    type: "input",
+    itemType: "text",
+    label: proxy.t("flowFunds.bankAccountNumber"),
+    prop: "accountOpening",
+    clearable: true,
+  },
+  {
+    type: "title",
+    title: proxy.t("flowFunds.otherInformation"),
+  },
+  {
+    type: "input",
+    itemType: "textarea",
+    label: proxy.t("flowFunds.remark"),
+    prop: "remarks",
+    clearable: true,
+  },
+]);
+const rules = {
+  accountManagementId: [
+    { required: true, message: proxy.t("flowFunds.selectAccountMsg") },
+  ],
+  transactionTime: [
+    { required: true, message: proxy.t("flowFunds.tradingHourMsg") },
+  ],
+  status: [{ required: true, message: proxy.t("flowFunds.tradeTypeMsg") }],
+  currency: [{ required: true, message: proxy.t("flowFunds.currencyMsg") }],
+  amount: [{ required: true, message: proxy.t("flowFunds.amountMsg") }],
+  received: [
+    { required: true, message: proxy.t("flowFunds.contractArrivalMsg") },
+  ],
+};
+const onSubmit = () => {
+  formData.data.transactionTime =
+    formData.data.transactionTime + " " + formatDate(new Date(), "hh:mm:ss");
+  proxy
+    .post("/accountRunningWater/" + route.query.type, formData.data)
+    .then(() => {
       showSuccessToast(proxy.t("common.addSuccess"));
       setTimeout(() => {
         history.back();
       }, 500);
     });
-  };
-  onMounted(() => {
-    if (route.query.id) {
-      proxy.post("/accountRunningWater/detail", { id: route.query.id }).then((res) => {
+};
+onMounted(() => {
+  if (route.query.id) {
+    proxy
+      .post("/accountRunningWater/detail", { id: route.query.id })
+      .then((res) => {
         formData.data = res.data;
       });
-    }
-  });
-  </script>
+  }
+});
+</script>
   

+ 171 - 107
src/views/processApproval/components/SendFunds.vue

@@ -11,7 +11,8 @@
       <div class="common-process-card" v-show="active == 1">
         <div class="common-title">{{ proxy.t("funds.claimDetails") }}</div>
         <testForm v-model="formData.data" :formOption="formDetailOption" :formConfig="formDetailConfig" :rules="rules" ref="formDom2"> </testForm>
-        <testForm v-model="formData.data" :formOption="formDetailTwoOption" :formConfig="formDetailTwoConfig" :rules="rules" ref="formDom3"> </testForm>
+        <testForm v-model="formData.data" :formOption="formDetailTwoOption" :formConfig="formDetailTwoConfig" :rules="rules" ref="formDom3">
+        </testForm>
       </div>
       <div class="common-process-card" v-show="active == 2">
         <div class="common-title">{{ proxy.t("funds.receiptPaymentInformation") }}</div>
@@ -23,7 +24,16 @@
 </template>
 
 <script setup>
-import { ref, getCurrentInstance, onMounted, defineProps, defineExpose, watch, reactive, toRefs } from "vue";
+import {
+  ref,
+  getCurrentInstance,
+  onMounted,
+  defineProps,
+  defineExpose,
+  watch,
+  reactive,
+  toRefs,
+} from "vue";
 import { useRoute } from "vue-router";
 import testForm from "@/components/testForm/index.vue";
 import { getUserInfo } from "@/utils/auth";
@@ -37,8 +47,8 @@ const proxy = getCurrentInstance().proxy;
 const route = useRoute();
 const active = ref(0);
 const tabsChange = () => {
-	active.value ++
-}
+  active.value++;
+};
 const oldType = ref("");
 const formData = reactive({
   data: {
@@ -119,7 +129,16 @@ const formConfig = reactive([
         for (let text in formData.data) {
           if (text === "advanceId") {
             formData.data.advanceId = "";
-          } else if (["corporationId", "corporationIdName", "type", "typeName", "paymentTime", "paymentTimeName"].includes(text)) {
+          } else if (
+            [
+              "corporationId",
+              "corporationIdName",
+              "type",
+              "typeName",
+              "paymentTime",
+              "paymentTimeName",
+            ].includes(text)
+          ) {
           } else if (text === "accountRequestFundsDetailList") {
             formData.data.accountRequestFundsDetailList = [];
           } else if (text === "fileList") {
@@ -154,32 +173,35 @@ const formConfig = reactive([
     changeFn: (val, data) => {
       proxy.formChange(val, data, formData);
       if (val.selectedValues && val.selectedValues.length > 0) {
-        proxy.post("/accountRequestFunds/detail", { id: val.selectedValues[0] }).then((res) => {
-          formData.data.departmentId = res.data.departmentId;
-          formData.data.currency = res.data.currency;
-          formData.data.paymentRemarks = res.data.paymentRemarks;
-          formData.data.accountRequestFundsDetailList = res.data.accountRequestFundsDetailList.map((item) => {
-            return {
-              costType: item.costType,
-              amount: item.amount,
-              contractId: item.contractId,
-              advanceAmount: item.amount,
-              remarks: item.remarks,
-            };
+        proxy
+          .post("/accountRequestFunds/detail", { id: val.selectedValues[0] })
+          .then((res) => {
+            formData.data.departmentId = res.data.departmentId;
+            formData.data.currency = res.data.currency;
+            formData.data.paymentRemarks = res.data.paymentRemarks;
+            formData.data.accountRequestFundsDetailList =
+              res.data.accountRequestFundsDetailList.map((item) => {
+                return {
+                  costType: item.costType,
+                  amount: item.amount,
+                  contractId: item.contractId,
+                  advanceAmount: item.amount,
+                  remarks: item.remarks,
+                };
+              });
+            handleChangeAmount();
+            formData.data.advanceAmounts = res.data.total;
+            formData.data.quantity = res.data.quantity;
+            formData.data.paymentMethod = res.data.paymentMethod;
+            formData.data.accountManagementId = res.data.accountManagementId;
+            formData.data.name = res.data.name;
+            formData.data.accountOpening = res.data.accountOpening;
+            formData.data.openingBank = res.data.openingBank;
+            formData.data.interbankNumber = res.data.interbankNumber;
+            formDom1.value.formDataShowLabelOne();
+            formDom2.value.formDataListShowLabelOne();
+            formDom4.value.formDataShowLabelOne();
           });
-          handleChangeAmount();
-          formData.data.advanceAmounts = res.data.total;
-          formData.data.quantity = res.data.quantity;
-          formData.data.paymentMethod = res.data.paymentMethod;
-          formData.data.accountManagementId = res.data.accountManagementId;
-          formData.data.name = res.data.name;
-          formData.data.accountOpening = res.data.accountOpening;
-          formData.data.openingBank = res.data.openingBank;
-          formData.data.interbankNumber = res.data.interbankNumber;
-          formDom1.value.formDataShowLabelOne();
-          formDom2.value.formDataListShowLabelOne();
-          formDom4.value.formDataShowLabelOne();
-        });
       }
       data.showPicker = false;
     },
@@ -259,7 +281,10 @@ const formDetailOption = reactive({
       },
     ],
     clickFn: () => {
-      if (formData.data.accountRequestFundsDetailList && formData.data.accountRequestFundsDetailList.length > 0) {
+      if (
+        formData.data.accountRequestFundsDetailList &&
+        formData.data.accountRequestFundsDetailList.length > 0
+      ) {
         formData.data.accountRequestFundsDetailList.push({
           costType: null,
           contractId: null,
@@ -366,7 +391,9 @@ const formReceiptPaymentConfig = reactive([
   },
 ]);
 const rules = {
-  corporationId: [{ required: true, message: proxy.t("funds.corporationIdMsg") }],
+  corporationId: [
+    { required: true, message: proxy.t("funds.corporationIdMsg") },
+  ],
   departmentId: [{ required: true, message: proxy.t("funds.departmentIdMsg") }],
   type: [{ required: true, message: proxy.t("funds.typeMsg") }],
   advanceId: [{ required: true, message: proxy.t("funds.advanceIdMsg") }],
@@ -376,8 +403,12 @@ const rules = {
   amount: [{ required: true, message: proxy.t("funds.amountMsg") }],
   remarks: [{ required: true, message: proxy.t("funds.remarksMsg") }],
   quantity: [{ required: true, message: proxy.t("funds.quantityMsg") }],
-  paymentMethod: [{ required: true, message: proxy.t("funds.paymentMethodMsg") }],
-  accountManagementId: [{ required: true, message: proxy.t("funds.accountManagementIdMsg") }],
+  paymentMethod: [
+    { required: true, message: proxy.t("funds.paymentMethodMsg") },
+  ],
+  accountManagementId: [
+    { required: true, message: proxy.t("funds.accountManagementIdMsg") },
+  ],
 };
 const getAdvanceList = () => {
   proxy
@@ -394,7 +425,12 @@ const getAdvanceList = () => {
       if (res.data.rows && res.data.rows.length > 0) {
         formConfig[3].data = res.data.rows.map((item) => {
           return {
-            label: item.createTime.substr(0, 10) + "  " + item.currency + " " + item.total,
+            label:
+              item.createTime.substr(0, 10) +
+              "  " +
+              item.currency +
+              " " +
+              item.total,
             value: item.id,
           };
         });
@@ -407,16 +443,18 @@ const getDict = () => {
     pageSize: 999,
     tenantId: getUserInfo().tenantId,
   };
-  proxy.post("/corporation/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[0].data = res.data.rows.map((item) => {
-        return {
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[0].data = res.data.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
   proxy.get("/tenantDept/list", query).then((res) => {
     if (res.data && res.data.length > 0) {
       formConfig[1].data = res.data
@@ -429,66 +467,89 @@ const getDict = () => {
         });
     }
   });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "founds_type" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[2].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "account_currency" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[4].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "funds_cost_type" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formDetailOption.btnConfig.listConfig[0].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/contract/page1", { pageNum: 1, pageSize: 9999, status: 30 }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formDetailOption.btnConfig.listConfig[1].data = res.data.rows.map((item) => {
-        return {
-          label: item.code,
-          value: item.id,
-        };
-      });
-    }
-  });
-  proxy.post("/dictTenantData/page", { ...query, dictCode: "funds_payment_method" }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formReceiptPaymentConfig[0].data = res.data.rows.map((item) => {
-        return {
-          label: item.dictValue,
-          value: item.dictKey,
-        };
-      });
-    }
-  });
-  proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formReceiptPaymentConfig[1].data = res.data.rows.map((item) => {
-        return {
-          label: item.alias,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "founds_type" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[2].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "account_currency" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formConfig[4].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", { ...query, dictCode: "funds_cost_type" })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDetailOption.btnConfig.listConfig[0].data = res.data.rows.map(
+          (item) => {
+            return {
+              label: item.dictValue,
+              value: item.dictKey,
+            };
+          }
+        );
+      }
+    });
+  proxy
+    .post("/contract/contractAndSamplePage", {
+      pageNum: 1,
+      pageSize: 9999,
+      status: 30,
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formDetailOption.btnConfig.listConfig[1].data = res.data.rows.map(
+          (item) => {
+            return {
+              label: item.code,
+              value: item.id,
+            };
+          }
+        );
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      ...query,
+      dictCode: "funds_payment_method",
+    })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formReceiptPaymentConfig[0].data = res.data.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        formReceiptPaymentConfig[1].data = res.data.rows.map((item) => {
+          return {
+            label: item.alias,
+            value: item.id,
+          };
+        });
+      }
+    });
 };
 getDict();
 const handleChangeAmount = () => {
@@ -507,7 +568,10 @@ const handleSubmit = async () => {
 watch(
   refProps.queryData,
   () => {
-    if (refProps.queryData.value && ["10", "20", "30"].includes(route.query.processType)) {
+    if (
+      refProps.queryData.value &&
+      ["10", "20", "30"].includes(route.query.processType)
+    ) {
       for (const key in refProps.queryData.value) {
         formData.data[key] = refProps.queryData.value[key];
       }
@@ -529,7 +593,7 @@ watch(
 );
 defineExpose({
   handleSubmit,
-  tabsChange
+  tabsChange,
 });
 onMounted(() => {});
 </script>