9d31b656 by xiaomiao

--no commit message

1 parent a036215b
...@@ -140,3 +140,16 @@ export function getZtQlxx (params) { ...@@ -140,3 +140,16 @@ export function getZtQlxx (params) {
140 data 140 data
141 }) 141 })
142 } 142 }
143 /**
144 * @description: 添加审核意见
145 * @param {*} data
146 * @author: renchao
147 */
148 export function getShList (data) {
149 console.log(data);
150 return request({
151 url: SERVER.SERVERAPI + '/rest/djbRepair/getShList?bsmRepair='+data.bsmRepair,
152 method: 'post',
153 data
154 })
155 }
......
...@@ -536,6 +536,7 @@ export default { ...@@ -536,6 +536,7 @@ export default {
536 }); 536 });
537 this.$store.dispatch("user/refreshPage", true); 537 this.$store.dispatch("user/refreshPage", true);
538 } else { 538 } else {
539
539 this.$message({ 540 this.$message({
540 showClose: true, 541 showClose: true,
541 message: res.message, 542 message: res.message,
......
...@@ -6,67 +6,85 @@ ...@@ -6,67 +6,85 @@
6 <template> 6 <template>
7 <div class="spyj loadingtext"> 7 <div class="spyj loadingtext">
8 <div class="box"> 8 <div class="box">
9 <b class="spyj_title">审批表</b> 9 <div class="spyj_title">
10 <div class="leftadd">
11 <i
12 class="el-icon-plus pointer"
13 @click="addClick()"
14 ></i>
15 </div>
16 <div class="righttitle">审批表</div>
17 </div>
18
10 <div v-for="(item, index) in tableData" :key="index"> 19 <div v-for="(item, index) in tableData" :key="index">
11 <el-form :model="tableData[index]" label-width="120px" :rules="rules" :ref="'ruleFormRef'+index"> 20 <el-form
12 <div class="spyj_form" > 21 :model="tableData[index]"
13 <div class="item_left">{{ item.jdmc }}意见</div> 22 label-width="120px"
14 <div class="item_right"> 23 :rules="rules"
15 <el-row> 24 :ref="'ruleFormRef' + index"
16 <el-col :span="24"> 25 >
17 <el-form-item 26 <div class="spyj_form">
18 label-width="0" 27 <div class="item_left">
19 class="opinion_item" 28 <div class="left">
20 prop="shyj" 29 <i
21 > 30 class="el-icon-minus pointer"
22 <el-input 31 @click="deleClick()"
23 type="textarea" 32 ></i>
24 :rows="4" 33 </div>
25 class="opinion" 34 <div class="right">{{ item.jdmc }}意见</div>
26 placeholder="请输入审批意见" 35 </div>
27 v-model="item.shyj" 36 <div class="item_right">
28 ></el-input> 37 <el-row>
29 </el-form-item> 38 <el-col :span="24">
30 </el-col> 39 <el-form-item
31 </el-row> 40 label-width="0"
32 <el-row> 41 class="opinion_item"
33 <el-col :span="16"> 42 prop="shyj"
34 <el-form-item
35 label="审查人"
36 prop="shryxm"
37 >
38 <el-input v-model="item.shryxm"></el-input>
39 </el-form-item>
40 </el-col>
41 <el-col :span="8">
42 <el-form-item
43 label="审核时间"
44 prop="shsj"
45 >
46 <el-date-picker
47 v-model="item.shsj"
48 type="date"
49 placeholder="选择日期"
50 value-format="yyyy/MM/dd HH:mm:ss"
51 format="yyyy/MM/dd"
52 > 43 >
53 </el-date-picker> 44 <el-input
54 </el-form-item> 45 type="textarea"
55 </el-col> 46 :rows="4"
56 </el-row> 47 class="opinion"
48 placeholder="请输入审批意见"
49 v-model="item.shyj"
50 ></el-input>
51 </el-form-item>
52 </el-col>
53 </el-row>
54 <el-row>
55 <el-col :span="16">
56 <el-form-item label="审查人" prop="shryxm">
57 <el-input v-model="item.shryxm"></el-input>
58 </el-form-item>
59 </el-col>
60 <el-col :span="8">
61 <el-form-item label="审核时间" prop="shjssj">
62 <el-date-picker
63 v-model="item.shjssj"
64 type="date"
65 placeholder="选择日期"
66 value-format="yyyy/MM/dd HH:mm:ss"
67 format="yyyy/MM/dd"
68 >
69 </el-date-picker>
70 </el-form-item>
71 </el-col>
72 </el-row>
73 </div>
57 </div> 74 </div>
58 </div> 75 </el-form>
59 </el-form> 76 </div>
77 <div class="submit_button" v-if="!$route.query.viewtype">
78 <el-button type="primary" @click="onSubmit('ruleFormRef')"
79 >保存</el-button
80 >
60 </div> 81 </div>
61 <div class="submit_button" v-if="!$route.query.viewtype">
62 <el-button type="primary" @click="onSubmit('ruleFormRef')">保存</el-button>
63 </div>
64 </div> 82 </div>
65 <!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> --> 83 <!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> -->
66 </div> 84 </div>
67 </template> 85 </template>
68 <script> 86 <script>
69 import { addidea } from "@/api/djbbl.js"; 87 import { addidea, getShList } from "@/api/djbbl.js";
70 import { mapGetters } from "vuex"; 88 import { mapGetters } from "vuex";
71 export default { 89 export default {
72 computed: { 90 computed: {
...@@ -76,44 +94,85 @@ export default { ...@@ -76,44 +94,85 @@ export default {
76 return { 94 return {
77 isNoData: false, 95 isNoData: false,
78 ableOperation: true, 96 ableOperation: true,
79 97 tableData: [{ jdmc: "初审" }],
80 tableData: [{ jdmc: "初审" }, { jdmc: "复审" }, { jdmc: "核定" }],
81
82 rules: { 98 rules: {
83 shyj: [{ required: true, message: "请填写意见", trigger: "blur" }], 99 shyj: [{ required: true, message: "请填写意见", trigger: "blur" }],
84 shryxm: [{ required: true, message: "审查人", trigger: "blur" }], 100 shryxm: [{ required: true, message: "审查人", trigger: "blur" }],
85 shsj: [{ required: true, message: "审核时间", trigger: "blur" }], 101 shjssj: [{ required: true, message: "审核时间", trigger: "blur" }],
86 }, 102 },
87 }; 103 };
88 }, 104 },
89 105
90 watch: {}, 106 watch: {},
91 created() {}, 107 created() {},
92 mounted() {}, 108 mounted() {
109 this.getShList();
110 },
93 methods: { 111 methods: {
112 deleClick(){
113 console.log("111 ");
114 if(this.tableData.length<=1){
115 console.log("w222");
116 this.$message.error("最少填写一条初审意见");
117 }else if(this.tableData.length>=2){
118 console.log("3333");
119 this.tableData=this.tableData.slice(0,-1)
120 }
121
122 },
123 addClick(){
124 if(this.tableData.length==1){
125 this.tableData.push({ jdmc: "复审" })
126 }else if(this.tableData.length==2){
127 this.tableData.push({ jdmc: "核定" })
128 }else{
129 this.$message.error("只允许添加三条意见");
130 }
131
132
133 },
134
135
136
137 getShList() {
138 this.$startLoading();
139 var formdata = {
140 bsmRepair: this.$parent.bsmRepair,
141 };
142 getShList(formdata).then((res) => {
143 this.$endLoading();
144 if (res.code === 200 && res.result) {
145 if (res.result.length) {
146 this.tableData = res.result;
147 }
148
149 // this.ruleForm = res.result[res.result.length - 1]
150 }
151 });
152 },
94 onSubmit(formName) { 153 onSubmit(formName) {
95 const falg = [] 154 const falg = [];
96 for (let index = 0; index < this.tableData.length; index++) { 155 for (let index = 0; index < this.tableData.length; index++) {
97 this.$refs[formName + index][0].validate((valid) => { 156 this.$refs[formName + index][0].validate((valid) => {
98 if (valid) { 157 if (valid) {
99 falg.push(1) 158 falg.push(1);
100 } 159 }
101 }); 160 });
102 } 161 }
103 if (falg.length == this.tableData.length) { 162 if (falg.length == this.tableData.length) {
104 this.tableData.forEach((item, index) => { 163 this.tableData.forEach((item, index) => {
105 item["bsmBusiness"] = this.$parent.bsmRepair; 164 item["bsmBusiness"] = this.$parent.bsmRepair;
106 }), 165 }),
107 addidea(this.tableData).then((res) => { 166 addidea(this.tableData).then((res) => {
108 if (res.code === 200) { 167 if (res.code === 200) {
109 this.$message.success("保存成功"); 168 this.$message.success("保存成功");
110 this.refresh += 1; 169 this.refresh += 1;
111 } else { 170 } else {
112 this.$message.error(res.message); 171 this.$message.error(res.message);
113 } 172 }
114 }); 173 });
115 } else { 174 } else {
116 return false; 175 return false;
117 } 176 }
118 }, 177 },
119 // onSubmit() { 178 // onSubmit() {
...@@ -154,18 +213,37 @@ export default { ...@@ -154,18 +213,37 @@ export default {
154 overflow-y: scroll; 213 overflow-y: scroll;
155 padding-top: 20px; 214 padding-top: 20px;
156 padding: 20px 40px; 215 padding: 20px 40px;
157 } 216 .spyj_title {
158 .spyj_title { 217 width: 100%;
159 line-height: 68px; 218 height:80px;
160 border: 1px solid $borderColor; 219 border: 1px solid $borderColor;
161 text-align: center;
162 font-size: 22px;
163 font-weight: 400;
164 background-color: #eceef2; 220 background-color: #eceef2;
165 display: block; 221 display: flex;
166 border-bottom: none; 222
223 }
224 .leftadd{
225 width: 3%;
226 height: 100%;
227 display: flex;
228 font-size: 14px;
229 text-indent: 20px;
230 align-items: center;
231 border: 1px solid $borderColor;
232
233 }
234 .righttitle{
235 width: 80%;
236 height: 100%;
237 line-height: 80px;
238 border: 1px solid $borderColor;
239 text-align: center;
240 font-size: 22px;
241 font-weight: 400;
242
243 }
167 } 244 }
168 245
246
169 /deep/.el-form-item { 247 /deep/.el-form-item {
170 margin-bottom: 0; 248 margin-bottom: 0;
171 } 249 }
...@@ -187,6 +265,30 @@ export default { ...@@ -187,6 +265,30 @@ export default {
187 text-indent: 80px; 265 text-indent: 80px;
188 align-items: center; 266 align-items: center;
189 border-right: 1px solid $borderColor; 267 border-right: 1px solid $borderColor;
268
269 .left {
270 width: 30%;
271 height: 100%;
272 display: flex;
273 font-size: 14px;
274 text-indent: 20px;
275 align-items: center;
276 border-right: 1px solid $borderColor;
277 .el-icon-minus{
278 font-size: 14px;
279 color: black;
280 }
281 }
282 .right {
283 width: 70%;
284 height: 100%;
285 color: #606266;
286 display: flex;
287 font-size: 14px;
288 text-indent: 20px;
289 align-items: center;
290 border-right: 1px solid $borderColor;
291 }
190 } 292 }
191 293
192 .item_right { 294 .item_right {
......
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
122 _beforeUnload_time: "", 122 _beforeUnload_time: "",
123 treedata: {}, 123 treedata: {},
124 tabdata: [], 124 tabdata: [],
125 bsmRepair:"",
125 defaultNode: {}, 126 defaultNode: {},
126 }; 127 };
127 }, 128 },
...@@ -162,6 +163,7 @@ ...@@ -162,6 +163,7 @@
162 }, 163 },
163 // 获取右侧选项卡 164 // 获取右侧选项卡
164 getCurrentSelectProps (val) { 165 getCurrentSelectProps (val) {
166 this.bsmRepair= val.bsmRepair
165 if (val.bdcdyid) { 167 if (val.bdcdyid) {
166 this.oneSelectProps = val; 168 this.oneSelectProps = val;
167 } 169 }
......
...@@ -126,6 +126,7 @@ export default { ...@@ -126,6 +126,7 @@ export default {
126 //页面监听时间 126 //页面监听时间
127 _beforeUnload_time: "", 127 _beforeUnload_time: "",
128 treedata: {}, 128 treedata: {},
129 bsmRepair:"",
129 tabdata: [], 130 tabdata: [],
130 defaultNode: {}, 131 defaultNode: {},
131 }; 132 };
...@@ -168,6 +169,7 @@ export default { ...@@ -168,6 +169,7 @@ export default {
168 }, 169 },
169 // 获取右侧选项卡 170 // 获取右侧选项卡
170 getCurrentSelectProps(val) { 171 getCurrentSelectProps(val) {
172 this.bsmRepair= val.bsmRepair
171 if (val.bdcdyid) { 173 if (val.bdcdyid) {
172 this.oneSelectProps = val; 174 this.oneSelectProps = val;
173 } 175 }
......