<template>
|
<el-main>
|
<!--责令(限期)改正复查意见书-->
|
<el-form ref="form" :model="form" :disabled="form.registerState == '1'">
|
<el-form-item label="行政处罚决定书文号" :label-width="formLabelWidth">
|
<el-input
|
v-model="form.unitName"
|
placeholder="_______责改复查〔 〕第 号"
|
></el-input>
|
</el-form-item>
|
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="当事人姓名 " :label-width="formLabelWidth">
|
<el-input v-model="form.litigant" autocomplete="off"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="证件号/信用码 " :label-width="formLabelWidth">
|
<el-input v-model="form.certNo" autocomplete="off"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-form-item label="住址 " :label-width="formLabelWidth">
|
<el-input v-model="form.address" autocomplete="off"></el-input>
|
</el-form-item>
|
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="法人 " :label-width="formLabelWidth">
|
<el-input
|
v-model="form.legalPerson"
|
autocomplete="off"
|
></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label=" 联系电话 " :label-width="formLabelWidth">
|
<el-input v-model="form.phone" autocomplete="off"></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="通知时间" :label-width="formLabelWidth">
|
<el-date-picker
|
v-model="form.deliveryDate"
|
type="date"
|
:value-format="`yyyy-MM-dd`"
|
placeholder="选择日期"
|
style="width: 100%"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label=" 改正文号 " :label-width="formLabelWidth">
|
<el-input
|
v-model="form.documentUnitName"
|
placeholder="_______责改通〔 〕第 号"
|
></el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-form-item label=" 复查情况及意见 " :label-width="formLabelWidth">
|
<el-input
|
type="textarea"
|
v-model="form.reviewSituation"
|
autocomplete="off"
|
></el-input>
|
</el-form-item>
|
|
<el-form-item label="改进建议:" label-width="140px">
|
<el-checkbox-group v-model="form.suggestions">
|
<el-checkbox label="0" name="type"
|
>认真学习《
|
<el-input
|
v-model="form.law"
|
autocomplete="off"
|
style="width: 50% !important"
|
></el-input>
|
》等相关法律法规,依法经营合格产品。
|
</el-checkbox>
|
<el-checkbox label="1" name="type">
|
告知消费者科学、合理、正确使用合格产品。
|
</el-checkbox>
|
<el-checkbox
|
label="2"
|
name="type"
|
style="display: block !important"
|
>
|
树立诚信经营意识。
|
</el-checkbox>
|
</el-checkbox-group>
|
</el-form-item>
|
|
<!-- <el-row>-->
|
<!-- <el-col :span="12">-->
|
<!-- <el-form-item label="执法人1 " :label-width="formLabelWidth">-->
|
<!-- <el-input-->
|
<!-- v-model="form.officersOne"-->
|
<!-- autocomplete="off"-->
|
<!-- ></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- </el-col>-->
|
<!-- <el-col :span="12">-->
|
<!-- <el-form-item label=" 执法证号1 " :label-width="formLabelWidth">-->
|
<!-- <el-input v-model="form.numberOne" autocomplete="off"></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- </el-col>-->
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
<!-- <el-col :span="12">-->
|
<!-- <el-form-item label="执法人2 " :label-width="formLabelWidth">-->
|
<!-- <el-input-->
|
<!-- v-model="form.officersTwo"-->
|
<!-- autocomplete="off"-->
|
<!-- ></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- </el-col>-->
|
<!-- <el-col :span="12">-->
|
<!-- <el-form-item label=" 执法证号2 " :label-width="formLabelWidth">-->
|
<!-- <el-input v-model="form.numberTwo" autocomplete="off"></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- </el-col>-->
|
<!-- </el-row>-->
|
|
<el-row>
|
<!-- <el-col :span="12">-->
|
<!-- <el-form-item label="接收日期" :label-width="formLabelWidth">-->
|
<!-- <el-date-picker-->
|
<!-- v-model="form.receiptDate"-->
|
<!-- type="datetime"-->
|
<!-- :value-format="`yyyy-MM-dd HH:mm:ss`"-->
|
<!-- placeholder="选择日期"-->
|
<!-- style="width: 100%"-->
|
<!-- >-->
|
<!-- </el-date-picker>-->
|
<!-- </el-form-item>-->
|
<!-- </el-col>-->
|
<el-col :span="12">
|
<el-form-item label=" 印章日期 " :label-width="formLabelWidth">
|
<el-date-picker
|
v-model="form.executionTime"
|
type="date"
|
:value-format="`yyyy-MM-dd`"
|
placeholder="选择日期"
|
style="width: 100%"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<!-- <el-row>-->
|
<!-- <el-col :span="12">-->
|
<!-- <el-form-item label="当事人联系电话" :label-width="formLabelWidth">-->
|
<!-- <el-input v-model="form.litigantPhone" autocomplete="off"></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- </el-col>-->
|
<!-- </el-row>-->
|
<WordView ref="wordInfo" :isShowYulan="showView" @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>
|
</el-main>
|
</template>
|
|
<script>
|
import WordView from "@/views/News/word-view";
|
import {getObj, saveObj} from "@/api/News/reviewOpinion";
|
import moment from "moment";
|
|
export default {
|
name: "reviewOpinion",
|
props: ['isShowYulan', 'id', 'isFinish', 'processId', 'title'],
|
components: {
|
WordView
|
},
|
data() {
|
return {
|
showView: false,
|
form: {
|
unitName: "",
|
litigant: "",
|
certNo: "",
|
legalPerson: "",
|
phone: "",
|
deliveryDate: "",
|
documentUnitName: "",
|
reviewSituation: "",
|
suggestions: [],
|
law:'',
|
officersOne:'',
|
numberOne:'',
|
officersTwo:'',
|
numberTwo:'',
|
receiptDate:'',
|
executionTime:'',
|
litigantPhone:''
|
},
|
formLabelWidth: "140px",
|
};
|
},
|
created() {
|
this.init()
|
},
|
methods: {
|
init() {
|
/*getObj(this.id).then((res) => {
|
if (res.success) {
|
// 转换null为""
|
let v = res.result;
|
for (let attr in v) {
|
if (v[attr] == null) {
|
v[attr] = "";
|
}
|
}
|
let str = JSON.stringify(v);
|
let data = JSON.parse(str);
|
this.form = data;
|
}
|
});*/
|
this.getBiLu()
|
},
|
getBiLu() {
|
getObj(this.id).then(res => {
|
// this.form = res.data.data
|
// 转换null为""
|
let v = res.data.data
|
for (let attr in v) {
|
if (v[attr] == null) {
|
v[attr] = "";
|
}
|
}
|
// let str = JSON.stringify(v);
|
// console.log(str,'str========')
|
// let data = JSON.parse(str);
|
this.form = v;
|
})
|
},
|
dataFormSubmit(type) {
|
console.log(type)
|
this.$refs['form'].validate((valid) => {
|
if (valid) {
|
let obj = this;
|
if ("1" == type) {
|
this.$confirm('保存为定稿将不能修改,是否继续?', '提示', {
|
confirmButtonText: '是',
|
cancelButtonText: '否',
|
type: 'warning'
|
}).then(function () {
|
obj.form.registerState = type;
|
obj.form.registerId = obj.id;
|
obj.form.processId = obj.processId;
|
saveObj(obj.form).then((res) => {
|
// this.submitLoading = false;
|
obj.$message.success('操作成功');
|
obj.cancel();
|
})
|
})
|
} else {
|
obj.form.registerState = type;
|
obj.form.registerId = obj.id;
|
obj.form.processId = obj.processId;
|
saveObj(obj.form).then((res) => {
|
// this.submitLoading = false;
|
obj.$message.success("操作成功");
|
obj.cancel();
|
})
|
}
|
}
|
})
|
},
|
cancel() {
|
this.$emit('cancel', false);
|
},
|
cancelWord() {
|
this.showView = false;
|
},
|
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);
|
//↑↑↑↑↑↑以上部分根据具体业务修改↑↑↑↑↑↑
|
console.log(wordData, 'wordData=======')
|
this.showView = true;
|
this.$nextTick(() => {
|
this.$refs.wordInfo.init(wordData, "/wordes/reviewOpinion.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/reviewOpinion.docx", this.title+'.docx');
|
},
|
transforData(obj) {
|
let s = JSON.stringify(obj);
|
let data = JSON.parse(s);
|
|
let str = data.suggestions;
|
|
if (str.indexOf("0") >= 0) {
|
data.xi = false;
|
data.xue = true;
|
} else {
|
data.xi = true;
|
data.xue = false;
|
}
|
|
if (str.indexOf("1") >= 0) {
|
data.zhi = false;
|
data.gao = true;
|
} else {
|
data.zhi = true;
|
data.gao = false;
|
}
|
|
if (str.indexOf("2") >= 0) {
|
data.li = false;
|
data.shu = true
|
} else {
|
data.li = true;
|
data.shu = false;
|
}
|
|
if (data.deliveryDate != '' && data.deliveryDate != null) {
|
data.deliveryDate = moment(data.deliveryDate).format('YYYY年MM月DD日');
|
} else {
|
data.deliveryDate = ' 年 月 日'
|
}
|
|
if (data.executionTime != '' && data.executionTime != null) {
|
data.executionTime = moment(data.executionTime).format('YYYY年MM月DD日');
|
} else {
|
data.executionTime = ' 年 月 日'
|
}
|
|
if (data.receiptDate != '' && data.receiptDate != null) {
|
data.receiptDate = moment(data.receiptDate).format('YYYY年MM月DD日HH时mm分');
|
} else {
|
data.receiptDate = ' 年 月 日 时 分'
|
}
|
|
|
return data;
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
|
</style>
|