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>
<el-table-column label="操作" width="80" align="center"> <el-table-column label="操作" width="80" align="center">
<template v-slot="scope"> <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" round @click="Uppop(scope.row.id)">付款</el-button>
<el-button type="text" size="mini"
@click="typedialogshowsumbit(scope.row.id)">账单付款记录</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -134,26 +133,51 @@
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size" <el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination> @current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
<!-- 付款弹窗组件 --> <!-- 付款弹窗组件 -->
<el-dialog title="" :visible.sync="dialogTableVisible" width="350px"> <el-dialog title="" :visible.sync="dialogTableVisible" width="350px">
<el-form :rules="rules" ref="ruleForm" :model="ruleForm"> <el-form :rules="rules" ref="ruleForm" :model="ruleForm">
<el-form-item label="付款金额" label-width="80px" prop="montey"> <el-form-item label="付款金额" label-width="80px" prop="montey">
<el-input v-model="ruleForm.montey" placeholder="请输入金额" type="number" autocomplete="off"></el-input> <el-input v-model="ruleForm.montey" placeholder="请输入金额" type="number" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="付款方式" label-width="80px"> <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-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <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> <el-button type="primary" @click="sumbit('ruleForm')"> </el-button>
</div> </div>
</el-dialog> </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> </div>
</template> </template>
<script> <script>
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { tbShopPurveyorTransactInfo, paidAmount, dictDetail, tbShopPurveyorTransactSum } from '@/api/invoicing' import { tbShopPurveyorTransactInfo, paidAmount, dictDetail, tbShopPurveyorTransactSum, tbShopPurveyorTransacttransactPayInfos } from '@/api/invoicing'
export default { export default {
data() { data() {
return { return {
@ -209,9 +233,10 @@ export default {
label: '作废' label: '作废'
} }
], ],
ruleForm:{ ruleForm: {
montey: null, montey: null,
payType: null, payType: null,
remark: ""
}, },
selectCount: 0, selectCount: 0,
query: { query: {
@ -233,6 +258,18 @@ export default {
montey: [ montey: [
{ required: true, message: '请输入金额', trigger: 'blur' }, { required: true, message: '请输入金额', trigger: 'blur' },
], ],
},
typedialogshow: false,//
querytypedialogshow: {
type: '',
id: ''
},
tableDatatype: {
page: 0,
size: 10,
total: 0,
loading: false,
list: []
} }
} }
}, },
@ -244,19 +281,20 @@ export default {
this.dialogTableVisible = true this.dialogTableVisible = true
this.idinfo = id this.idinfo = id
}, },
sumbit(formName) { sumbit(formName) {
this.$refs[formName].validate( async (valid) => { this.$refs[formName].validate(async (valid) => {
if (valid) { if (valid) {
this.dialogTableVisible = false this.dialogTableVisible = false
const res = await paidAmount({ const res = await paidAmount({
id: this.idinfo, id: this.idinfo,
paidAmount: this.ruleForm.montey, paidAmount: this.ruleForm.montey,
payType: this.payType payType: this.payType,
}) remark: this.ruleForm.remark
this.$message({ type: 'success', message: '付款成功!' }); })
this.ruleForm.montey = '' this.$message({ type: 'success', message: '付款成功!' });
this.ruleForm.payType = '' this.ruleForm.montey = ''
this.getTableData() this.ruleForm.payType = ''
this.getTableData()
} else { } else {
return false; return false;
} }
@ -332,7 +370,40 @@ export default {
}, },
async tbShopPurveyorTransactSum() { async tbShopPurveyorTransactSum() {
this.info = await tbShopPurveyorTransactSum({ purveyorId: this.$route.query.purveyorId, type: this.query.type }) 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> </script>