员工提成

This commit is contained in:
许允枞 2024-11-08 13:30:13 +08:00
parent 83b8aa1b75
commit c44da68d9c
3 changed files with 433 additions and 1 deletions

View File

@ -0,0 +1,18 @@
import request from '@/utils/request'
// 分页查询节点提成
export function getRoyaltyList(params) {
return request({
url: '/system/info/getRoyaltyList',
method: 'get',
params: params
})
}
// 分页查询节点提成总和
export function getRoyaltySum(params) {
return request({
url: '/system/info/getRoyaltySum',
method: 'get',
params: params
})
}

View File

@ -0,0 +1,414 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="员工名称" prop="dealUserName">
<el-input
v-model="queryParams.dealUserName"
placeholder="请输入员工名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="月份" prop="rescueStartMonth">
<el-date-picker
v-model="queryParams.rescueStartMonth"
value-format="yyyy-MM"
type="month"
placeholder="选择月份"
>
</el-date-picker>
</el-form-item>
<el-form-item label="检测时间" prop="maintenanceTime">
<el-date-picker
v-model="time1"
type="daterange"
value-format="yyyy-MM-dd"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div style="display: flex;justify-content:right;font-weight: bold;font-size: 16px">
<!-- <span>-->
<!-- 施救总金额{{ moneyManagementData.allMoney }} -->
<!-- </span>-->
<!-- <span style="margin-left: 3%">-->
<!-- 出车次数{{ moneyManagementData.allNum }} -->
<!-- </span>-->
<!-- <span style="margin-left: 3%">-->
<!-- 提成总金额{{ moneyManagementData.tcAll }} -->
<!-- </span>-->
<span style="margin-left: 3%">
提成总金额{{ moneyManagementData.royaltyAmountSum }}
</span>
</div>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<!-- <el-table-column label="序号" align="center">-->
<!-- <template scope="scope">-->
<!-- <span>{{ scope.$index + 1 }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="员工" align="center" prop="handlerName" />
<el-table-column label="提成" align="center" prop="royaltyAmount" />
<el-table-column label="项目完成时间" align="center" prop="node_create_time" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.node_create_time, '{y}-{m}-{d} {h}:{m}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { moneyManagement, moneyManagementData, exportManagement } from '@/api/rescue/info'
import { getmap } from '@/api/Map/map'
import {getRoyaltyList, getRoyaltySum} from "@/api/inspection/cw";
// import Map from '../../components/Map/index'
export default {
name: 'Info',
dicts: ['dljy_type', 'fee_type', 'car_type', 'yes_no', 'jy_status', 'jy_order_status'],
data() {
return {
//
exportLoading: false,
pickerOptions: null,
chooseDriverId: '',
rescueInfoId: '',
//
loading: true,
ztlist: [],
//
ids: [],
time1: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
infoList: [],
//
title: '',
//
open: false,
opens: false,
designateFlag: false,
zong: '',
repaymentForm: {},
repaymentOpen: false,
moneyManagementData: {},
//
queryParams: {
pageNo: 1,
pageSize: 10,
connectionName: null,
isAppointment: null,
rescueType: null,
feeType: null,
carBrand: null,
destinationInfo: null,
rescueStatus: null,
rescueAmount: null,
rescueStart: null
},
//
form: {},
driverList: [],
//
rules: {
connectionName: [
{ required: true, message: '联系人名称不能为空', trigger: 'blur' }
],
connectionPhone: [
{ required: true, message: '联系人手机号不能为空', trigger: 'blur' }
],
licenseNum: [
{ required: true, message: '车牌号不能为空', trigger: 'blur' }
],
isAppointment: [
{ required: true, message: '是否为预约单不能为空', trigger: 'change' }
],
rescueType: [
{ required: true, message: '救援类型 1拖车2送油3搭电4换台5扣车不能为空', trigger: 'change' }
],
carType: [
{ required: true, message: '车辆类型 大中小不能为空', trigger: 'change' }
],
rescuePosition: [
{ required: true, message: '救援地点 详细描述不能为空', trigger: 'blur' }
],
feeType: [
{ required: true, message: '收费类型不能为空', trigger: 'change' }
]
}
}
},
components: {
Map
},
created() {
this.getList()
},
methods: {
cancelRepayment() {
this.repaymentForm = {}
this.repaymentOpen = false
},
repaymentSubmit() {
this.$refs['repaymentForm'].validate(valid => {
if (valid) {
returnOrder(this.repaymentForm).then(res => {
this.$modal.msgSuccess('还款成功')
this.repaymentOpen = false
this.repaymentForm = {}
this.getList()
})
}
})
},
repayment(data) {
this.repaymentOpen = true
this.repaymentForm.rescueOrderId = data.rescueOrderId
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex % 2 === 0) {
return {
rowspan: 2,
colspan: 1
}
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
},
driverOk() {
this.designateFlag = false
designateDriver(this.rescueInfoId, this.chooseDriverId).then(res => {
this.$message.success('指派成功')
this.getList()
})
},
/** 查询道路救援模块列表 */
getList() {
this.loading = true
getRoyaltyList(this.queryParams).then(response => {
console.log("响应",response)
this.infoList = response.data.records
this.total = response.data.total
this.loading = false
})
getRoyaltySum(this.queryParams).then(response => {
this.moneyManagementData = response.data
})
},
getDriverList() {
getDriver().then(response => {
this.driverList = response.rows
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
connectionName: null,
connectionPhone: null,
licenseNum: null,
isAppointment: null,
rescueTime: null,
rescueType: null,
carType: null,
rescuePosition: null,
rescueLongitude: null,
rescueLatitude: null,
feeType: null,
carBrand: null,
destinationInfo: null,
destinationLongitude: null,
destinationLatitude: null,
rescueStatus: null,
driverId: null,
rescueAmount: null,
createTime: null,
createBy: null,
updateTime: null,
updateBy: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
if (this.time1 && this.time1.length > 0) {
this.queryParams.rescueStart = this.time1[0]
this.queryParams.rescueEnd = this.time1[1]
}
this.queryParams.pageNo = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.time1 = []
this.resetForm('queryForm')
this.queryParams = {}
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加道路救援模块'
},
pickDriver(row) {
},
designateDriver(row) {
this.designateFlag = true
this.rescueInfoId = row.id
this.getDriverList()
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data
this.open = true
this.title = '修改道路救援模块'
})
},
handleMap(row) {
this.rescueInfoId = row.id
routeInfo(row.id).then(res => {
this.ztlist = res.data
this.none(res.data)
})
getmap(row.id).then(res => {
let datas = []
res.data.forEach(it => {
let temp = [it.longitude, it.latitude]
datas.push(temp)
})
this.$refs.mapComponent.initMap(datas)
})
this.opens = true
},
none(arr) {
let sum = 0
for (var i = 0; i < arr.length; i++) {
sum += arr[i].distanceMeter
}
this.zong = sum
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInfo(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addInfo(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除道路救援模块编号为"' + ids + '"的数据项?').then(function() {
return delInfo(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
async handleExport() {
try {
this.exportLoading = true
this.queryParams.pageNo = 1
this.queryParams.pageSize = 500
this.$modal.msgError("系统故障,联系管理员")
// const data = await exportManagement(this.queryParams)
// this.$download.excel(data, `_${new Date().getTime()}.xlsx`)
} catch {
} finally {
this.exportLoading = false
}
}
}
}
</script>
<style scoped>
.lang-for {
width: 100%;
margin: 10px auto;
}
</style>

View File

@ -97,7 +97,7 @@
</el-col>
<div style="margin-left: 72%;font-weight: bold">
<span>
公示价格汇总{{ moneyData.goodsPriceSum / 100 }}
公示应收价格汇总{{ moneyData.goodsPriceSum / 100 }}
</span>
<span style="margin-left: 3%">
实付金额汇总{{ moneyData.payMoneySum / 100 }}