|
@@ -81,6 +81,7 @@ let rules = ref({
|
|
|
type: [{ required: true, message: "请选择物料类型", trigger: "change" }],
|
|
|
});
|
|
|
const accountCurrency = ref([]);
|
|
|
+const accountList = ref([]);
|
|
|
const fundsType = ref([]);
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const selectConfig = computed(() => {
|
|
@@ -272,17 +273,7 @@ const formConfig = computed(() => {
|
|
|
prop: "accountManagementId",
|
|
|
label: "付款账户",
|
|
|
required: true,
|
|
|
- isLoad: {
|
|
|
- url: "/accountManagement/page",
|
|
|
- req: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 9999,
|
|
|
- },
|
|
|
- labelKey: "name",
|
|
|
- labelVal: "id",
|
|
|
- method: "post",
|
|
|
- resUrl: "rows",
|
|
|
- },
|
|
|
+ data: accountList.value,
|
|
|
},
|
|
|
{
|
|
|
type: "selectInput",
|
|
@@ -332,6 +323,33 @@ const generatePassword = () => {
|
|
|
}
|
|
|
return password;
|
|
|
};
|
|
|
+const getDict = () => {
|
|
|
+ proxy.getDict(["account_currency", "founds_type"]).then((res) => {
|
|
|
+ accountCurrency.value = res.account_currency.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ fundsType.value = res.founds_type.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ });
|
|
|
+ proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
|
|
|
+ if (res.rows && res.rows.length > 0) {
|
|
|
+ accountList.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.alias + " (" + item.name + ")",
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+getDict();
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
@@ -356,20 +374,6 @@ const paymentType = ref([
|
|
|
},
|
|
|
]);
|
|
|
const fileListCopy = ref([]);
|
|
|
-proxy.getDict(["account_currency", "founds_type"]).then((res) => {
|
|
|
- accountCurrency.value = res.account_currency.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- fundsType.value = res.founds_type.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
-});
|
|
|
const openModal = () => {
|
|
|
dialogVisible.value = true;
|
|
|
modalType.value = "add";
|