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