58e82bcb by renchao@pashanhoo.com

1

1 parent b5ae31b2
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2024-02-02 16:35:20 4 * @LastEditTime: 2024-02-06 16:56:48
5 --> 5 -->
6 <template> 6 <template>
7 <div class="from-clues"> 7 <div class="from-clues">
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
81 </div> 81 </div>
82 <div class="submit_button"> 82 <div class="submit_button">
83 <el-button @click="$popupCacel">取消</el-button> 83 <el-button @click="$popupCacel">取消</el-button>
84 <el-button type="primary" plain @click="submitForm" :loading="loading" v-if="sqywInfo.isworkFrame">添加单元</el-button> 84 <el-button type="primary" plain @click="handleAdd" :loading="loading" v-if="sqywInfo.isworkFrame">添加单元</el-button>
85 <el-button type="primary" plain @click="submitForm" :loading="loading" v-else>发起申请</el-button> 85 <el-button type="primary" plain @click="submitForm" :loading="loading" v-else>发起申请</el-button>
86 </div> 86 </div>
87 </div> 87 </div>
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
132 </div> 132 </div>
133 <div class="submit_button"> 133 <div class="submit_button">
134 <el-button @click="$popupCacel">取消</el-button> 134 <el-button @click="$popupCacel">取消</el-button>
135 <el-button type="primary" plain @click="submitForm" :loading="loading" v-if="sqywInfo.isworkFrame">添加单元</el-button> 135 <el-button type="primary" plain @click="handleAdd" :loading="loading" v-if="sqywInfo.isworkFrame">添加单元</el-button>
136 <el-button type="primary" plain @click="submitForm" :loading="loading" v-else>发起申请</el-button> 136 <el-button type="primary" plain @click="submitForm" :loading="loading" v-else>发起申请</el-button>
137 </div> 137 </div>
138 </div> 138 </div>
...@@ -295,6 +295,35 @@ ...@@ -295,6 +295,35 @@
295 * @description: submitForm 295 * @description: submitForm
296 * @author: renchao 296 * @author: renchao
297 */ 297 */
298 handleAdd () {
299 let that = this
300 this.loading = true
301 store.dispatch('user/reMenuRefresh', false)
302 againAddSldy({
303 bsmSqyw: that.sqywInfo.bsmSqyw,
304 bdcdysz: that.bdcdysz,
305 bsmSlsq: that.sqywInfo.bsmSlsq,
306 }).then(res => {
307 that.loading = false
308 if (res.code == 200) {
309 if (this.sqywInfo.sqywdylx != "1") {
310 that.bdcdysz = []
311 that.$refs.table.clearSelection()
312 }
313 store.dispatch('user/reMenuRefresh', true)
314 that.queryClick()
315 that.$message({
316 showClose: true,
317 message: '添加成功',
318 type: 'success'
319 })
320 } else {
321 that.$message.error(res.message);
322 }
323 }).catch(() => {
324 that.loading = false
325 })
326 },
298 submitForm () { 327 submitForm () {
299 let that = this 328 let that = this
300 if (this.bdcdysz.length == 0) { 329 if (this.bdcdysz.length == 0) {
...@@ -302,88 +331,60 @@ ...@@ -302,88 +331,60 @@
302 return; 331 return;
303 } 332 }
304 this.loading = true 333 this.loading = true
305 if (this.sqywInfo.isworkFrame) { 334 if (!that.isJump) {
306 store.dispatch('user/reMenuRefresh', false) 335 startBusinessFlow({
307 againAddSldy({
308 bsmSqyw: that.sqywInfo.bsmSqyw, 336 bsmSqyw: that.sqywInfo.bsmSqyw,
337 //sjlx: 'zrz',
338 sjlx: that.activeName,
309 bdcdysz: that.bdcdysz, 339 bdcdysz: that.bdcdysz,
310 bsmSlsq: that.sqywInfo.bsmSlsq, 340 }).then((res) => {
311 }).then(res => {
312 that.loading = false 341 that.loading = false
313 if (res.code == 200) { 342 if (res.code == 200) {
314 if (this.sqywInfo.sqywdylx != "1") {
315 that.bdcdysz = []
316 that.$refs.table.clearSelection()
317 }
318 store.dispatch('user/reMenuRefresh', true)
319 that.queryClick()
320 that.$message({ 343 that.$message({
321 showClose: true, 344 showClose: true,
322 message: '添加成功', 345 message: '发起申请成功',
323 type: 'success' 346 type: 'success'
324 }) 347 })
348 if (!that.isJump) {
349 that.jump(res.result, that.sqywInfo.djywbm);
350 } else {
351 store.dispatch('user/refreshPage', true);
352 }
353 that.$popupCacel()
325 } else { 354 } else {
326 that.$message.error(res.message); 355 if (res.result && res.result.length > 0) {
356 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
357 } else {
358 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
359 }
327 } 360 }
328 }).catch(() => { 361 }).catch(() => {
329 that.loading = false 362 that.loading = false
330 }) 363 })
331 } else { 364 } else {
332 if (!that.isJump) { 365 choiceBdcdy({
333 startBusinessFlow({ 366 bsmSlsq: Vue.prototype.$currentRoute.query.bsmSlsq,
334 bsmSqyw: that.sqywInfo.bsmSqyw, 367 bdcdysz: that.bdcdysz
335 //sjlx: 'zrz', 368 }).then(res => {
336 sjlx: that.activeName, 369 that.loading = false
337 bdcdysz: that.bdcdysz, 370 if (res.code == 200) {
338 }).then((res) => { 371 that.$message({
339 that.loading = false 372 showClose: true,
340 if (res.code == 200) { 373 message: '发起申请成功',
341 that.$message({ 374 type: 'success'
342 showClose: true, 375 })
343 message: '发起申请成功', 376 store.dispatch('user/refreshPage', true);
344 type: 'success' 377 that.$popupCacel()
345 }) 378 } else {
346 if (!that.isJump) { 379 if (res.result && res.result.length > 0) {
347 that.jump(res.result, that.sqywInfo.djywbm); 380 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
348 } else {
349 store.dispatch('user/refreshPage', true);
350 }
351 that.$popupCacel()
352 } else {
353 if (res.result && res.result.length > 0) {
354 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
355 } else {
356 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
357 }
358 }
359 }).catch(() => {
360 that.loading = false
361 })
362 } else {
363 choiceBdcdy({
364 bsmSlsq: Vue.prototype.$currentRoute.query.bsmSlsq,
365 bdcdysz: that.bdcdysz
366 }).then(res => {
367 that.loading = false
368 if (res.code == 200) {
369 that.$message({
370 showClose: true,
371 message: '发起申请成功',
372 type: 'success'
373 })
374 store.dispatch('user/refreshPage', true);
375 that.$popupCacel()
376 } else { 381 } else {
377 if (res.result && res.result.length > 0) { 382 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
378 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
379 } else {
380 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
381 }
382 } 383 }
383 }).catch(() => { 384 }
384 that.loading = false 385 }).catch(() => {
385 }) 386 that.loading = false
386 } 387 })
387 } 388 }
388 }, 389 },
389 /** 390 /**
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
119 </div> 119 </div>
120 <div class="submit_button"> 120 <div class="submit_button">
121 <el-button @click="$popupCacel">取消</el-button> 121 <el-button @click="$popupCacel">取消</el-button>
122 <el-button type="primary" plain @click="submitForm" :loading="loading" v-if="sqywInfo.isworkFrame">添加单元</el-button> 122 <el-button type="primary" plain @click="handleAdd" :loading="loading" v-if="sqywInfo.isworkFrame">添加单元</el-button>
123 <el-button type="primary" plain @click="submitForm" :loading="loading" v-else>发起申请</el-button> 123 <el-button type="primary" plain @click="submitForm" :loading="loading" v-else>发起申请</el-button>
124 </div> 124 </div>
125 </div> 125 </div>
...@@ -264,6 +264,35 @@ ...@@ -264,6 +264,35 @@
264 * @description: submitForm 264 * @description: submitForm
265 * @author: renchao 265 * @author: renchao
266 */ 266 */
267 handleAdd () {
268 let that = this
269 this.loading = true
270 store.dispatch('user/reMenuRefresh', false)
271 againAddSldy({
272 bsmSqyw: that.sqywInfo.bsmSqyw,
273 bdcdysz: that.bdcdysz,
274 bsmSlsq: that.sqywInfo.bsmSlsq,
275 }).then(res => {
276 that.loading = false
277 if (res.code == 200) {
278 if (this.sqywInfo.sqywdylx != "1") {
279 that.bdcdysz = []
280 that.$refs.table.clearSelection()
281 }
282 store.dispatch('user/reMenuRefresh', true)
283 that.queryClick()
284 that.$message({
285 showClose: true,
286 message: '添加成功',
287 type: 'success'
288 })
289 } else {
290 that.$message.error(res.message);
291 }
292 }).catch(() => {
293 that.loading = false
294 })
295 },
267 submitForm () { 296 submitForm () {
268 let that = this 297 let that = this
269 if (this.bdcdysz.length == 0) { 298 if (this.bdcdysz.length == 0) {
...@@ -271,88 +300,60 @@ ...@@ -271,88 +300,60 @@
271 return; 300 return;
272 } 301 }
273 this.loading = true 302 this.loading = true
274 if (this.sqywInfo.isworkFrame) { 303 if (!that.isJump) {
275 store.dispatch('user/reMenuRefresh', false) 304 startBusinessFlow({
276 againAddSldy({
277 bsmSqyw: that.sqywInfo.bsmSqyw, 305 bsmSqyw: that.sqywInfo.bsmSqyw,
306 //sjlx: 'zrz',
307 sjlx: that.activeName,
278 bdcdysz: that.bdcdysz, 308 bdcdysz: that.bdcdysz,
279 bsmSlsq: that.sqywInfo.bsmSlsq, 309 }).then((res) => {
280 }).then(res => {
281 that.loading = false 310 that.loading = false
282 if (res.code == 200) { 311 if (res.code == 200) {
283 if (this.sqywInfo.sqywdylx != "1") {
284 that.bdcdysz = []
285 that.$refs.table.clearSelection()
286 }
287 store.dispatch('user/reMenuRefresh', true)
288 that.queryClick()
289 that.$message({ 312 that.$message({
290 showClose: true, 313 showClose: true,
291 message: '添加成功', 314 message: '发起申请成功',
292 type: 'success' 315 type: 'success'
293 }) 316 })
317 if (!that.isJump) {
318 that.jump(res.result, that.sqywInfo.djywbm);
319 } else {
320 store.dispatch('user/refreshPage', true);
321 }
322 that.$popupCacel()
294 } else { 323 } else {
295 that.$message.error(res.message); 324 if (res.result && res.result.length > 0) {
325 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
326 } else {
327 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
328 }
296 } 329 }
297 }).catch(() => { 330 }).catch(() => {
298 that.loading = false 331 that.loading = false
299 }) 332 })
300 } else { 333 } else {
301 if (!that.isJump) { 334 choiceBdcdy({
302 startBusinessFlow({ 335 bsmSlsq: Vue.prototype.$currentRoute.query.bsmSlsq,
303 bsmSqyw: that.sqywInfo.bsmSqyw, 336 bdcdysz: that.bdcdysz
304 //sjlx: 'zrz', 337 }).then(res => {
305 sjlx: that.activeName, 338 that.loading = false
306 bdcdysz: that.bdcdysz, 339 if (res.code == 200) {
307 }).then((res) => { 340 that.$message({
308 that.loading = false 341 showClose: true,
309 if (res.code == 200) { 342 message: '发起申请成功',
310 that.$message({ 343 type: 'success'
311 showClose: true, 344 })
312 message: '发起申请成功', 345 store.dispatch('user/refreshPage', true);
313 type: 'success' 346 that.$popupCacel()
314 }) 347 } else {
315 if (!that.isJump) { 348 if (res.result && res.result.length > 0) {
316 that.jump(res.result, that.sqywInfo.djywbm); 349 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
317 } else {
318 store.dispatch('user/refreshPage', true);
319 }
320 that.$popupCacel()
321 } else {
322 if (res.result && res.result.length > 0) {
323 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
324 } else {
325 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
326 }
327 }
328 }).catch(() => {
329 that.loading = false
330 })
331 } else {
332 choiceBdcdy({
333 bsmSlsq: Vue.prototype.$currentRoute.query.bsmSlsq,
334 bdcdysz: that.bdcdysz
335 }).then(res => {
336 that.loading = false
337 if (res.code == 200) {
338 that.$message({
339 showClose: true,
340 message: '发起申请成功',
341 type: 'success'
342 })
343 store.dispatch('user/refreshPage', true);
344 that.$popupCacel()
345 } else { 350 } else {
346 if (res.result && res.result.length > 0) { 351 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
347 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
348 } else {
349 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
350 }
351 } 352 }
352 }).catch(() => { 353 }
353 that.loading = false 354 }).catch(() => {
354 }) 355 that.loading = false
355 } 356 })
356 } 357 }
357 }, 358 },
358 /** 359 /**
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2024-02-02 16:35:49 4 * @LastEditTime: 2024-02-06 16:58:53
5 --> 5 -->
6 <template> 6 <template>
7 <div class="from-clues"> 7 <div class="from-clues">
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
52 </div> 52 </div>
53 <div class="submit_button"> 53 <div class="submit_button">
54 <el-button @click="$popupCacel">取消</el-button> 54 <el-button @click="$popupCacel">取消</el-button>
55 <el-button type="primary" plain @click="submitForm" :loading="loading" v-if="sqywInfo.isworkFrame">添加单元</el-button> 55 <el-button type="primary" plain @click="handleAdd" :loading="loading" v-if="sqywInfo.isworkFrame">添加单元</el-button>
56 <el-button type="primary" plain @click="submitForm" :loading="loading" v-else>发起申请</el-button> 56 <el-button type="primary" plain @click="submitForm" :loading="loading" v-else>发起申请</el-button>
57 </div> 57 </div>
58 </div> 58 </div>
...@@ -132,6 +132,35 @@ ...@@ -132,6 +132,35 @@
132 * @description: submitForm 132 * @description: submitForm
133 * @author: renchao 133 * @author: renchao
134 */ 134 */
135 handleAdd () {
136 let that = this
137 this.loading = true
138 store.dispatch('user/reMenuRefresh', false)
139 againAddSldy({
140 bsmSqyw: that.sqywInfo.bsmSqyw,
141 bdcdysz: that.bdcdysz,
142 bsmSlsq: that.sqywInfo.bsmSlsq,
143 }).then(res => {
144 that.loading = false
145 if (res.code == 200) {
146 if (this.sqywInfo.sqywdylx != "1") {
147 that.bdcdysz = []
148 that.$refs.table.clearSelection()
149 }
150 store.dispatch('user/reMenuRefresh', true)
151 that.queryClick()
152 that.$message({
153 showClose: true,
154 message: '添加成功',
155 type: 'success'
156 })
157 } else {
158 that.$message.error(res.message);
159 }
160 }).catch(() => {
161 that.loading = false
162 })
163 },
135 submitForm () { 164 submitForm () {
136 let that = this 165 let that = this
137 if (this.bdcdysz.length == 0) { 166 if (this.bdcdysz.length == 0) {
...@@ -139,61 +168,33 @@ ...@@ -139,61 +168,33 @@
139 return; 168 return;
140 } 169 }
141 this.loading = true 170 this.loading = true
142 if (this.sqywInfo.isworkFrame) { 171 startBusinessFlow({
143 store.dispatch('user/reMenuRefresh', false) 172 bsmSqyw: that.sqywInfo.bsmSqyw,
144 againAddSldy({ 173 bdcdysz: that.bdcdysz,
145 bsmSqyw: that.sqywInfo.bsmSqyw, 174 }).then((res) => {
146 bdcdysz: that.bdcdysz, 175 that.loading = false
147 bsmSlsq: that.sqywInfo.bsmSlsq, 176 if (res.code == 200) {
148 }).then(res => { 177 that.$message({
149 that.loading = false 178 showClose: true,
150 if (res.code == 200) { 179 message: '发起申请成功',
151 if (this.sqywInfo.sqywdylx != "1") { 180 type: 'success'
152 that.bdcdysz = [] 181 })
153 that.$refs.table.clearSelection() 182 if (!that.isJump) {
154 } 183 that.jump(res.result, that.djywbm)
155 store.dispatch('user/reMenuRefresh', true)
156 that.queryClick()
157 that.$message({
158 showClose: true,
159 message: '添加成功',
160 type: 'success'
161 })
162 } else { 184 } else {
163 that.$message.error(res.message); 185 store.dispatch('user/refreshPage', true);
164 } 186 }
165 }).catch(() => { 187 that.$popupCacel()
166 that.loading = false 188 } else {
167 }) 189 if (res.result && res.result.length > 0) {
168 } else { 190 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
169 startBusinessFlow({
170 bsmSqyw: that.sqywInfo.bsmSqyw,
171 bdcdysz: that.bdcdysz,
172 }).then((res) => {
173 that.loading = false
174 if (res.code == 200) {
175 that.$message({
176 showClose: true,
177 message: '发起申请成功',
178 type: 'success'
179 })
180 if (!that.isJump) {
181 that.jump(res.result, that.djywbm)
182 } else {
183 store.dispatch('user/refreshPage', true);
184 }
185 that.$popupCacel()
186 } else { 191 } else {
187 if (res.result && res.result.length > 0) { 192 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
188 ywPopupDialog("申请错误明细", "components/ywdialog", { result: res.result }, '36%', true)
189 } else {
190 ywPopupDialog("申请错误明细", "components/ywdialog", { message: res.message }, '36%', true)
191 }
192 } 193 }
193 }).catch(() => { 194 }
194 that.loading = false 195 }).catch(() => {
195 }) 196 that.loading = false
196 } 197 })
197 }, 198 },
198 /** 199 /**
199 * @description: handleSelectionChange 200 * @description: handleSelectionChange
......