Merge branch 'wwz' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq

This commit is contained in:
gyq 2024-07-01 18:10:31 +08:00
commit 6c8e4d868a
2 changed files with 99 additions and 20 deletions

View File

@ -292,3 +292,11 @@ export function tbProductStocktakinGet(data) {
}
});
}
// 账单付款记录
export function tbShopPurveyorTransacttransactPayInfos(params) {
return request({
url: `/api/tbShopPurveyorTransact/transactPayInfos`,
method: "get",
params
});
}

View File

@ -123,10 +123,9 @@
</el-table-column>
<el-table-column label="操作" width="80" align="center">
<template v-slot="scope">
<!-- <router-link :to="{ name: 'purchase_detail', query: { purveyorId: scope.row.purveyorId } }">
<el-button type="text" size="mini">查看详情</el-button>
</router-link> -->
<el-button type="text" size="mini" round @click="Uppop(scope.row.id)">付款</el-button>
<el-button type="text" size="mini"
@click="typedialogshowsumbit(scope.row.id)">账单付款记录</el-button>
</template>
</el-table-column>
</el-table>
@ -140,20 +139,45 @@
<el-input v-model="ruleForm.montey" placeholder="请输入金额" type="number" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="付款方式" label-width="80px">
<el-input v-model="ruleForm.payType" placeholder="请输入付款方式" type="text" autocomplete="off"></el-input>
<el-input v-model="ruleForm.payType" placeholder="请输入付款方式" type="text"
autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="备注" label-width="80px">
<el-input v-model="ruleForm.remark" placeholder="请输备注" type="text" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogTableVisible = false; ruleForm.montey = ''; ruleForm.payType = ''"> </el-button>
<el-button @click="dialogTableVisible = false; ruleForm.montey = ''; ruleForm.payType = ''">
</el-button>
<el-button type="primary" @click="sumbit('ruleForm')"> </el-button>
</div>
</el-dialog>
<el-dialog title="账单付款记录" :visible.sync="typedialogshow">
<div class="head-container">
<el-input v-model="querytypedialogshow.type" size="small" clearable placeholder="支付方式"
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatatype" />
<div style="margin-top: 10px;">
<el-button type="primary" @click="getTableDatatype">查询</el-button>
<el-button @click="resetHandletype">重置</el-button>
</div>
</div>
<el-table ref="table" :data="tableDatatype.data" v-loading="tableDatatype.loading" row-key="id">
<el-table-column label="支付方式" prop="payType" />
<el-table-column label="支付金额" prop="paidAmount" />
<el-table-column label="备注" prop="remark" />
<el-table-column label="创建时间" prop="createTime">
<template v-slot="scope">
{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import dayjs from 'dayjs'
import { tbShopPurveyorTransactInfo, paidAmount, dictDetail, tbShopPurveyorTransactSum } from '@/api/invoicing'
import { tbShopPurveyorTransactInfo, paidAmount, dictDetail, tbShopPurveyorTransactSum, tbShopPurveyorTransacttransactPayInfos } from '@/api/invoicing'
export default {
data() {
return {
@ -209,9 +233,10 @@ export default {
label: '作废'
}
],
ruleForm:{
ruleForm: {
montey: null,
payType: null,
remark: ""
},
selectCount: 0,
query: {
@ -233,6 +258,18 @@ export default {
montey: [
{ required: true, message: '请输入金额', trigger: 'blur' },
],
},
typedialogshow: false,//
querytypedialogshow: {
type: '',
id: ''
},
tableDatatype: {
page: 0,
size: 10,
total: 0,
loading: false,
list: []
}
}
},
@ -245,13 +282,14 @@ export default {
this.idinfo = id
},
sumbit(formName) {
this.$refs[formName].validate( async (valid) => {
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
payType: this.payType,
remark: this.ruleForm.remark
})
this.$message({ type: 'success', message: '付款成功!' });
this.ruleForm.montey = ''
@ -332,7 +370,40 @@ export default {
},
async tbShopPurveyorTransactSum() {
this.info = await tbShopPurveyorTransactSum({ purveyorId: this.$route.query.purveyorId, type: this.query.type })
},
//
paginationChangetype(e) {
this.tableDatatype.page = e - 1
this.getTableDatatype()
},
//
resetHandletype() {
this.querytypedialogshow.type = ''
this.tableData.page = 0
this.getTableDatatype()
},
typedialogshowsumbit(ID) {
this.querytypedialogshow.id = ID
this.getTableDatatype()
},
//
async getTableDatatype() {
this.tableDatatype.loading = true
try {
const res = await tbShopPurveyorTransacttransactPayInfos({
// page: this.tableDatatype.page,
// size: this.tableDatatype.size,
type: this.querytypedialogshow.type,
id: this.querytypedialogshow.id
})
this.typedialogshow = true
this.tableDatatype.loading = false
this.tableDatatype.data = res.content
this.tableDatatype.total = res.totalElements
} catch (error) {
console.log(error)
}
},
}
}
</script>