oil-station/fuintAdmin_zt/src/views/Site/components/afterff.vue

242 lines
7.1 KiB
Vue
Raw Normal View History

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