From a6113908b45ea71d0568bdaf116cbf5af6bc408d Mon Sep 17 00:00:00 2001
From: duan <1004387497@qq.com>
Date: Fri, 28 Jun 2024 15:43:21 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E6=AC=BE=E9=87=91=E9=A2=9D=E9=99=90?=
=?UTF-8?q?=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../invoicing/components/invoicingDetail.vue | 2 +
.../supplier_manage/purchase_detail.vue | 58 +++++++++++--------
2 files changed, 35 insertions(+), 25 deletions(-)
diff --git a/src/views/invoicing/components/invoicingDetail.vue b/src/views/invoicing/components/invoicingDetail.vue
index b23c9c7..b70f107 100644
--- a/src/views/invoicing/components/invoicingDetail.vue
+++ b/src/views/invoicing/components/invoicingDetail.vue
@@ -29,6 +29,8 @@
{{ scope.row.type }}
+
+
diff --git a/src/views/invoicing/supplier_manage/purchase_detail.vue b/src/views/invoicing/supplier_manage/purchase_detail.vue
index 555d5be..4f1642b 100644
--- a/src/views/invoicing/supplier_manage/purchase_detail.vue
+++ b/src/views/invoicing/supplier_manage/purchase_detail.vue
@@ -134,18 +134,18 @@
-
-
-
-
+
+
+
+
-
+
@@ -209,8 +209,10 @@ export default {
label: '作废'
}
],
- montey: null,
- payType: null,
+ ruleForm:{
+ montey: null,
+ payType: null,
+ },
selectCount: 0,
query: {
type: '',
@@ -227,6 +229,11 @@ export default {
list: []
},
info: '',
+ rules: {
+ montey: [
+ { required: true, message: '请输入金额', trigger: 'blur' },
+ ],
+ }
}
},
mounted() {
@@ -237,23 +244,24 @@ export default {
this.dialogTableVisible = true
this.idinfo = id
},
- async sumbit() {
- this.dialogTableVisible = false
- try {
- const res = await paidAmount({
- id: this.idinfo,
- paidAmount: this.montey,
- payType: this.payType
- })
-
- this.$message({ type: 'success', message: '付款成功!' });
- this.montey = ''
- this.payType = ''
- this.getTableData()
-
- } catch (error) {
- console.log(error);
+ sumbit(formName) {
+ this.$refs[formName].validate( async (valid) => {
+ if (valid) {
+ this.dialogTableVisible = false
+ const res = await paidAmount({
+ id: this.idinfo,
+ paidAmount: this.ruleForm.montey,
+ payType: this.payType
+ })
+ this.$message({ type: 'success', message: '付款成功!' });
+ this.ruleForm.montey = ''
+ this.ruleForm.payType = ''
+ this.getTableData()
+ } else {
+ return false;
}
+ });
+
},
async getTableData() {
this.tableData.loading = true