Parcourir la source

打款: 付款账号下拉框调整

lxf il y a 1 an
Parent
commit
663e3f3103

+ 29 - 25
src/views/finance/fundManage/accountPayment/index.vue

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

+ 15 - 9
src/views/purchaseManage/purchasePayment/payment/index.vue

@@ -58,11 +58,17 @@
                 <template v-if="printDetails.payDetailVoList && printDetails.payDetailVoList.length > 0">
                   <div v-for="(item, index) in printDetails.payDetailVoList" :key="index">
                     <div :style="index + 1 !== printDetails.payDetailVoList.length ? 'border-bottom: 1px solid black;  display: flex' : ' display: flex'">
-                      <div style="width: 120px; padding: 4px 8px; border-right: 1px solid black">{{ item.purchaseCode }}</div>
-                      <div style="width: calc(100% - 340px); padding: 4px 8px; border-right: 1px solid black">{{ item.remark }}</div>
-                      <div style="width: 60px; padding: 4px 8px; border-right: 1px solid black">人民币</div>
-                      <div style="width: 80px; padding: 4px 8px; border-right: 1px solid black">{{ item.money }}</div>
-                      <div style="width: 80px; padding: 4px 8px">{{ printDetails.receiptsNum }}</div>
+                      <div style="width: 120px; padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
+                        {{ item.purchaseCode }}
+                      </div>
+                      <div style="width: calc(100% - 340px); padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
+                        {{ item.remark }}
+                      </div>
+                      <div style="width: 60px; padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">人民币</div>
+                      <div style="width: 80px; padding: 4px 8px; border-right: 1px solid black; display: flex; align-items: center">
+                        {{ item.money }}
+                      </div>
+                      <div style="width: 80px; padding: 4px 8px; display: flex; align-items: center">{{ printDetails.receiptsNum }}</div>
                     </div>
                   </div>
                 </template>
@@ -78,16 +84,16 @@
                   <div style="width: 25%; padding: 0 8px">收款方账号</div>
                 </div>
                 <div style="display: flex">
-                  <div style="width: 25%; padding: 0 8px; border-right: 1px solid black">
+                  <div style="width: 25%; padding: 0 8px; border-right: 1px solid black; display: flex; align-items: center">
                     {{ dictValueLabel(printDetails.payType, fundsPaymentMethod) }}
                   </div>
-                  <div style="width: 25%; padding: 0 8px; border-right: 1px solid black">
+                  <div style="width: 25%; padding: 0 8px; border-right: 1px solid black; display: flex; align-items: center">
                     {{ printDetails.name }}
                   </div>
-                  <div style="width: 25%; padding: 0 8px; border-right: 1px solid black">
+                  <div style="width: 25%; padding: 0 8px; border-right: 1px solid black; display: flex; align-items: center">
                     {{ printDetails.openingBank }}
                   </div>
-                  <div style="width: 25%; padding: 0 8px">
+                  <div style="width: 25%; padding: 0 8px; display: flex; align-items: center">
                     {{ printDetails.accountOpening }}
                   </div>
                 </div>