优化支付问题

This commit is contained in:
duan 2024-06-28 15:03:09 +08:00
parent ef518bafa0
commit 9c815458a5
2 changed files with 18 additions and 20 deletions

View File

@ -83,7 +83,7 @@
<template v-slot="scope">
<div class="name_wrap">
<span class="name">{{ scope.row.name }}</span>
<el-tag type="info" v-if="scope.row.specSnap" size="mini">{{ scope.row.specSnap }}</el-tag>
<!-- <el-tag type="info" v-if="scope.row.specSnap" size="mini">{{ scope.row.specSnap }}</el-tag> -->
</div>
</template>
</el-table-column>

View File

@ -92,7 +92,7 @@
</el-table-column>
<el-table-column label="应付金额" prop="totalAmount">
<template v-slot="scope">
<span v-if="scope.row.type != 'purveyor'">-</span> {{ scope.row.totalAmount }}
{{ scope.row.totalAmount }}
</template>
</el-table-column>
<el-table-column label="已付款金额" prop="totalAmount">
@ -104,7 +104,7 @@
</el-table-column>
<el-table-column label="待付款金额" prop="waitAmount">
<template v-slot="scope">
<span class="num"><span v-if="scope.row.type != 'purveyor'">-</span> {{ scope.row.waitAmount }}</span>
<span class="num"> {{ scope.row.waitAmount }}</span>
</template>
</el-table-column>
<el-table-column label="状态" prop="status">
@ -138,13 +138,13 @@
<el-form>
<el-form-item label="付款金额" label-width="80px">
<el-input v-model="montey" type="number" autocomplete="off"></el-input>
</el-form-item>
</el-form-item>
<el-form-item label="付款方式" label-width="80px">
<el-input v-model="payType" type="text" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogTableVisible = false; montey = '';payType=''"> </el-button>
<el-button @click="dialogTableVisible = false; montey = ''; payType = ''"> </el-button>
<el-button type="primary" @click="sumbit()"> </el-button>
</div>
</el-dialog>
@ -210,7 +210,7 @@ export default {
}
],
montey: null,
payType:null,
payType: null,
selectCount: 0,
query: {
type: '',
@ -226,7 +226,7 @@ export default {
loading: false,
list: []
},
info: ''
info: '',
}
},
mounted() {
@ -238,24 +238,22 @@ export default {
this.idinfo = id
},
async sumbit() {
try {
const res = await paidAmount({
id: this.idinfo,
paidAmount: this.montey,
payType:this.payType
})
this.dialogTableVisible = false
try {
const res = await paidAmount({
id: this.idinfo,
paidAmount: this.montey,
payType: this.payType
})
this.$message({ type: 'success', message: '付款成功!' });
setTimeout(() => {
this.dialogTableVisible = false
this.$message({ type: 'success', message: '付款成功!' });
this.montey = ''
this.payType = ''
this.getTableData()
}, 1500);
} catch (error) {
console.log(error);
}
} catch (error) {
console.log(error);
}
},
async getTableData() {
this.tableData.loading = true