Merge branch 'wwz' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq
This commit is contained in:
commit
6c8e4d868a
|
|
@ -292,3 +292,11 @@ export function tbProductStocktakinGet(data) {
|
|||
}
|
||||
});
|
||||
}
|
||||
// 账单付款记录
|
||||
export function tbShopPurveyorTransacttransactPayInfos(params) {
|
||||
return request({
|
||||
url: `/api/tbShopPurveyorTransact/transactPayInfos`,
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -134,26 +133,51 @@
|
|||
<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>
|
||||
<!-- 付款弹窗组件 -->
|
||||
<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-item label="付款金额" label-width="80px" prop="montey">
|
||||
<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: []
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -244,19 +281,20 @@ export default {
|
|||
this.dialogTableVisible = true
|
||||
this.idinfo = id
|
||||
},
|
||||
sumbit(formName) {
|
||||
this.$refs[formName].validate( async (valid) => {
|
||||
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()
|
||||
const res = await paidAmount({
|
||||
id: this.idinfo,
|
||||
paidAmount: this.ruleForm.montey,
|
||||
payType: this.payType,
|
||||
remark: this.ruleForm.remark
|
||||
})
|
||||
this.$message({ type: 'success', message: '付款成功!' });
|
||||
this.ruleForm.montey = ''
|
||||
this.ruleForm.payType = ''
|
||||
this.getTableData()
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue