|
@@ -207,25 +207,61 @@ export default {
|
207
|
207
|
var config = res.data.config
|
208
|
208
|
var outConfig = res.data.outConfig
|
209
|
209
|
this.out_open = outConfig.is_open
|
210
|
|
-
|
211
|
|
-
|
|
210
|
+
|
212
|
211
|
var settleConfig = res.data.settleConfig
|
213
|
212
|
this.settle_open = settleConfig.is_open
|
214
|
213
|
this.good_type_list = res.data.good_type
|
215
|
214
|
|
216
|
215
|
this.list = []
|
217
|
|
- if ((res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0 && res.data.dialysis_goods[0].last_good_user != null) || (res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0 && res.data.dialysis_goods[0].project != null)) {
|
218
|
|
- this.uploadMethod = 1
|
219
|
|
- } else {
|
220
|
|
- this.uploadMethod = 2
|
|
216
|
+
|
|
217
|
+ if(this.$store.getters.user.template_info.org_id!=10164 && this.$store.getters.user.template_info.org_id!=10721){
|
|
218
|
+ if ((res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0 && res.data.dialysis_goods[0].last_good_user != null) || (res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0 && res.data.dialysis_goods[0].project != null)) {
|
|
219
|
+ this.uploadMethod = 1
|
|
220
|
+ } else {
|
|
221
|
+ this.uploadMethod = 2
|
|
222
|
+ }
|
|
223
|
+
|
|
224
|
+ if (res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0 && res.data.dialysis_goods[0].last_good_user == null && res.data.dialysis_goods[0].project.length == 0) {
|
|
225
|
+ this.color = 2
|
|
226
|
+ }
|
221
|
227
|
}
|
222
|
228
|
|
223
|
|
- if (res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0 && res.data.dialysis_goods[0].last_good_user == null && res.data.dialysis_goods[0].project.length == 0) {
|
224
|
|
- this.color = 2
|
|
229
|
+ if(this.$store.getters.user.template_info.org_id==10164 || this.$store.getters.user.template_info.org_id ==10721){
|
|
230
|
+
|
|
231
|
+ if ((res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0 && res.data.dialysis_goods[0].last_good_user != null) || (res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0)) {
|
|
232
|
+ this.uploadMethod = 1
|
|
233
|
+ } else {
|
|
234
|
+ this.uploadMethod = 2
|
|
235
|
+ }
|
|
236
|
+
|
|
237
|
+ if (res.data.dialysis_goods[0].good_user.length == 0 && res.data.dialysis_goods[0].good_user_detail.length == 0 && res.data.dialysis_goods[0].last_good_user == null) {
|
|
238
|
+ this.color = 2
|
|
239
|
+ }
|
225
|
240
|
}
|
226
|
241
|
|
|
242
|
+
|
|
243
|
+
|
227
|
244
|
for (let i = 0; i < res.data.dialysis_goods.length; i++) {
|
228
|
|
- if (res.data.dialysis_goods[i].good_user.length > 0) {
|
|
245
|
+ console.log("中国=======================",res.data.dialysis_goods[i].good_user)
|
|
246
|
+ var goodUserList = []
|
|
247
|
+ if(res.data.dialysis_goods[i].good_user!=null){
|
|
248
|
+ for(let s=0;s<res.data.dialysis_goods[i].good_user.length;s++){
|
|
249
|
+ res.data.dialysis_goods[i].good_user[s].out_stock = 0
|
|
250
|
+ res.data.dialysis_goods[i].good_user[s].out_stock = this.getOutStock(res.data.dialysis_goods[i].good_user[s].info.good_type_id)
|
|
251
|
+ }
|
|
252
|
+ }
|
|
253
|
+
|
|
254
|
+ if(res.data.dialysis_goods[i].good_user!=null){
|
|
255
|
+ for(let s=0;s<res.data.dialysis_goods[i].good_user.length;s++){
|
|
256
|
+ if(res.data.dialysis_goods[i].good_user[s].out_stock == 1){
|
|
257
|
+ goodUserList.push(res.data.dialysis_goods[i].good_user[s])
|
|
258
|
+ }
|
|
259
|
+ }
|
|
260
|
+ }
|
|
261
|
+
|
|
262
|
+ console.log("hhahahahahhaah",goodUserList)
|
|
263
|
+ if (goodUserList.length > 0) {
|
|
264
|
+
|
229
|
265
|
this.isShowButton = 2
|
230
|
266
|
}
|
231
|
267
|
if (res.data.dialysis_goods[i].good_user_detail.length > 0 && res.data.dialysis_goods[i].good_user.length > 0) {
|
|
@@ -234,7 +270,8 @@ export default {
|
234
|
270
|
}
|
235
|
271
|
//good_user 自动出库表 last_good_user (上次透析) good_user_detail(准备表) last_good_user_detail(上次透析)
|
236
|
272
|
for (let i = 0; i < res.data.dialysis_goods.length; i++) {
|
237
|
|
- if (res.data.dialysis_goods[i].good_user.length > 0) {
|
|
273
|
+
|
|
274
|
+ if (goodUserList.length > 0) {
|
238
|
275
|
for (let b = 0; b < res.data.dialysis_goods[i].good_user.length; b++) {
|
239
|
276
|
if (res.data.dialysis_goods[i].good_user[b].info.id > 0) {
|
240
|
277
|
let obj = {
|
|
@@ -326,7 +363,9 @@ export default {
|
326
|
363
|
}
|
327
|
364
|
}
|
328
|
365
|
} else {
|
329
|
|
- if (res.data.dialysis_goods[i].project.length > 0) {
|
|
366
|
+
|
|
367
|
+ if(this.$store.getters.user.template_info.org_id!=10164 && this.$store.getters.user.template_info.org_id!=10721){
|
|
368
|
+ if (res.data.dialysis_goods[i].project.length > 0) {
|
330
|
369
|
for (let b = 0; b < res.data.dialysis_goods[i].project.length; b++) {
|
331
|
370
|
if (res.data.dialysis_goods[i].project[b].good_info.type.out_stock == 1) {
|
332
|
371
|
if (res.data.dialysis_goods[i].project[b].good_info.id > 0) {
|
|
@@ -375,6 +414,38 @@ export default {
|
375
|
414
|
}
|
376
|
415
|
}
|
377
|
416
|
}
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+ }
|
|
420
|
+
|
|
421
|
+ if(this.$store.getters.user.template_info.org_id == 10164 || this.$store.getters.user.template_info.org_id==10721){
|
|
422
|
+
|
|
423
|
+ if (res.data.dialysis_goods[i].last_good_user_detail != null) {
|
|
424
|
+ if (config != undefined && config.is_open != 1) {
|
|
425
|
+ for (let b = 0; b < res.data.dialysis_goods[i].last_good_user_detail.length; b++) {
|
|
426
|
+ if (res.data.dialysis_goods[i].last_good_user_detail[b].info.id > 0) {
|
|
427
|
+ let obj = {
|
|
428
|
+ good_type_id: res.data.dialysis_goods[i].last_good_user_detail[b].type.id,
|
|
429
|
+ good_id: res.data.dialysis_goods[i].last_good_user_detail[b].info.id,
|
|
430
|
+ type_name: res.data.dialysis_goods[i].last_good_user_detail[b].type.type_name,
|
|
431
|
+ specification_name: res.data.dialysis_goods[i].last_good_user_detail[b].info.specification_name,
|
|
432
|
+ count: res.data.dialysis_goods[i].last_good_user_detail[b].count.toString(),
|
|
433
|
+ project_id: 0,
|
|
434
|
+ old_count: 0,
|
|
435
|
+ new_count: 0,
|
|
436
|
+ good_type_id:res.data.dialysis_goods[i].last_good_user_detail[b].info.good_type_id,
|
|
437
|
+ }
|
|
438
|
+ console.log("寄44444444444444444444",this.list)
|
|
439
|
+ this.list.push(obj)
|
|
440
|
+ }
|
|
441
|
+ }
|
|
442
|
+ }
|
|
443
|
+ if (config.is_open == 1) {
|
|
444
|
+ this.list = []
|
|
445
|
+ }
|
|
446
|
+ }
|
|
447
|
+ }
|
|
448
|
+
|
378
|
449
|
}
|
379
|
450
|
}
|
380
|
451
|
}
|
|
@@ -396,6 +467,9 @@ export default {
|
396
|
467
|
// 已经出库数据
|
397
|
468
|
var warehouseOutList = res.data.warehouseOutList
|
398
|
469
|
console.log('warehouseOutList', warehouseOutList)
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
399
|
473
|
|
400
|
474
|
var newWarehouseOutList = []
|
401
|
475
|
|
|
@@ -408,6 +482,7 @@ export default {
|
408
|
482
|
good_id:item.good_id,
|
409
|
483
|
child: [],
|
410
|
484
|
count:0,
|
|
485
|
+
|
411
|
486
|
}
|
412
|
487
|
}
|
413
|
488
|
})
|
|
@@ -474,8 +549,35 @@ export default {
|
474
|
549
|
}
|
475
|
550
|
|
476
|
551
|
|
477
|
|
- console.log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh",this.list)
|
478
|
|
- this.list = newArr
|
|
552
|
+ console.log("newArr=================",newArr)
|
|
553
|
+
|
|
554
|
+ console.log("out_open--------------",this.out_open)
|
|
555
|
+ console.log("is_open----------------",this.is_open)
|
|
556
|
+ console.log("isShowButton++++++++++",this.isShowButton)
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+ var newArrList = []
|
|
561
|
+ if(newArr!=null && newArr.length >0){
|
|
562
|
+ for(let i=0;i<newArr.length;i++){
|
|
563
|
+ newArr[i].out_stock = 0
|
|
564
|
+ newArr[i].out_stock = this.getOutStock(newArr[i].good_type_id)
|
|
565
|
+ }
|
|
566
|
+ }
|
|
567
|
+ console.log("我的杰哈回复的哈哈都返回啊涣发大号暗黑风",newArr)
|
|
568
|
+
|
|
569
|
+ if(newArr!=null && newArr.length>0){
|
|
570
|
+ for(let i=0;i<newArr.length;i++){
|
|
571
|
+ if(newArr[i].out_stock == 1){
|
|
572
|
+ newArrList.push(newArr[i])
|
|
573
|
+ }
|
|
574
|
+ }
|
|
575
|
+ }
|
|
576
|
+
|
|
577
|
+ console.log("哈哈哈哈会到的佛啊地方阿道夫",newArrList)
|
|
578
|
+
|
|
579
|
+ this.list = newArrList
|
|
580
|
+ console.log("list=--------------",this.list)
|
479
|
581
|
|
480
|
582
|
var prescription = res.data.prescribe
|
481
|
583
|
|
|
@@ -483,7 +585,7 @@ export default {
|
483
|
585
|
var dialyszerArr = []
|
484
|
586
|
var irrigationArr = []
|
485
|
587
|
var dialysisStrainerArr = []
|
486
|
|
- if (this.$store.getters.user.template_info.org_id != 10318 && this.$store.getters.user.template_info.org_id != 10402 && this.$store.getters.user.template_info.org_id != 10485 && this.$store.getters.user.template_info.org_id != 10489 && this.$store.getters.user.template_info.org_id != 10215 && this.$store.getters.user.template_info.org_id != 10485 && this.$store.getters.user.template_info.org_id != 10265 && this.$store.getters.user.template_info.org_id != 10515 && this.$store.getters.user.template_info.org_id != 10278 && this.$store.getters.user.template_info.org_id != 10480 && this.$store.getters.user.template_info.org_id != 10598 && this.$store.getters.user.template_info.org_id != 10515 && this.$store.getters.user.template_info.org_id != 10318 && this.$store.getters.user.template_info.org_id != 10610 && this.$store.getters.user.template_info.org_id != 10265) {
|
|
588
|
+ if (this.$store.getters.user.template_info.org_id != 10318 && this.$store.getters.user.template_info.org_id != 10402 && this.$store.getters.user.template_info.org_id != 10485 && this.$store.getters.user.template_info.org_id != 10489 && this.$store.getters.user.template_info.org_id != 10215 && this.$store.getters.user.template_info.org_id != 10485 && this.$store.getters.user.template_info.org_id != 10265 && this.$store.getters.user.template_info.org_id != 10515 && this.$store.getters.user.template_info.org_id != 10278 && this.$store.getters.user.template_info.org_id != 10480 && this.$store.getters.user.template_info.org_id != 10598 && this.$store.getters.user.template_info.org_id != 10515 && this.$store.getters.user.template_info.org_id != 10318 && this.$store.getters.user.template_info.org_id != 10610 && this.$store.getters.user.template_info.org_id != 10265 && this.$store.getters.user.template_info.org_id != 10164 && this.$store.getters.user.template_info.org_id != 10726 && this.$store.getters.user.template_info.org_id != 10721) {
|
487
|
589
|
if (prescription != null && res.data.dialysis_goods[0].good_user_detail.length == 0) {
|
488
|
590
|
var dialysisDialyszers = prescription.dialysis_dialyszers
|
489
|
591
|
var arr = dialysisDialyszers.split(',')
|
|
@@ -855,6 +957,15 @@ export default {
|
855
|
957
|
}
|
856
|
958
|
}
|
857
|
959
|
return type_name
|
|
960
|
+ },
|
|
961
|
+ getOutStock(good_type_id){
|
|
962
|
+ var out_stock =0
|
|
963
|
+ for(let i=0;i<this.good_type_list.length;i++){
|
|
964
|
+ if(good_type_id == this.good_type_list[i].id){
|
|
965
|
+ out_stock = this.good_type_list[i].out_stock
|
|
966
|
+ }
|
|
967
|
+ }
|
|
968
|
+ return out_stock
|
858
|
969
|
}
|
859
|
970
|
},
|
860
|
971
|
mounted () {
|