lxf 1 rok temu
rodzic
commit
79b1016ed6

+ 23 - 16
src/components/process/PurchasePayment.vue

@@ -112,7 +112,7 @@ const route = useRoute();
 const { proxy } = getCurrentInstance();
 const supplierList = ref([]);
 const invoiceType = ref([]);
-const payMethod = ref([]);
+const fundsPaymentMethod = ref([]);
 const accountList = ref([]);
 const contractList = ref([]);
 let formData = reactive({
@@ -147,17 +147,7 @@ const judgeStatus = () => {
   }
   return false;
 };
-const type = ref([
-  {
-    label: "未核销",
-    value: "0",
-  },
-  {
-    label: "发票核销",
-    value: "1",
-  },
-]);
-const advanceCode = ref([]);
+const payMethod = ref([]);
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
@@ -193,7 +183,7 @@ const formConfig = computed(() => {
       type: "select",
       label: "付款类型",
       prop: "type",
-      data: type.value,
+      data: payMethod.value,
       itemWidth: 33,
       style: "width: 100%",
       fn: () => {
@@ -273,9 +263,9 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
-      label: "付款类型",
+      label: "付款方式",
       prop: "payType",
-      data: payMethod.value,
+      data: fundsPaymentMethod.value,
       itemWidth: 50,
     },
     {
@@ -325,7 +315,7 @@ const formConfig = computed(() => {
 const rules = ref({
   supplyId: [{ required: true, message: "请选择供应商", trigger: "change" }],
   invoiceType: [{ required: true, message: "请选择发票类型", trigger: "change" }],
-  payType: [{ required: true, message: "请选择付款类型", trigger: "change" }],
+  payType: [{ required: true, message: "请选择付款方式", trigger: "change" }],
   // accountManagementId: [{ required: true, message: "请选择付款账户", trigger: "change" }],
   purchaseId: [{ required: true, message: "请选择采购合同", trigger: "change" }],
   money: [{ required: true, message: "请输入付款金额", trigger: "blur" }],
@@ -358,6 +348,23 @@ const getDict = () => {
     .post("/dictTenantData/page", {
       pageNum: 1,
       pageSize: 999,
+      dictCode: "funds_payment_method",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        fundsPaymentMethod.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
       dictCode: "pay_method",
       tenantId: useUserStore().user.tenantId,
     })

+ 5 - 5
src/views/purchaseManage/purchasePayment/payment/index.vue

@@ -39,7 +39,7 @@ import PaymentPDF from "@/components/PDF/paymentPDF.vue";
 
 const { proxy } = getCurrentInstance();
 const payStatus = ref([]);
-const payMethod = ref([]);
+const fundsPaymentMethod = ref([]);
 const accountList = ref([]);
 const userList = ref([]);
 const status = ref([
@@ -114,12 +114,12 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "付款类型",
+        label: "付款方式",
         prop: "payType",
         width: 160,
       },
       render(type) {
-        return proxy.dictValueLabel(type, payMethod.value);
+        return proxy.dictValueLabel(type, fundsPaymentMethod.value);
       },
     },
     {
@@ -215,12 +215,12 @@ const getDict = () => {
     .post("/dictTenantData/page", {
       pageNum: 1,
       pageSize: 999,
-      dictCode: "pay_method",
+      dictCode: "funds_payment_method",
       tenantId: useUserStore().user.tenantId,
     })
     .then((res) => {
       if (res.rows && res.rows.length > 0) {
-        payMethod.value = res.rows.map((item) => {
+        fundsPaymentMethod.value = res.rows.map((item) => {
           return {
             label: item.dictValue,
             value: item.dictKey,