三涧溪党员积分
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<ai-list>
|
||||
<template slot="title">
|
||||
<ai-title title="积分维护" :isShowBottomBorder="false" :instance="instance" :isShowArea="false" v-model="areaId"
|
||||
@change="changeArea"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :is="tab.comp" v-if="currIndex === String(i)" :ref="tab.name"
|
||||
:areaId="areaId" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
<!-- -->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pointsDetails from "./pointsDetails.vue"
|
||||
import { mapState } from 'vuex'
|
||||
import scoreChange from "./scoreChange";
|
||||
|
||||
export default {
|
||||
name: 'AppScoreManage',
|
||||
label: "积分维护(三涧溪)",
|
||||
components: { pointsDetails, scoreChange},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
tabs() {
|
||||
return [
|
||||
{
|
||||
label: "积分明细",
|
||||
name: "pointsDetails",
|
||||
comp: pointsDetails,
|
||||
permission: "app_apppartyfee_statistics",
|
||||
},
|
||||
{
|
||||
label: "积分调整",
|
||||
name: "scoreChange",
|
||||
comp: scoreChange,
|
||||
permission: "",
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.areaId = this.user.info.areaId
|
||||
this.dict.load("integralCalcType")
|
||||
},
|
||||
methods: {
|
||||
changeArea() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs[this.tabs[Number(this.currIndex)].name][0].getList()
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: "pointsDetails",
|
||||
currIndex: '0',
|
||||
areaId: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
210
project/sanjianxi/apps/AppPartyScoreManage/pointsDetails.vue
Normal file
210
project/sanjianxi/apps/AppPartyScoreManage/pointsDetails.vue
Normal file
@@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<section class="pointsDetails">
|
||||
<ai-list isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template slot="left">
|
||||
<el-date-picker size="small" v-model="searchDotime" type="daterange" range-separator="至" @change="timeChange"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="search.partyName"
|
||||
class="search-input"
|
||||
size="small"
|
||||
placeholder="搜索党员"
|
||||
clearable
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, getList()"
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total" :dict="dict"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="integral" label="积分" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<span>{{ row.integralType == 1 ? '+' : '-' }}{{ row.integral }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" label="操作" align="center" fixed="right" width="120">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button
|
||||
type="text"
|
||||
title="详情"
|
||||
:disabled="!$permissions('app_appvillagerintegraldetail_detail')"
|
||||
@click="viewItem(row)">
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog title="详情" :visible.sync="dialog" :customFooter="true" :destroyOnClose="true" width="720px">
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="党员:" :value="dialogInfo.partyName" isLine/>
|
||||
<ai-info-item label="事件:" :value="dict.getLabel('partyIntegralDetailType',dialogInfo.type)" dict/>
|
||||
<ai-info-item label="类型:">
|
||||
{{ dialogInfo.partyIntegralDetailType == 1 ? '加分' : '减分' }}
|
||||
</ai-info-item>
|
||||
<ai-info-item label="分值:" :value="dialogInfo.integral" isLine/>
|
||||
<ai-info-item label="时间:" :value="dialogInfo.createTime" isLine/>
|
||||
</ai-wrapper>
|
||||
<div class="dialog-footer" slot="footer">
|
||||
<el-button @click="dialog=false">关闭</el-button>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "pointsDeclaration",
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
areaId: String
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
searchDotime: [],
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
partyName: '',
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
},
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{prop: "partyName", label: "对象", align: "center"},
|
||||
{prop: "remark", label: "调整说明", align: "center"},
|
||||
{prop: "createTime", label: "时间", align: "center"},
|
||||
{prop: "integralType", label: "类型", align: "center", render: (h, {row}) => h('span', `${row.integralType == 0 ? '减分' : '加分'}`)},
|
||||
{slot: "integral", label: "积分", align: "center",},
|
||||
{slot: "options", label: "操作", align: "center"},
|
||||
],
|
||||
tableData: [],
|
||||
dialog: false,
|
||||
dialogInfo: {},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$dict.load(["integralDeclareDoType","integralDetailType","partyIntegralDetailType"]).then(() => {
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/apppartyintegralinfo/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
timeChange() {
|
||||
if (this.searchDotime) {
|
||||
this.search.startTime = this.searchDotime[0]
|
||||
this.search.endTime = this.searchDotime[1]
|
||||
} else {
|
||||
this.search.startTime = null
|
||||
this.search.endTime = null
|
||||
}
|
||||
this.search.current = 1
|
||||
this.getList()
|
||||
},
|
||||
|
||||
viewItem(row) {
|
||||
this.dialog = true
|
||||
this.instance.post(`/app/apppartyintegralinfo/queryDetailById?id=${row.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.dialogInfo = res.data
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
onReset() {
|
||||
this.search.current = 1
|
||||
this.search.doTimeStart = null
|
||||
this.search.doTimeEnd = null
|
||||
this.search.familyName = ''
|
||||
this.searchDotime = []
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pointsDetails {
|
||||
height: 100%;
|
||||
background: #f3f6f9;
|
||||
overflow: auto;
|
||||
|
||||
.form_content {
|
||||
.form_flex {
|
||||
display: flex;
|
||||
|
||||
div {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.form_info {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.form_label {
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
vertical-align: top;
|
||||
width: 70px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.form_value {
|
||||
display: inline-block;
|
||||
color: #333;
|
||||
width: calc(100% - 70px);
|
||||
// img {
|
||||
// width: 100px;
|
||||
// height: 100px;
|
||||
// margin: 0 8px 8px 0;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
.form_div {
|
||||
padding-top: 24px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.status-0 {
|
||||
color: #FF4466;
|
||||
}
|
||||
|
||||
.status-1 {
|
||||
color: #2EA222;
|
||||
}
|
||||
|
||||
.status-2 {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
145
project/sanjianxi/apps/AppPartyScoreManage/scoreChange.vue
Normal file
145
project/sanjianxi/apps/AppPartyScoreManage/scoreChange.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div class="scoreChange">
|
||||
<ai-list isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template slot="left">
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="dialog=true"
|
||||
:disabled="!permissions('app_appvillagerintegraldetail_change')">添加
|
||||
</el-button>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="page.total" :dict="dict"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
@getList="getList">
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog
|
||||
title="添加积分调整"
|
||||
:visible.sync="dialog"
|
||||
:destroyOnClose="true"
|
||||
width="720px"
|
||||
@onConfirm="onConfirm"
|
||||
@closed="form={}">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="选择人员" prop="residentId">
|
||||
<ai-person-select :instance="instance" :customClicker="true"
|
||||
:url="'/app/appresident/list?areaId=' + user.info.areaId"
|
||||
:isMultiple="false" dialogTitle="选择" @selectPerson="selectPerson">
|
||||
<template name="option" v-slot:option="{ item }">
|
||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||
<ai-id mode="show" :show-eyes="false" :value="item.idNumber"/>
|
||||
</template>
|
||||
</ai-person-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="调整说明" prop="eventDesc">
|
||||
<el-input v-model.trim="form.eventDesc" placeholder="请输入..." type="textarea" :rows="4" show-word-limit
|
||||
maxlength="100"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="integralCalcType">
|
||||
<ai-select v-model="form.integralCalcType" :selectList="dict.getDict('integralCalcType')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="积分" prop="changeIntegral">
|
||||
<el-input v-model.trim.num ="form.changeIntegral" placeholder="请输入正数" size="small"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex"
|
||||
|
||||
export default {
|
||||
name: "scoreChange",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
areaId: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 10
|
||||
},
|
||||
form: {},
|
||||
dialog: false,
|
||||
personList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
rules() {
|
||||
return {
|
||||
residentId: [{required: true, message: '请选择人员', trigger: 'blur'},],
|
||||
eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'},],
|
||||
integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'},],
|
||||
changeIntegral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}],
|
||||
}
|
||||
},
|
||||
colConfigs() {
|
||||
return [
|
||||
{prop: "residentName", label: "姓名"},
|
||||
{prop: "eventDesc", label: "调整说明"},
|
||||
{prop: "integralCalcType", label: "类型", dict: "integralCalcType", align: 'center'},
|
||||
{prop: "changeIntegral", label: "积分", align: "center", render: (h, {row}) => h('p',{textAlign:'center'}, `${row.integralCalcType > 0 ? '+' : '-'}${row.changeIntegral}`)},
|
||||
{prop: "doTime", label: "操作时间"},
|
||||
{prop: "createUserName", label: "操作人", align: "center"},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectPerson(val) {
|
||||
if (val) {
|
||||
this.form.residentId = val.id
|
||||
this.personList = [{...val}]
|
||||
} else {
|
||||
this.form.residentId = ""
|
||||
this.personList = []
|
||||
}
|
||||
},
|
||||
onConfirm() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apppartyintegralinfo/changeIntegral`, this.form).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success("添加成功")
|
||||
this.dialog = false
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.instance.post(`/app/appvillagerintegraldetail/list`, null, {
|
||||
params: {...this.page, areaId: this.areaId, type: 0}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.scoreChange {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user