|
|
@@ -1,301 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="submit">
|
|
|
- <div class="dialog-mask"></div>
|
|
|
- <div class="dialog-box">
|
|
|
- <div class="dialog-box__top">
|
|
|
- <h5 class="title bg__white">提交</h5>
|
|
|
- <span class="el-icon-close button button__close" @click="close_()"></span>
|
|
|
- </div>
|
|
|
- <div class="dialog-box__content">
|
|
|
- <div class="dialog-box__content_title clearfix">
|
|
|
- <div><span class="gray_font">审批处理人:</span><span class="black_font">{{lastAprOpinion.createdBy}}</span></div>
|
|
|
- <div><span class="gray_font">审批结论:</span><span class="black_font">{{lastAprOpinion.opinionResultCode}}</span></div>
|
|
|
- <div><span class="gray_font">否决原因:</span><span class="black_font">{{lastAprOpinion.rejectReasonCode}}</span></div>
|
|
|
- <div><span class="gray_font ">备注:</span><span class="black_font">{{lastAprOpinion.opinionTxt}}</span></div>
|
|
|
- <div><span class="gray_font">提交时间:</span><span class="black_font margin_right">{{lastAprOpinion.createdDate}}</span><span class="black_font">{{lastAprOpinion.createdDate}}</span></div>
|
|
|
- </div>
|
|
|
- <div class="product-content-title">
|
|
|
- <div>
|
|
|
- <span class="blue_boder"></span>审批结果
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-radio-group v-model="submitResults">
|
|
|
- <el-radio :label="0">同意</el-radio>
|
|
|
- <el-radio :label="1">否定</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </div>
|
|
|
- <div class="product-content-title_deny" v-show="submitResults">
|
|
|
- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="top" label-width="100px" class="demo-ruleForm" hide-required-asterisk>
|
|
|
- <el-form-item label="否定类型" prop="region" class="negation">
|
|
|
- <el-select class="form__select" v-model="ruleForm.region" placeholder="请选择" @change="changeValueB">
|
|
|
- <el-option v-for="item in patchClassCode"
|
|
|
- :key="item.configCode"
|
|
|
- :label="item.configTitle"
|
|
|
- :value="item.configCode">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="否决原因" prop="desc" class="cause">
|
|
|
- <el-select class="form__select" v-model="ruleForm.desc" placeholder="请选择" @change="getRejectReasonCode">
|
|
|
- <el-option v-for="item in patchClassCodeB"
|
|
|
- :key="item.configCode"
|
|
|
- :label="item.configTitle"
|
|
|
- :value="item.configCode">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <span class="blue_boder"></span>
|
|
|
- 备注
|
|
|
- </div>
|
|
|
- <textarea v-model="lastAprOpinion.opinionTxt" onkeyup="this.value = this.value.substring(0,200)"></textarea>
|
|
|
- </div>
|
|
|
- <el-button type="primary" @click="alert_submitB()">提交</el-button>
|
|
|
- </div>
|
|
|
- <!-- 提交否决弹窗 -->
|
|
|
- <submitB v-if="alertSubmitB" @clsoe_windowAlert='close_submitB' @close_AB='close_AB' :submitResults="submitResults" :submitOper="submitOper" :opinionTxt="lastAprOpinion.opinionTxt" :rejectReasonCode="rejectReasonCode"/>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-<script>
|
|
|
- // import submitB from "../submitB";
|
|
|
- // 提交否决弹窗import {aprAudApi} from "../../js/server.js";
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- lastAprOpinion: [],
|
|
|
- patchClassCode: [],
|
|
|
- patchClassCodeB: [],
|
|
|
- rejectReasonCode: [],
|
|
|
- valueA: '',
|
|
|
- valueB: '',
|
|
|
- indexNum: 0,
|
|
|
- submitResults: 0,
|
|
|
- alertSubmitB: false,
|
|
|
- submitOper: [],
|
|
|
- ruleForm: {
|
|
|
- region: '',
|
|
|
- desc: ''
|
|
|
- },
|
|
|
- rules: {
|
|
|
- region: [
|
|
|
- { required: true,
|
|
|
- message: '否定类型不能为空',
|
|
|
- trigger: 'change'
|
|
|
- }
|
|
|
- ],
|
|
|
- desc: [
|
|
|
- { required: true,
|
|
|
- message: '否决原因不能为空',
|
|
|
- trigger: 'change'
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- sendOpinionResultCode() {
|
|
|
- if (this.submitResults) {
|
|
|
- return 'D';
|
|
|
- } else {
|
|
|
- return 'P';
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getRejectReasonCode() {
|
|
|
- this.rejectReasonCode.splice(0, 1, this.ruleForm.desc);
|
|
|
- console.log(this.rejectReasonCode);
|
|
|
- },
|
|
|
- changeValueB() {
|
|
|
- this.ruleForm.desc = '';
|
|
|
- for (let i = 0; i < this.patchClassCode.length; i++) {
|
|
|
- if (this.patchClassCode[i].configCode === this.ruleForm.region) {
|
|
|
- this.indexNum = i;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- this.patchClassCodeB = this.patchClassCode[this.indexNum].childList;
|
|
|
- },
|
|
|
- getReason(data) {
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- this.$MyFetch.get(aprAudApi.taskDetail.OperationConfig, data)
|
|
|
- .then((data = {}) => {
|
|
|
- resolve(data);
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- getTreeValue() {
|
|
|
- var query = {
|
|
|
- configType: 'reject_reason'
|
|
|
- };
|
|
|
- this.getReason(query)
|
|
|
- .then((data) => {
|
|
|
- this.patchClassCode = data;
|
|
|
- console.log(this.patchClassCode, '联动数据');
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- submitdata() {
|
|
|
- let data = {
|
|
|
- "opinionResultCode": this.sendOpinionResultCode,
|
|
|
- "opinionTxt": this.lastAprOpinion.opinionTxt,
|
|
|
- "rejectReasonCode": this.rejectReasonCode
|
|
|
- };
|
|
|
- this.$MyFetch.post(`${aprAudApi.taskDetail.submitOper}/${this.$route.params.id}`, data)
|
|
|
- .then((data = {}) => {
|
|
|
- this.submitOper = data;
|
|
|
- console.log(this.submitOper, '一次提交成功');
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log('提交失败', err);
|
|
|
- });
|
|
|
- },
|
|
|
- close_AB() {
|
|
|
- this.close_();
|
|
|
- this.alertSubmitB = false;
|
|
|
- },
|
|
|
- close_() {
|
|
|
- this.$emit("clsoe_windowAlert");
|
|
|
- },
|
|
|
- alert_submitB() {
|
|
|
- if (this.submitResults) {
|
|
|
- this.$refs['ruleForm'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.submitdata();
|
|
|
- this.alertSubmitB = true;
|
|
|
- } else {
|
|
|
- console.log('error submit!!');
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
- // let data = {
|
|
|
- // "opinionResultCode": 'D',
|
|
|
- // "opinionTxt": this.lastAprOpinion.opinionTxt,
|
|
|
- // "rejectReasonCode": [this.lastAprOpinion.rejectReasonCode]
|
|
|
- // };
|
|
|
- // this.$MyFetch.post(`${aprAudApi.taskDetail.submitOper}/${this.$route.params.id}`, data)
|
|
|
- // .then((data = {}) => {
|
|
|
- // console.log(data, '提交表格数据');
|
|
|
- // })
|
|
|
- // .catch(err => {
|
|
|
- // console.log('提交失败', err.code);
|
|
|
- // });
|
|
|
- // this.$options.methods.close_();
|
|
|
- // } else {
|
|
|
- // this.submitdata();
|
|
|
- // let data = {
|
|
|
- // "opinionResultCode": 'P',
|
|
|
- // "opinionTxt": this.lastAprOpinion.opinionTxt,
|
|
|
- // "rejectReasonCode": [this.lastAprOpinion.rejectReasonCode]
|
|
|
- // };
|
|
|
- // this.$MyFetch.post(`${aprAudApi.taskDetail.submitOper}/${this.$route.params.id}`, data)
|
|
|
- // .then((data = {}) => {
|
|
|
- // console.log(data, '提交表格数据');
|
|
|
- // })
|
|
|
- // .catch(err => {
|
|
|
- // console.log('提交失败', err.code);
|
|
|
- // });
|
|
|
- this.alertSubmitB = true;
|
|
|
- }
|
|
|
- console.log(this.submitResults);
|
|
|
- },
|
|
|
- close_submitB() {
|
|
|
- this.alertSubmitB = false;
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.$MyFetch.get(`${aprAudApi.taskDetail.submitPage}/${this.$route.params.id}`)
|
|
|
- .then((data = {}) => {
|
|
|
- this.lastAprOpinion = data.lastAprOpinion;
|
|
|
- // console.log(data, '进来就有');
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
- this.getTreeValue();
|
|
|
- },
|
|
|
- components: {
|
|
|
- submitB
|
|
|
- }
|
|
|
- };
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="less" scoped>
|
|
|
-.submit{
|
|
|
- .dialog-box{
|
|
|
- font-size: 14px;
|
|
|
- line-height: 20px;
|
|
|
- width: 946px;
|
|
|
- height: 706px;
|
|
|
- .el-button {
|
|
|
- width: 200px;
|
|
|
- height: 40px;
|
|
|
- }
|
|
|
- .black_font{
|
|
|
- color: #151515;
|
|
|
- }
|
|
|
- .gray_font{
|
|
|
- color: #999999;
|
|
|
- }
|
|
|
- .dialog-box__top{
|
|
|
- box-shadow: 0 1px 6px 0 rgba(239,239,239,0.74);
|
|
|
- .title{
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- }
|
|
|
- .dialog-box__content{
|
|
|
- max-height: 470px;
|
|
|
- overflow: auto;
|
|
|
- margin: 30px;
|
|
|
- .dialog-box__content_title{
|
|
|
- border-bottom: 1px solid #E5E5E5;
|
|
|
- > div {
|
|
|
- float: left;
|
|
|
- margin: 0 80px 20px 0;
|
|
|
- .margin_right{
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .blue_boder{
|
|
|
- border: 1px solid #538BF1;
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
- .product-content-title{
|
|
|
- font-size: 14px;
|
|
|
- color: #333333;
|
|
|
- text-align: left;
|
|
|
- line-height: 50px;
|
|
|
- .product-content-title_deny{
|
|
|
- border: 1px solid #E9E9E9;
|
|
|
- box-shadow: 0 2px 6px 0 rgba(0,0,0,0.08);
|
|
|
- border-radius: 4px;
|
|
|
- padding: 10px;
|
|
|
- .negation{
|
|
|
- margin-right: 500px;
|
|
|
- }
|
|
|
- .cause{
|
|
|
- .form__select{
|
|
|
- width: 846px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- > textarea {
|
|
|
- border: 1px solid #E5E5E5;
|
|
|
- border-radius: 4px;
|
|
|
- resize: none;
|
|
|
- width: 850px;
|
|
|
- height: 102px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-</style>
|