--no commit message
Showing
1 changed file
with
0 additions
and
348 deletions
1 | <!-- | ||
2 | * @Description: 审批意见 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-17 10:41:24 | ||
5 | --> | ||
6 | <template> | ||
7 | <div class="spyj loadingtext"> | ||
8 | <div class="box"> | ||
9 | <div class="spyj_title"> | ||
10 | <div class="righttitle">审批表</div> | ||
11 | </div> | ||
12 | |||
13 | <div v-for="(item, index) in tableData" :key="index"> | ||
14 | <el-form | ||
15 | :model="tableData[index]" | ||
16 | label-width="120px" | ||
17 | ref="ruleFormRef'" | ||
18 | > | ||
19 | <div class="spyj_form"> | ||
20 | <div class="item_left"> | ||
21 | <div class="right">{{ item.jdmc }}意见</div> | ||
22 | </div> | ||
23 | <div class="item_right"> | ||
24 | <el-row> | ||
25 | <el-col :span="24"> | ||
26 | <el-form-item label-width="0" class="opinion_item"> | ||
27 | <el-input | ||
28 | :disabled="!ableOperation&&item.show" | ||
29 | type="textarea" | ||
30 | :rows="4" | ||
31 | class="opinion" | ||
32 | placeholder="请输入审批意见" | ||
33 | v-model="item.shyj" | ||
34 | ></el-input> | ||
35 | <el-button | ||
36 | class="opinion_btn" | ||
37 | @click="commonOpinion(index)" | ||
38 | v-if="ableOperation" | ||
39 | >常用意见</el-button | ||
40 | > | ||
41 | </el-form-item> | ||
42 | </el-col> | ||
43 | </el-row> | ||
44 | <el-row> | ||
45 | <el-col :span="16"> | ||
46 | <el-form-item label="审查人"> | ||
47 | <el-input | ||
48 | :disabled="!ableOperation" | ||
49 | v-model="item.shryxm" | ||
50 | ></el-input> | ||
51 | </el-form-item> | ||
52 | </el-col> | ||
53 | <el-col :span="8"> | ||
54 | <el-form-item class="sjxzq" label="审核时间"> | ||
55 | <el-date-picker | ||
56 | :disabled="!ableOperation" | ||
57 | v-model="item.shjssj" | ||
58 | type="date" | ||
59 | placeholder="选择日期" | ||
60 | value-format="yyyy-MM-dd HH:mm:ss" | ||
61 | format="yyyy-MM-dd" | ||
62 | > | ||
63 | </el-date-picker> | ||
64 | </el-form-item> | ||
65 | </el-col> | ||
66 | </el-row> | ||
67 | </div> | ||
68 | </div> | ||
69 | </el-form> | ||
70 | </div> | ||
71 | <div class="submit_button" v-if="ableOperation"> | ||
72 | <el-button type="primary" @click="onSubmit()">保存</el-button> | ||
73 | </div> | ||
74 | </div> | ||
75 | <!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> --> | ||
76 | </div> | ||
77 | </template> | ||
78 | <script> | ||
79 | import { saveSpyjBySlsq, getSpyjList } from "@/api/opinion.js"; | ||
80 | import { mapGetters } from "vuex"; | ||
81 | export default { | ||
82 | computed: { | ||
83 | ...mapGetters(["userData", "yjsqOptions", "userInfo"]), | ||
84 | }, | ||
85 | data() { | ||
86 | return { | ||
87 | isNoData: false, | ||
88 | currentindex: 0, | ||
89 | bsmSlsq: "", | ||
90 | ableOperation: false, | ||
91 | bsmSlsq: this.$route.query.bsmSlsq, | ||
92 | bestepid: this.$route.query.bestepid, | ||
93 | propsParam: {}, | ||
94 | tableData: [], | ||
95 | falg: false, | ||
96 | falg1: false, | ||
97 | jdmc: "", | ||
98 | indexdqlc: 0, | ||
99 | }; | ||
100 | }, | ||
101 | |||
102 | watch: { | ||
103 | yjsqOptions: { | ||
104 | handler(val) { | ||
105 | console.log("val", val); | ||
106 | this.add(val); | ||
107 | }, | ||
108 | deep: true, | ||
109 | immediate: true, | ||
110 | }, | ||
111 | }, | ||
112 | created() {}, | ||
113 | mounted() { | ||
114 | this.propsParam = this.$attrs; | ||
115 | console.log("this.$parent.dqhj", this.$parent.dqhj); | ||
116 | this.ableOperation = this.$parent.currentSelectTab.ableOperation; | ||
117 | // this.ableOperation = this.$parent.ableOperation; | ||
118 | this.getShList(); | ||
119 | |||
120 | switch (this.$parent.dqhj) { | ||
121 | case "cs": | ||
122 | this.indexdqlc = 0; | ||
123 | this.jdmc = "初审"; | ||
124 | break; | ||
125 | case "fs": | ||
126 | this.indexdqlc = 1; | ||
127 | this.jdmc = "复审"; | ||
128 | break; | ||
129 | case "hd": | ||
130 | this.indexdqlc = 2; | ||
131 | this.jdmc = "核定"; | ||
132 | break; | ||
133 | } | ||
134 | }, | ||
135 | methods: { | ||
136 | /** | ||
137 | * @description: getShList | ||
138 | * @param {*} obj | ||
139 | * @author: renchao | ||
140 | */ | ||
141 | getShList() { | ||
142 | let that = this; | ||
143 | this.$startLoading(); | ||
144 | console.log(this.userInfo); | ||
145 | var formdata = new FormData(); | ||
146 | formdata.append("bsmBusiness", this.propsParam.bsmBusiness); | ||
147 | formdata.append("bestepid", this.$route.query.bestepid); | ||
148 | |||
149 | getSpyjList(formdata).then((res) => { | ||
150 | this.$endLoading(); | ||
151 | if (res.code === 200 && res.result) { | ||
152 | this.tableData = res.result; | ||
153 | if (this.tableData.length == 0&&this.jdmc=="初审") { | ||
154 | console.log(0); | ||
155 | this.tableData.push({ jdmc: "初审" }); | ||
156 | }else if(this.tableData[this.tableData.length-1].jdmc=="初审"&&this.jdmc=="复审") { | ||
157 | console.log(1); | ||
158 | this.tableData.push({ jdmc: "复审" }); | ||
159 | }else if(this.tableData[this.tableData.length-1].jdmc=="复审"&&this.jdmc=="核定") { | ||
160 | console.log(2); | ||
161 | this.tableData.push({ jdmc: "核定" }); | ||
162 | } | ||
163 | |||
164 | if(this.$parent.dqhj=="cs"){ | ||
165 | this.tableData[0].show=false | ||
166 | } | ||
167 | console.log("this.tableData", this.tableData); | ||
168 | } | ||
169 | }); | ||
170 | }, | ||
171 | /** | ||
172 | * @description: judgment | ||
173 | * @param {*} obj | ||
174 | * @author: renchao | ||
175 | */ | ||
176 | judgment(obj) {}, | ||
177 | /** | ||
178 | * @description: onSubmit | ||
179 | * @author: renchao | ||
180 | */ | ||
181 | onSubmit() { | ||
182 | this.tableData.forEach((item, index) => { | ||
183 | item["bsmBusiness"] = this.propsParam.bsmBusiness; | ||
184 | item["bestepid"] = this.$route.query.bestepid; | ||
185 | item["shryxm"] = this.userInfo.name; | ||
186 | item["userid"] = this.userInfo.id; | ||
187 | item["shjssj"] = item.shkssj; | ||
188 | item["czjg"] = "1"; | ||
189 | item["jddm"] = this.$parent.dqhj; | ||
190 | item["jdmc"] = this.jdmc; | ||
191 | |||
192 | }); | ||
193 | console.log("this.tableData", this.tableData); | ||
194 | saveSpyjBySlsq(this.tableData).then((res) => { | ||
195 | if (res.code === 200) { | ||
196 | this.$message.success("保存成功"); | ||
197 | this.refresh += 1; | ||
198 | } else { | ||
199 | this.$message.error(res.message); | ||
200 | } | ||
201 | }); | ||
202 | // } else { | ||
203 | // return false; | ||
204 | // } | ||
205 | }, | ||
206 | //打开常用意见列表弹窗 | ||
207 | /** | ||
208 | * @description: 打开常用意见列表弹窗 | ||
209 | * @param {*} index | ||
210 | * @author: renchao | ||
211 | */ | ||
212 | commonOpinion(index) { | ||
213 | this.currentindex = index; | ||
214 | this.$popupDialog( | ||
215 | "常用意见", | ||
216 | "workflow/components/dialog/commonOpinion", | ||
217 | {}, | ||
218 | "70%", | ||
219 | true | ||
220 | ); | ||
221 | }, | ||
222 | /** | ||
223 | * @description: add | ||
224 | * @param {*} val | ||
225 | * @author: renchao | ||
226 | */ | ||
227 | add(val) { | ||
228 | if (val != "") { | ||
229 | this.$set(this.tableData[this.currentindex], "shyj", val); | ||
230 | } | ||
231 | }, | ||
232 | }, | ||
233 | }; | ||
234 | </script> | ||
235 | <style scoped lang="scss"> | ||
236 | @import "~@/styles/mixin.scss"; | ||
237 | |||
238 | .spyj { | ||
239 | width: 100%; | ||
240 | height: 100%; | ||
241 | background-color: #f5f5f5; | ||
242 | padding: 5px; | ||
243 | .box { | ||
244 | overflow-x: auto; | ||
245 | width: 100%; | ||
246 | height: 95%; | ||
247 | background: #fff; | ||
248 | text-align: center; | ||
249 | padding: 4px; | ||
250 | overflow-y: scroll; | ||
251 | padding-top: 20px; | ||
252 | padding: 20px 40px; | ||
253 | .spyj_title { | ||
254 | width: 100%; | ||
255 | height: 80px; | ||
256 | border: 1px solid $borderColor; | ||
257 | background-color: #eceef2; | ||
258 | display: flex; | ||
259 | } | ||
260 | .leftadd { | ||
261 | width: 3%; | ||
262 | height: 100%; | ||
263 | display: flex; | ||
264 | font-size: 14px; | ||
265 | text-indent: 20px; | ||
266 | align-items: center; | ||
267 | border: 1px solid $borderColor; | ||
268 | } | ||
269 | .righttitle { | ||
270 | width: 80%; | ||
271 | height: 100%; | ||
272 | line-height: 80px; | ||
273 | border: 1px solid $borderColor; | ||
274 | margin: auto; | ||
275 | font-size: 22px; | ||
276 | font-weight: 400; | ||
277 | } | ||
278 | } | ||
279 | |||
280 | /deep/.el-form-item { | ||
281 | margin-bottom: 0; | ||
282 | } | ||
283 | |||
284 | .bottom10 { | ||
285 | margin-bottom: 15px; | ||
286 | } | ||
287 | |||
288 | .spyj_form { | ||
289 | display: flex; | ||
290 | border: 1px solid $borderColor; | ||
291 | |||
292 | .item_left { | ||
293 | width: 150px; | ||
294 | background-color: #f8f8fa; | ||
295 | color: #606266; | ||
296 | display: flex; | ||
297 | font-size: 14px; | ||
298 | text-indent: 50px; | ||
299 | align-items: center; | ||
300 | border-right: 1px solid $borderColor; | ||
301 | } | ||
302 | |||
303 | .item_right { | ||
304 | flex: 1; | ||
305 | width: 100%; | ||
306 | |||
307 | /deep/.el-form-item__label { | ||
308 | background-color: #f8f8fa; | ||
309 | } | ||
310 | /deep/.el-form-item__content { | ||
311 | display: block; | ||
312 | text-align: left; | ||
313 | } | ||
314 | .opinion_item { | ||
315 | /deep/.el-form-item__error { | ||
316 | margin-top: -16px !important; | ||
317 | left: 3px; | ||
318 | } | ||
319 | border-bottom: 1px solid $borderColor; | ||
320 | } | ||
321 | |||
322 | .opinion { | ||
323 | position: relative; | ||
324 | font-size: 14px; | ||
325 | |||
326 | /deep/.el-textarea__inner { | ||
327 | border: none; | ||
328 | } | ||
329 | } | ||
330 | |||
331 | .opinion_btn { | ||
332 | position: absolute; | ||
333 | right: 15px; | ||
334 | bottom: 10px; | ||
335 | } | ||
336 | } | ||
337 | } | ||
338 | |||
339 | .submit_button { | ||
340 | text-align: center; | ||
341 | margin: 15px 0; | ||
342 | } | ||
343 | |||
344 | .el-date-editor.el-input { | ||
345 | width: 100%; | ||
346 | } | ||
347 | } | ||
348 | </style> |
-
Please register or sign in to post a comment