|
@@ -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>
|