From 9d3700026efff9a876c5eeccdadd07a4d5b62384 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 21 三月 2024 18:02:28 +0800
Subject: [PATCH] 核算
---
src/views/system/calculate/rule/index.vue | 6
src/views/system/calculate/record/index.vue | 434 +++++++++++++----------------------------------------
src/views/system/calculate/report/index.vue | 8
3 files changed, 112 insertions(+), 336 deletions(-)
diff --git a/src/views/system/calculate/record/index.vue b/src/views/system/calculate/record/index.vue
index 1c8e04b..3f07233 100644
--- a/src/views/system/calculate/record/index.vue
+++ b/src/views/system/calculate/record/index.vue
@@ -1,24 +1,20 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
- <el-form-item label="鏍哥畻瑙勫垯" prop="ruleName">
+ <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName">
<el-input
- v-model="queryParams.ruleName"
+ v-model="queryParams.rulesName"
placeholder="璇疯緭鍏ヨ鍒欏悕绉�"
clearable
- @clear="handleQuery"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鍒涘缓鏃堕棿" prop="createTime">
- <el-date-picker
- v-model="daterangeCreateTime"
- style="width: 240px"
- value-format="yyyy-MM-dd HH:mm:ss"
- type="daterange"
- range-separator="-"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
+ <el-form-item label="鍚堝悓鍚嶇О" prop="contractName">
+ <el-input
+ v-model="queryParams.contractName"
+ placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"
+ clearable
+ @keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
@@ -30,135 +26,58 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
- type="success"
+ type="warning"
plain
- icon="el-icon-edit"
+ icon="el-icon-download"
size="mini"
- :disabled="single"
- @click="handleUpdate"
- >淇敼</el-button>
+ @click="handleExport"
+ >瀵煎嚭
+ </el-button>
</el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- >鍒犻櫎</el-button>
- </el-col>
-<!-- <el-col :span="1.5">-->
-<!-- <el-button-->
-<!-- type="warning"-->
-<!-- plain-->
-<!-- icon="el-icon-download"-->
-<!-- size="mini"-->
-<!-- @click="handleExport"-->
-<!-- v-hasPermi="['system:checkRule:export']"-->
-<!-- >瀵煎嚭</el-button>-->
-<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
- <el-table v-loading="loading" :data="checkRuleList" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="鏍哥畻瑙勫垯" align="center" prop="ruleName" />
- <el-table-column label="鏍哥畻瀵硅薄" align="center" prop="category">
- <template slot-scope="scope">
- <div v-if="scope.row.category === 1">瑙嗛鐩戞帶</div>
- <div v-else-if="scope.row.category === 2">杞﹁締璇嗗埆</div>
- <div v-else-if="scope.row.category === 3">浜鸿劯璇嗗埆</div>
+ <el-table v-loading="loading" :data="rulesList" @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="55" align="center"/>
+ <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="rulesName"/>
+ <el-table-column label="鍚堝悓鍚嶇О" align="center" prop="contractName"/>
+ <el-table-column label="閲戦(鍏�)" align="center" prop="amount"/>
+ <el-table-column label="鏁伴噺" align="center" prop="num">
+ 100
+ </el-table-column>
+ <el-table-column label="鍚堣(鍏�)" align="center" prop="money">
+ <template slot-scope="scope" >
+ {{scope.row.amount*100}}
</template>
</el-table-column>
- <el-table-column label="鍚堝悓鍚�" align="center" prop="ruleDetail" />
- <el-table-column label="閲戦" align="center" prop="ruleDetail" />
- <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" />
+ <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180">
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+ </template>
+ </el-table-column>
+ </el-table>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-s-check"
- @click="handleAudit(scope.row)"
- v-hasPermi="['check:rule:audit']"
- >瀹℃牳</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- >淇敼</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- >鍒犻櫎</el-button>
- </template>
- </el-table-column>
- </el-table>
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ />
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <div>
- <!-- 娣诲姞鎴栦慨鏀硅�冩牳瑙勫垯瀵硅瘽妗� -->
- <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+ <!-- 娣诲姞鎴栦慨鏀规牳绠楄鍒欏璇濇 -->
+ <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName">
- <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" />
+ <el-form-item label="瑙勫垯鍚嶇О" prop="rulesName">
+ <el-input v-model="form.rulesName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�"/>
</el-form-item>
- <el-form-item label="瑙勫垯绫诲瀷" prop="category">
- <el-select v-model="form.category" placeholder="瑙勫垯绫诲瀷">
- <el-option
- v-for="item in categoryList"
- :key="item.id"
- :label="item.value"
- :value="item.id">
- </el-option>
- </el-select>
+ <el-form-item label="鍚堝悓鍚嶇О" prop="contractName">
+ <el-input v-model="form.contractName" placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"/>
</el-form-item>
- <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail">
- <el-input v-model="form.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/>
+ <el-form-item label="閲戦" prop="amount">
+ <el-input v-model="form.amount" placeholder="璇疯緭鍏ラ噾棰�"/>
</el-form-item>
- <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail">
- <div class="row-warp">
- <div class="row">
- <div class="row-left">鍙傛暟鍚�</div>
- <div class="row-right">鏉′欢</div>
- </div>
- <div class="row">
- <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div>
- <div class="row-right">
- <div>涓嶅皯浜�</div>
- <div>
- <el-input class="input-w" type="number" v-model="form.videoPointNum"/>{{" %"}}
- </div>
- </div>
- </div>
- <div class="row">
- <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div>
- <div class="row-right">
- <div>涓嶅皯浜�</div>
- <div><el-input class="input-w" type="number" v-model="form.vehicleCheckpointNum"/></div>{{" %"}}
- </div>
- </div>
- <div class="row">
- <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div>
- <div class="row-right">
- <div>涓嶅皯浜�</div>
- <div>
- <el-input class="input-w" type="number" v-model="form.faceChceckpointNum" /></div>{{" %"}}
- </div>
- </div>
- </div>
- </el-form-item>
+
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -166,85 +85,16 @@
</div>
</el-dialog>
</div>
-
- <!-- 瀹℃牳鑰冩牳瑙勫垯瀵硅瘽妗� -->
- <el-dialog :title="title" :visible.sync="auditOpen" width="600px" append-to-body>
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName">
- <el-input v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/>
- </el-form-item>
- <el-form-item label="瑙勫垯绫诲瀷" prop="category">
- <el-select v-model="form.category" placeholder="瑙勫垯绫诲瀷" disabled>
- <el-option
- v-for="item in categoryList"
- :key="item.id"
- :label="item.value"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail">
- <el-input v-model="form.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" disabled/>
- </el-form-item>
- <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail" disabled>
- <div class="row-warp">
- <div class="row">
- <div class="row-left">鍙傛暟鍚�</div>
- <div class="row-right">鏉′欢</div>
- </div>
- <div class="row">
- <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div>
- <div class="row-right">
- <div>涓嶅皯浜�</div>
- <div>
- <el-input class="input-w" type="number" v-model="form.videoPointNum" disabled/>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div>
- <div class="row-right">
- <div>涓嶅皯浜�</div>
- <div><el-input class="input-w" type="number" v-model="form.vehicleCheckpointNum" disabled/></div>
- </div>
- </div>
- <div class="row">
- <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div>
- <div class="row-right">
- <div>涓嶅皯浜�</div>
- <div>
- <el-input class="input-w" type="number" v-model="form.faceChceckpointNum" disabled/></div>
- </div>
- </div>
- </div>
- </el-form-item>
- <el-form-item label="瀹℃牳缁撴灉" prop="auditState" >
- <el-radio-group v-model="form.auditState">
- <el-radio :label="1">閫氳繃</el-radio>
- <el-radio :label="2">椹冲洖</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="瀹℃牳璇存槑" prop="auditDescription" >
- <el-input v-model="form.auditDescription" type="textarea" show-word-limit maxlength="100" />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
- <el-button @click="cancel">鍙� 娑�</el-button>
- </div>
- </el-dialog>
-
- </div>
</template>
<script>
-import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule";
+import { listRules, getRules, delRules, addRules, updateRules } from '@/api/platform/rules'
export default {
- name: "CheckRule",
- dicts: ['platform_audit_state'],
+ name: 'Rules',
data() {
return {
+ num: 100,
// 閬僵灞�
loading: true,
// 閫変腑鏁扮粍
@@ -257,194 +107,126 @@
showSearch: true,
// 鎬绘潯鏁�
total: 0,
- // 杩愮淮绫诲瀷
- categoryList: [
- { id: 1, value: '瑙嗛鐩戞帶' },
- { id: 2, value: '杞﹁締璇嗗埆' },
- { id: 3, value: '浜鸿劯璇嗗埆' },
- ],
- // 鑰冩牳瑙勫垯琛ㄦ牸鏁版嵁
- checkRuleList: [],
- daterangeCreateTime: [],
+ // 鏍哥畻瑙勫垯琛ㄦ牸鏁版嵁
+ rulesList: [],
// 寮瑰嚭灞傛爣棰�
- title: "",
+ title: '',
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
- // 鏄惁鏄剧ず寮瑰嚭灞�
- auditOpen: false,
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
pageSize: 10,
- ruleName: null,
- createTime: null,
+ rulesName: null,
+ contractName: null,
+ deleted: null
},
// 琛ㄥ崟鍙傛暟
form: {},
// 琛ㄥ崟鏍¢獙
- rules: {
- ruleName: [
- { required: true, message: "瑙勫垯鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
- ],
- }
- };
+ rules: {}
+ }
},
created() {
- this.getList();
+ this.getList()
},
methods: {
- /** 鏌ヨ鑰冩牳瑙勫垯鍒楄〃 */
+ /** 鏌ヨ鏍哥畻瑙勫垯鍒楄〃 */
getList() {
- this.loading = true;
- if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
- this.queryParams["start"] = this.daterangeCreateTime[0];
- this.queryParams["end"] = this.daterangeCreateTime[1];
- }
- listCheckRule(this.queryParams).then(response => {
- this.checkRuleList = response.data;
- this.total = response.total;
- this.loading = false;
- });
+ this.loading = true
+ listRules(this.queryParams).then(response => {
+ this.rulesList = response.rows
+ this.total = response.total
+ this.loading = false
+ })
},
// 鍙栨秷鎸夐挳
cancel() {
- this.open = false;
- this.auditOpen = false;
- this.reset();
+ this.open = false
+ this.reset()
},
// 琛ㄥ崟閲嶇疆
reset() {
this.form = {
id: null,
- ruleName: null,
- ruleDetail: null,
- videoPointNum: null,
- vehicleCheckpointNum: null,
- faceChceckpointNum: null,
+ rulesName: null,
+ contractName: null,
+ amount: null,
createTime: null,
updateTime: null,
deleted: null
- };
- this.resetForm("form");
+ }
+ this.resetForm('form')
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
+ this.queryParams.pageNum = 1
+ this.getList()
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
- this.resetForm("queryForm");
- this.handleQuery();
+ this.resetForm('queryForm')
+ this.handleQuery()
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
- this.single = selection.length!==1
+ this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
- this.reset();
- this.open = true;
- this.title = "娣诲姞鑰冩牳瑙勫垯";
+ this.reset()
+ this.open = true
+ this.title = '娣诲姞鏍哥畻瑙勫垯'
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
- this.reset();
+ this.reset()
const id = row.id || this.ids
- getCheckRule(id).then(response => {
- this.form = response.data;
- this.open = true;
- this.title = "淇敼鑰冩牳瑙勫垯";
-
- });
- },
- /** 瀹℃牳鎸夐挳鎿嶄綔 */
- handleAudit(row) {
- this.reset();
- const id = row.id || this.ids
- getCheckRule(id).then(response => {
- this.form = response.data;
- this.auditOpen = true;
- this.title = "瀹℃牳鑰冩牳瑙勫垯";
- });
+ getRules(id).then(response => {
+ this.form = response.data
+ this.open = true
+ this.title = '淇敼鏍哥畻瑙勫垯'
+ })
},
/** 鎻愪氦鎸夐挳 */
submitForm() {
- this.$refs["form"].validate(valid => {
+ this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id != null) {
- updateCheckRule(this.form).then(response => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.auditOpen = false;
- this.getList();
- });
+ updateRules(this.form).then(response => {
+ this.$modal.msgSuccess('淇敼鎴愬姛')
+ this.open = false
+ this.getList()
+ })
} else {
- addCheckRule(this.form).then(response => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.auditOpen = false;
- this.getList();
- });
+ addRules(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 delCheckRule(ids);
+ const ids = row.id || this.ids
+ this.$modal.confirm('鏄惁纭鍒犻櫎鏍哥畻瑙勫垯缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() {
+ return delRules(ids)
}).then(() => {
- this.getList();
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.getList()
+ this.$modal.msgSuccess('鍒犻櫎鎴愬姛')
+ }).catch(() => {
+ })
},
-
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
- this.download('system/checkRule/export', {
+ this.download('platform/rules/export', {
...this.queryParams
- }, `checkRule_${new Date().getTime()}.xlsx`)
+ }, `rules_${new Date().getTime()}.xlsx`)
}
}
-};
+}
</script>
-
-<style scoped>
-.input-w {
- margin-left: 5px;
- width: 70px;
-}
-.row-warp {
- display: flex;
- flex-direction: column;
- justify-content: center;
- text-align: center;
- border: solid 1px gray;
- /*padding: 3px;*/
-}
-.row {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- border-bottom: solid 1px gray;
- padding: 3px;
-}
-.row:last-of-type {
- border-bottom: none;
-}
-.row-left {
- flex: 2;
- border-right: solid 1px gray;
-}
-.row-right {
- flex: 4;
- display: flex;
- flex-direction: row;
- justify-content: center;
-}
-</style>
diff --git a/src/views/system/calculate/report/index.vue b/src/views/system/calculate/report/index.vue
index 1bda10d..ba3f141 100644
--- a/src/views/system/calculate/report/index.vue
+++ b/src/views/system/calculate/report/index.vue
@@ -192,22 +192,22 @@
},
tableData: [{
- name: '鎷嗛櫎鐐逛綅',
+ name: '瀛樺偍鏁呴殰',
amount: '100',
money: '100',
total: '10000'
}, {
- name: '杩炵画涓ゅぉ',
+ name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�',
amount: '100',
money: '100.45',
total: '10045'
}, {
- name: '闂撮殧涓夊ぉ',
+ name: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�',
amount: '100',
money: '100',
total: '10000'
}, {
- name: '杩愯鐜�(96%)',
+ name: '瑙嗛杩愯鐜�(96%)',
amount: '100',
money: '100.45',
total: '10045'
diff --git a/src/views/system/calculate/rule/index.vue b/src/views/system/calculate/rule/index.vue
index ccc20e1..c362c97 100644
--- a/src/views/system/calculate/rule/index.vue
+++ b/src/views/system/calculate/rule/index.vue
@@ -39,7 +39,6 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
- v-hasPermi="['platform:rules:add']"
>鏂板
</el-button>
</el-col>
@@ -51,7 +50,6 @@
size="mini"
:disabled="single"
@click="handleUpdate"
- v-hasPermi="['platform:rules:edit']"
>淇敼
</el-button>
</el-col>
@@ -63,7 +61,6 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
- v-hasPermi="['platform:rules:remove']"
>鍒犻櫎
</el-button>
</el-col>
@@ -74,7 +71,6 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
- v-hasPermi="['platform:rules:export']"
>瀵煎嚭
</el-button>
</el-col>
@@ -98,7 +94,6 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
- v-hasPermi="['platform:rules:edit']"
>淇敼
</el-button>
<el-button
@@ -106,7 +101,6 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
- v-hasPermi="['platform:rules:remove']"
>鍒犻櫎
</el-button>
</template>
--
Gitblit v1.8.0