|
@@ -12,7 +12,14 @@
|
|
|
|
|
|
<el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="60%">
|
|
|
<byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
|
|
|
+ <template #other>
|
|
|
+ <div style="width:100%">
|
|
|
+ <el-checkbox-group v-model="formData.data.checkList">
|
|
|
+ <el-checkbox v-for="item in checkBoxList" :label="item.label" :value="item.value" />
|
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="dialogVisible = false" size="default">取 消</el-button>
|
|
@@ -34,13 +41,14 @@ const accountCurrency = ref([]);
|
|
|
const typeData = ref([
|
|
|
{
|
|
|
label: "收入",
|
|
|
- value: "10",
|
|
|
+ value: 10,
|
|
|
},
|
|
|
{
|
|
|
label: "支出",
|
|
|
- value: "20",
|
|
|
+ value: 20,
|
|
|
},
|
|
|
]);
|
|
|
+const checkBoxList = ref([]);
|
|
|
const sourceList = ref({
|
|
|
data: [],
|
|
|
pagination: {
|
|
@@ -70,14 +78,14 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "备注",
|
|
|
- prop: "remark",
|
|
|
+ label: "排序",
|
|
|
+ prop: "sort",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "排序",
|
|
|
- prop: "sort",
|
|
|
+ label: "备注",
|
|
|
+ prop: "remark",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -137,34 +145,19 @@ const getDict = () => {
|
|
|
tenantId: useUserStore().user.tenantId,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- if (res.rows && res.rows.length > 0) {
|
|
|
- accountCurrency.value = res.rows;
|
|
|
- }
|
|
|
- });
|
|
|
- proxy
|
|
|
- .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
|
|
|
- .then((res) => {
|
|
|
- corporationList.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- };
|
|
|
- });
|
|
|
+ checkBoxList.value = res;
|
|
|
});
|
|
|
};
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
- proxy
|
|
|
- .post("/accountManagement/page", sourceList.value.pagination)
|
|
|
- .then((res) => {
|
|
|
- sourceList.value.data = res.rows;
|
|
|
- sourceList.value.pagination.total = res.total;
|
|
|
- setTimeout(() => {
|
|
|
- loading.value = false;
|
|
|
- }, 200);
|
|
|
- });
|
|
|
+ proxy.post("/paymentType/page", sourceList.value.pagination).then((res) => {
|
|
|
+ sourceList.value.data = res.rows;
|
|
|
+ sourceList.value.pagination.total = res.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
};
|
|
|
getDict();
|
|
|
getList();
|
|
@@ -215,6 +208,15 @@ const formConfig = computed(() => {
|
|
|
controls: false,
|
|
|
// itemWidth: 25,
|
|
|
},
|
|
|
+ {
|
|
|
+ type: "title1",
|
|
|
+ title: "关联费控字段",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "slot",
|
|
|
+ slotName: "other",
|
|
|
+ label: "勾选需要字段",
|
|
|
+ },
|
|
|
];
|
|
|
});
|
|
|
const rules = ref({
|
|
@@ -279,14 +281,7 @@ const submitForm = () => {
|
|
|
const update = (row) => {
|
|
|
modalType.value = "edit";
|
|
|
loadingDialog.value = true;
|
|
|
- proxy.post("/accountManagement/detail", { id: row.id }).then((res) => {
|
|
|
- res.accountRemainderList = res.accountRemainderList.map((item) => {
|
|
|
- return {
|
|
|
- id: item.id,
|
|
|
- currency: item.currency,
|
|
|
- remainder: item.remainder,
|
|
|
- };
|
|
|
- });
|
|
|
+ proxy.post("/paymentType/detail", { id: row.id }).then((res) => {
|
|
|
formData.data = res;
|
|
|
loadingDialog.value = false;
|
|
|
});
|