242 lines
7.1 KiB
Vue
242 lines
7.1 KiB
Vue
<script>
|
||
import {
|
||
addAfterApi,
|
||
addYearApi,
|
||
getAfterListApi, getALlInfoBydeptIdApi,
|
||
getYearListApi,
|
||
updateAfterApi,
|
||
updateYearApi
|
||
} from "@/api/system/Site/compant";
|
||
|
||
export default {
|
||
name: "afterff",
|
||
data() {
|
||
return {
|
||
dialogVisible:false,
|
||
dialogVisible2:false,
|
||
tableData: [{
|
||
price:2000,
|
||
yprice:2500,
|
||
date: '2016-05-02',
|
||
name: '王小虎',
|
||
address: '上海市普陀区金沙江路 1518 弄',
|
||
status:'进行中',
|
||
upadate: '2016-05-02',
|
||
}, ],
|
||
form: {
|
||
deductionRate: '', // 扣点费率
|
||
likelyTransactionVolume: '0', // 已发生交易流量
|
||
serviceFeeStatistics: 0, // 系统服务费统计(这里假设为0,实际可能需要计算)
|
||
serviceFeeLimit: '', // 系统服务费限制
|
||
paymentAmount: '', // 收款金额
|
||
deptId:this.deptId,
|
||
},
|
||
sum:''
|
||
}
|
||
},
|
||
props: {
|
||
deptId: String
|
||
},
|
||
created() {
|
||
this.getList();
|
||
},
|
||
methods: {
|
||
getList() {
|
||
getAfterListApi({deptId : this.deptId}).then(res => {
|
||
this.tableData = res.data.records
|
||
})
|
||
},
|
||
getData() {
|
||
getALlInfoBydeptIdApi({deptId : this.deptId}).then(res => {
|
||
this.form.serviceFeeStatistics = res.data.payMoney;
|
||
this.form.likelyTransactionVolume = res.data.payMoney;
|
||
})
|
||
},
|
||
onSubmit() {
|
||
console.log('表单提交', this.form);
|
||
// 在这里添加提交表单的逻辑
|
||
if (this.form.id) {
|
||
updateAfterApi(this.form).then(res => {
|
||
this.getList();
|
||
this.dialogVisible = false;
|
||
this.dialogVisible2 = false;
|
||
})
|
||
}else {
|
||
addAfterApi(this.form).then(res => {
|
||
this.getList();
|
||
this.dialogVisible = false;
|
||
this.dialogVisible2 = false;
|
||
})
|
||
}
|
||
},
|
||
onCancel() {
|
||
console.log('取消操作');
|
||
// 在这里添加取消操作的逻辑
|
||
this.dialogVisible = false
|
||
this.dialogVisible2 = false
|
||
|
||
|
||
},
|
||
|
||
|
||
handleUpdate1(data){
|
||
this.dialogVisible = true
|
||
|
||
},
|
||
handleEdit(data){
|
||
this.form = data
|
||
|
||
this.dialogVisible = true
|
||
},
|
||
handleEditshoukuan(data){
|
||
this.form = data
|
||
this.dialogVisible2 = true
|
||
|
||
},
|
||
cl() {
|
||
this.form = {
|
||
deductionRate: '', // 扣点费率
|
||
likelyTransactionVolume: '100', // 已发生交易流量
|
||
serviceFeeStatistics: 0, // 系统服务费统计(这里假设为0,实际可能需要计算)
|
||
serviceFeeLimit: '', // 系统服务费限制
|
||
paymentAmount: '', // 收款金额
|
||
deptId:this.deptId,
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<template>
|
||
<div>
|
||
<el-table
|
||
:data="tableData"
|
||
border
|
||
style="width: 95%;margin-left: 55px ">
|
||
<el-table-column
|
||
prop="deductionRate"
|
||
align="center"
|
||
label="扣点税率(元)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="likelyTransactionVolume"
|
||
align="center"
|
||
label="易发生交易流量(元)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="serviceFeeStatistics"
|
||
align="center"
|
||
label="系统服务费统计">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="serviceFeeLimit"
|
||
align="center"
|
||
label="系统服务费限制(元)">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="paymentAmount"
|
||
align="center"
|
||
label="收款金额">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="status"
|
||
align="center"
|
||
label="状态">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.status == 0">未开始</span>
|
||
<span v-if="scope.row.status == 1">进行中</span>
|
||
<span v-if="scope.row.status == 2">已完成</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="createTime"
|
||
align="center"
|
||
label="创建时间">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="createName"
|
||
align="center"
|
||
label="创建人">
|
||
</el-table-column>
|
||
<el-table-column
|
||
align="center">
|
||
<template slot="header" slot-scope="scope">
|
||
<el-button
|
||
size="mini"
|
||
@click="handleUpdate1(scope.row)"
|
||
>新增</el-button>
|
||
</template>
|
||
<template slot-scope="scope">
|
||
<el-button
|
||
size="mini"
|
||
@click="handleEdit(scope.row)">修改</el-button>
|
||
<el-button
|
||
size="mini"
|
||
@click="handleEditshoukuan(scope.row)">收款</el-button>
|
||
</template>
|
||
|
||
</el-table-column>
|
||
</el-table>
|
||
<el-dialog
|
||
title="新增"
|
||
:visible.sync="dialogVisible"
|
||
width="30%">
|
||
<!-- 表头插入按钮 -->
|
||
<el-form :model="form" label-width="120px">
|
||
<el-form-item label="扣点费率">
|
||
<el-input v-model="form.deductionRate" placeholder="请输入扣点费率" suffix="%"></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="已发生交易流量">
|
||
<el-input v-model="form.likelyTransactionVolume" placeholder="请输入已发生交易流量" suffix="万元" readonly></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="系统服务费">
|
||
<el-input v-model="form.serviceFeeStatistics" placeholder="请输入系统服务费" suffix="万元" readonly></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="系统服务费限制">
|
||
<el-input v-model="form.serviceFeeLimit" placeholder="请输入系统服务费限制" suffix="万元"></el-input>
|
||
</el-form-item>
|
||
</el-form>
|
||
<div class="button-group">
|
||
<el-button type="danger" @click="onCancel">取消</el-button>
|
||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||
</div>
|
||
</el-dialog
|
||
>
|
||
|
||
<el-dialog
|
||
title="新增"
|
||
:visible.sync="dialogVisible2"
|
||
width="30%">
|
||
<el-form :model="form" label-width="120px">
|
||
<el-form-item label="扣点费率">
|
||
<!-- 假设扣点费率是固定的,这里仅显示 -->
|
||
<el-input v-model="form.deductionRate" placeholder="" readonly></el-input>
|
||
|
||
</el-form-item>
|
||
<el-form-item label="已发生交易流量">
|
||
<el-input v-model="form.likelyTransactionVolume" placeholder="" readonly></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="系统服务费统计">
|
||
<el-input v-model="form.serviceFeeStatistics" placeholder="" readonly></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="系统服务费限制">
|
||
<!-- 假设这是固定的,这里仅显示 -->
|
||
<el-input v-model="form.serviceFeeLimit" placeholder="" readonly></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="收款金额">
|
||
<el-input v-model="form.paymentAmount" placeholder="请输入收款金额"></el-input>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button type="primary" @click="onSubmit('form')">保存</el-button>
|
||
<el-button @click="onCancel('form')">取消</el-button>
|
||
</el-form-item>
|
||
</el-form>
|
||
</el-dialog>
|
||
|
||
</div>
|
||
</template>
|
||
|
||
<style scoped lang="scss">
|
||
|
||
</style>
|