<template>
|
<!-- 包容免罚告知承诺书-->
|
<el-main>
|
<el-form ref="form" label-width="130px" :model="form" :disabled="form.registerState == '1'">
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="姓名/名称">
|
<el-input v-model="form.litigant"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="身份证件号/信用代码" label-width="150px">
|
<el-input v-model="form.certNo"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="24">
|
<el-form-item label="地 址">
|
<el-input v-model="form.address"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="联系电话">
|
<el-input v-model="form.phone"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="违法时间">
|
<el-date-picker
|
v-model="form.illegalTime"
|
type="date"
|
value-format="yyyy-MM-dd"
|
placeholder="选择日期"
|
style="width: 100%"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="执法人员1">
|
<el-input v-model="form.officersOne"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="执法证号1">
|
<el-input v-model="form.numberOne"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="执法人员2">
|
<el-input v-model="form.officersTwo"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="执法证号2">
|
<el-input v-model="form.numberTwo"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-form-item label="检查的地点">
|
<el-input type="textarea" v-model="form.checkLocation"></el-input>
|
</el-form-item>
|
|
<el-form-item label="违法行为">
|
<el-input type="textarea" v-model="form.illegalAct"></el-input>
|
</el-form-item>
|
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="法律依据">
|
<el-autocomplete
|
v-model="form.legalBasis"
|
filterable
|
style="width: 100%"
|
:fetch-suggestions="querySearchHandle"
|
placeholder="请输入内容"
|
:trigger-on-focus="false"
|
@select="handleSelect"
|
>
|
</el-autocomplete>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="条">
|
<el-select v-model="form.tiao" filterable placeholder="请选择条" style="width: 100%">
|
<el-option
|
v-for="item in lawTiaoList"
|
:label="item.lawTiaoName"
|
:value="item.lawTiaoName"
|
>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="款">
|
<el-input v-model="form.kuan"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="项">
|
<el-input v-model="form.xiang"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-form-item label="处罚内容">
|
<el-input type="textarea" v-model="form.penaltyContent"></el-input>
|
</el-form-item>
|
<!-- <el-row :gutter="20">-->
|
<!-- <el-form-item label="整改方式:" label-width="140px">-->
|
<!-- <el-checkbox-group v-model="form.rectificationMethod">-->
|
<!-- <el-checkbox label="0" name="type">立即改正</el-checkbox>-->
|
<!-- <el-checkbox label="1" name="type">于-->
|
<!-- <el-date-picker-->
|
<!-- v-model="form.correctionTime"-->
|
<!-- type="date"-->
|
<!-- value-format="yyyy-MM-dd"-->
|
<!-- placeholder="选择日期"-->
|
<!-- style="width: 50% !important;"-->
|
<!-- >-->
|
<!-- </el-date-picker>-->
|
<!-- 前整改完毕-->
|
<!-- </el-checkbox>-->
|
<!-- </el-checkbox-group>-->
|
<!-- </el-form-item>-->
|
<!-- </el-row>-->
|
|
<el-form-item label="改正要求">
|
<el-input type="textarea" v-model="form.correctionRequest"></el-input>
|
</el-form-item>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="执法人员签字时间">
|
<el-date-picker
|
v-model="form.signatureTime"
|
type="date"
|
value-format="yyyy-MM-dd"
|
placeholder="选择日期"
|
style="width: 100%"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-form-item label="整改方式:" label-width="140px">
|
<el-radio v-model="form.rectificationMethod" label="0">立即改正</el-radio>
|
<el-radio v-model="form.rectificationMethod" label="1">于
|
<el-date-picker
|
v-model="form.correctionTime"
|
type="date"
|
value-format="yyyy-MM-dd"
|
placeholder="选择日期"
|
style="width: 60% !important"
|
>
|
</el-date-picker>
|
前整改完毕
|
</el-radio>
|
</el-form-item>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="执法局名称">
|
<el-input v-model="form.agencyName"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-form-item label="当事人承诺:" label-width="140px">
|
<el-checkbox-group v-model="form.commitments" @change="changenull">
|
<el-checkbox label="0" name="type"
|
>1.在
|
<el-date-picker
|
v-model="form.promiseTime"
|
type="date"
|
value-format="yyyy-MM-dd"
|
placeholder="选择日期"
|
style="width: 60% !important"
|
>
|
</el-date-picker>
|
前改正;
|
</el-checkbox>
|
<el-checkbox label="1" name="type">
|
2.遵守《
|
<el-input
|
v-model="form.law"
|
autocomplete="off"
|
style="width: 50% !important"
|
></el-input>
|
》法律法规规章的规定。
|
</el-checkbox>
|
</el-checkbox-group>
|
</el-form-item>
|
</el-row>
|
<!-- <el-row :gutter="20">-->
|
<!-- <el-col :span="12">-->
|
<!-- <el-form-item label="当事人签名">-->
|
<!-- <el-input v-model="form.partySignature"></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- </el-col>-->
|
<!-- <el-col :span="12">-->
|
<!-- <el-form-item label="当事人签字时间">-->
|
<!-- <el-date-picker-->
|
<!-- v-model="form.partySignatureTime"-->
|
<!-- type="date"-->
|
<!-- value-format="yyyy-MM-dd"-->
|
<!-- placeholder="选择日期"-->
|
<!-- style="width: 100%"-->
|
<!-- >-->
|
<!-- </el-date-picker>-->
|
<!-- </el-form-item>-->
|
<!-- </el-col>-->
|
<!-- </el-row>-->
|
<el-row :gutter="20">
|
<el-col :span="24">
|
<el-form-item label="备注">
|
<el-input v-model="form.remark" type="textarea"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<WordView :isShowYulan="showView" ref="wordInfo" @cancel="cancelWord"></WordView>
|
|
</el-form>
|
<div style="text-align: center;">
|
<el-button v-show="form.registerState != '1'" plain @click="dataFormSubmit('0')">保存</el-button>
|
<el-button v-show="form.registerState != '1'" type="warning" plain @click="dataFormSubmit('1')">定稿</el-button>
|
<el-button type="primary" plain @click="viewVord(form)">预览</el-button>
|
<el-button type="success" plain @click="downloadWord(form)">下载</el-button>
|
</div>
|
<WordView :isShowYulan="showView" ref="wordInfo" @cancel="cancelWord"></WordView>
|
</el-main>
|
</template>
|
|
<script>
|
import {getLaw, lawInfo} from '@/api/lawList/lawList';
|
import {getObj, saveObj} from '@/api/News/tolerance_exemption_notice'
|
import WordView from "@/views/News/word-view";
|
import moment from "moment";
|
|
export default {
|
name: "tolerance_exemption_notice",
|
props: ['isShowYulan', 'id', 'isFinish', 'processId', 'title'],
|
components: {
|
WordView
|
},
|
data() {
|
return {
|
form: {
|
litigant: '',
|
certNo: '',
|
address: '',
|
phone: '',
|
illegalTime: '',
|
officersOne: '',
|
numberOne: '',
|
officersTwo: '',
|
numberTwo: '',
|
checkLocation: '',
|
illegalAct: '',
|
legalBasis: '',
|
tiao: '',
|
kuan: '',
|
xiang: '',
|
penaltyContent: '',
|
correctionTime: '',
|
correctionRequest: '',
|
signatureTime: '',
|
agencyName: '',
|
partySignature: '',
|
partySignatureTime: '',
|
remark: '',
|
law: '',
|
registerState: '',
|
promiseTime: '',
|
rectificationMethod:'',
|
commitments: []
|
},
|
lawList: [],
|
lawTiaoList: [],
|
showView: false
|
}
|
},
|
created() {
|
this.getObj()
|
},
|
methods: {
|
getObj() {
|
getObj(this.id).then(res => {
|
if (res.data.code == 0) {
|
let v = res.data.data
|
for (let attr in v) {
|
if (v[attr] == null) {
|
v[attr] = ""
|
}
|
}
|
this.form = v
|
}
|
})
|
},
|
querySearchHandle(queryString, cb) { //模糊搜素
|
getLaw(queryString).then(res => {
|
this.lawList = []
|
let resultList = res.data.data
|
resultList.forEach(item => {
|
this.lawList.push({
|
value: item.name,
|
id: item.id
|
})
|
})
|
cb(this.lawList)
|
})
|
},
|
handleSelect(item) {
|
this.form.legalBasis = item.value
|
this.form.lawId = item.id
|
lawInfo(item.value).then(res => {
|
this.lawTiaoList = res.data.data
|
})
|
},
|
dataFormSubmit(type) { //提交or定稿
|
this.$refs['form'].validate((valid) => {
|
if (valid) {
|
if (type == '1') {
|
this.$confirm('保存为定稿将不能修改,是否继续?', '提示', {
|
confirmButtonText: '是',
|
cancelButtonText: '否',
|
type: 'warning'
|
}).then(() => {
|
this.form.registerState = type
|
this.form.registerId = this.id
|
this.form.processId = this.processId;
|
saveObj(this.form).then(res => {
|
this.$message.success('操作成功')
|
this.cancel()
|
})
|
})
|
} else {
|
this.form.registerState = type
|
this.form.registerId = this.id
|
this.form.processId = this.processId;
|
saveObj(this.form).then(res => {
|
this.$message.success('操作成功')
|
this.cancel()
|
})
|
}
|
}
|
})
|
},
|
changenull(val) {
|
console.log(val, 'val--==')
|
if (val.length == 0) {
|
this.form.promiseTime = '';
|
this.form.law = '';
|
} else if (val.length == 1) {
|
console.log(val[0], 'val[0]')
|
if (val[0] == '0') {
|
this.form.law = '';
|
} else if (val[0] == '1') {
|
this.form.promiseTime = '';
|
}
|
} else {
|
}
|
},
|
viewVord(data) {
|
if (data.registerState == null || data.registerState == "") {
|
//预览前先进行保存
|
data.registerState = '0';
|
data.registerId = this.id;
|
data.processId = this.processId;
|
saveObj(data).then((res) => {
|
})
|
}
|
//预览
|
let wordData = this.transforData(data);
|
this.showView = true;
|
this.$nextTick(() => {
|
this.$refs.wordInfo.init(wordData, "/wordes/tolerance_exemption_notice.docx");
|
})
|
},
|
downloadWord(data) {
|
if (data.registerState == null || data.registerState == "") {
|
//预览前先进行保存
|
data.registerState = '0';
|
data.registerId = this.id;
|
data.processId = this.processId;
|
saveObj(data).then((res) => {
|
})
|
}
|
//下载
|
let wordData = this.transforData(data);
|
WordView.methods.exportDoc(wordData, "/wordes/tolerance_exemption_notice.docx", this.title+'.docx');
|
},
|
cancelWord() {
|
this.showView = false;
|
},
|
cancel() {
|
this.$emit('cancel', false);
|
},
|
transforData(obj) {
|
let s = JSON.stringify(obj);
|
let data = JSON.parse(s);
|
|
let str = data.commitments;
|
if (str.indexOf("0") >= 0) {
|
data.zheng = false;
|
data.gai = true;
|
} else {
|
data.zheng = true;
|
data.gai = false;
|
}
|
|
if (str.indexOf("1") >= 0) {
|
data.zun = true;
|
data.shou = false;
|
} else {
|
data.zun = false;
|
data.shou = true;
|
}
|
|
let t = data.rectificationMethod;
|
if (t.indexOf("0") >= 0){
|
data.li = true;
|
data.ji = false;
|
}else {
|
data.li = false;
|
data.ji = true;
|
}
|
if (data.illegalTime != '' && data.illegalTime != null) {
|
data.illegalTime = moment(data.illegalTime).format('YYYY年MM月DD日');
|
} else {
|
data.illegalTime = ' 年 月 日'
|
}
|
if (data.correctionTime != '' && data.correctionTime != null) {
|
data.correctionTime = moment(data.correctionTime).format('YYYY年MM月DD日');
|
} else {
|
data.correctionTime = ' 年 月 日'
|
}
|
|
if (data.signatureTime != '' && data.signatureTime != null) {
|
data.signatureTime = moment(data.signatureTime).format('YYYY年MM月DD日');
|
} else {
|
data.signatureTime = ' 年 月 日'
|
}
|
if (data.partySignatureTime != '' && data.partySignatureTime != null) {
|
data.partySignatureTime = moment(data.partySignatureTime).format('YYYY年MM月DD日');
|
} else {
|
data.partySignatureTime = ' 年 月 日'
|
}
|
if (data.promiseTime != '' && data.promiseTime != null) {
|
data.promiseTime = moment(data.promiseTime).format('YYYY年MM月DD日');
|
} else {
|
data.promiseTime = ' 年 月 日'
|
}
|
|
return data;
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
|
</style>
|