Commit dc95b98e authored by dingyoujian's avatar dingyoujian

处罚设置

parent 059b9b5a
<template>
<DefaultDialog :app='app'>
<el-form slot="form" ref="form" label-width="100px" >
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="处罚金额" ref="cfje" prop="cfje">
<el-input type='number' :readonly="readonly" v-model="singleItem.cfje" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="考核分数" ref="cffs" prop="cffs">
<el-input type='number' :readonly="readonly" v-model="singleItem.cffs" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
import {
doPunish
} from "@/api/threeViolations/enterTV.js"
export default {
props: {
app: {
type: Object,
default: {}
}
},
async mounted() {
this.singleItem=_.cloneDeep(this.app.singleItem)
},
data() {
return {
singleItem:{
cfje:'',
cffs:'',
},
}},
methods: {
save(){
let params={
id:this.singleItem.id,
cfje:this.singleItem.cfje,
cffs:this.singleItem.cffs,
}
doPunish(params).then(res=>{
if(res.success){
this.$success('提交成功')
this.app.$refs['TablePager'].reLoad()
this.app.$refs['TablePager'].clearSelected()
this.app.showDialog=false
}
})
}
}
}
</script>
<style scoped>
</style>
<template>
<div class="min_full">
<Cfsz :app='this' v-if="showDialog" ></Cfsz>
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
......@@ -52,6 +52,7 @@
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<el-button size='mini' @click="cfxxsz" type="primary">处罚</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
......@@ -77,6 +78,7 @@
} from '@/api/threeViolations/enterTV.js';
/* edit页面*/
import Edit from './edit'
import Cfsz from './cfsz'
import {
tableMixin
} from 'common'
......@@ -113,6 +115,7 @@
{label: "联系手机", prop: "phone", fieldType: "ftString",width:120},
{label: "违章日期", prop: "wzrq", fieldType: "ftDate"},
{label: "处罚金额", prop: "cfje", fieldType: "money"},
{label: "考核分数", prop: "cffs", fieldType: "ftFloat"},
{label: "违章行为", prop: "wzxw", fieldType: "ftString",width:260},
// {label: "备注", prop: "bz", fieldType: "ftString",width:300},
// {label: "维护人", prop: "whr", fieldType: "ftString"},
......@@ -153,6 +156,15 @@
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
cfxxsz(){
if (this.app.selectOne || this.app.clickOne) {
this.showDialog = true
} else {
this.$warning('请选中一行操作');
}
},
/* 初始化赋值操作*/
init() {
......@@ -182,7 +194,7 @@
},
components: {
Edit,
Edit,Cfsz
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment