|
@@ -397,188 +397,200 @@ import {
|
397
|
397
|
getReturnOrder,
|
398
|
398
|
} from "@/api/supply";
|
399
|
399
|
export default {
|
400
|
|
-name: "addPurchaseOrder",
|
401
|
|
-components: {
|
402
|
|
-BreadCrumb
|
403
|
|
-},
|
404
|
|
-data() {
|
405
|
|
-return {
|
406
|
|
- Reviewed:false,
|
407
|
|
- crumbs: [
|
408
|
|
- { path: false, name: "采购订单" },
|
409
|
|
- { path: "/supply/query", name: "编辑采购订单" }
|
410
|
|
- ],
|
411
|
|
- showTwo:true,
|
412
|
|
- showOne:false,
|
413
|
|
- recordInfo: {
|
414
|
|
- tableList:[],
|
415
|
|
- },
|
416
|
|
- keywords: "",
|
417
|
|
- total: 0,
|
418
|
|
- multipleSelection: [],
|
419
|
|
- signAndWeighBoxPatients: "sign-and-weigh-box-patients",
|
420
|
|
- start_time: "",
|
421
|
|
- end_time: "",
|
422
|
|
- page: 1,
|
423
|
|
- limit: 10,
|
424
|
|
- goodType: [],
|
425
|
|
- goodInfo: [],
|
426
|
|
- org_id:0,
|
427
|
|
- types:[],
|
428
|
|
- tyep_name:"",
|
429
|
|
- form:{
|
430
|
|
- manufacturer_id:"",
|
431
|
|
- },
|
432
|
|
- tabList:[],
|
433
|
|
- manufactuerList:[],
|
434
|
|
- currentIndex: 0,
|
435
|
|
- goodTypeList:[],
|
436
|
|
- drugTypeList:[],
|
437
|
|
- supplier_name:"",
|
438
|
|
- supplyList:[],
|
439
|
|
- rate_of_concession:"",
|
440
|
|
- discount_amount:"",
|
441
|
|
- tableRules: {
|
442
|
|
- name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
|
443
|
|
- supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
|
444
|
|
- },
|
445
|
|
- warehousing_id:0,
|
446
|
|
- number:"",
|
447
|
|
- loading:false,
|
448
|
|
- drugList:[],
|
449
|
|
- goodList:[],
|
450
|
|
- id:0,
|
451
|
|
- disabled:false,
|
452
|
|
- is_check:0,
|
453
|
|
- dialogVisible:false,
|
454
|
|
- total_price:0,
|
455
|
|
- showOne:true,
|
456
|
|
- showTwo:true,
|
457
|
|
- showThree:false,
|
458
|
|
- orderList:[],
|
459
|
|
- };
|
460
|
|
-},
|
461
|
|
-methods:{
|
462
|
|
-
|
463
|
|
-getInitOrder(){
|
464
|
|
- getInitOrder().then(response=>{
|
465
|
|
- if(response.data.state == 1){
|
466
|
|
- var drugList = response.data.data.drugList
|
467
|
|
- this.manufactuerList = response.data.data.manufactuerList
|
468
|
|
- this.goodTypeList = response.data.data.goodTypeList
|
469
|
|
- this.drugTypeList = response.data.data.drugTypeList
|
470
|
|
- this.supplyList = response.data.data.supplyList
|
471
|
|
- for(let i=0;i<drugList.length;i++){
|
472
|
|
- for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
|
473
|
|
- if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
|
474
|
|
- drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
|
475
|
|
- }
|
476
|
|
- for (let j = 0; j < this.manufactuerList.length; j++) {
|
477
|
|
- if (drugList[i].manufacturer == this.manufactuerList[j].id) {
|
478
|
|
- drugList[i].manufacturer =
|
479
|
|
- this.manufactuerList[j].manufacturer_name;
|
|
400
|
+ name: "addPurchaseOrder",
|
|
401
|
+ components: {
|
|
402
|
+ BreadCrumb,
|
|
403
|
+ },
|
|
404
|
+ data() {
|
|
405
|
+ return {
|
|
406
|
+ Reviewed: false,
|
|
407
|
+ crumbs: [
|
|
408
|
+ { path: false, name: "采购订单" },
|
|
409
|
+ { path: "/supply/query", name: "编辑采购订单" },
|
|
410
|
+ ],
|
|
411
|
+ showTwo: true,
|
|
412
|
+ showOne: false,
|
|
413
|
+ recordInfo: {
|
|
414
|
+ tableList: [],
|
|
415
|
+ },
|
|
416
|
+ keywords: "",
|
|
417
|
+ total: 0,
|
|
418
|
+ multipleSelection: [],
|
|
419
|
+ signAndWeighBoxPatients: "sign-and-weigh-box-patients",
|
|
420
|
+ start_time: "",
|
|
421
|
+ end_time: "",
|
|
422
|
+ page: 1,
|
|
423
|
+ limit: 10,
|
|
424
|
+ goodType: [],
|
|
425
|
+ goodInfo: [],
|
|
426
|
+ org_id: 0,
|
|
427
|
+ types: [],
|
|
428
|
+ tyep_name: "",
|
|
429
|
+ form: {
|
|
430
|
+ manufacturer_id: "",
|
|
431
|
+ },
|
|
432
|
+ tabList: [],
|
|
433
|
+ manufactuerList: [],
|
|
434
|
+ currentIndex: 0,
|
|
435
|
+ goodTypeList: [],
|
|
436
|
+ drugTypeList: [],
|
|
437
|
+ supplier_name: "",
|
|
438
|
+ supplyList: [],
|
|
439
|
+ rate_of_concession: "",
|
|
440
|
+ discount_amount: "",
|
|
441
|
+ tableRules: {
|
|
442
|
+ name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
|
|
443
|
+ supply_count: [
|
|
444
|
+ { required: true, message: "数量不能为空", trigger: "blur" },
|
|
445
|
+ ],
|
|
446
|
+ },
|
|
447
|
+ warehousing_id: 0,
|
|
448
|
+ number: "",
|
|
449
|
+ loading: false,
|
|
450
|
+ drugList: [],
|
|
451
|
+ goodList: [],
|
|
452
|
+ id: 0,
|
|
453
|
+ disabled: false,
|
|
454
|
+ is_check: 0,
|
|
455
|
+ dialogVisible: false,
|
|
456
|
+ total_price: 0,
|
|
457
|
+ showOne: true,
|
|
458
|
+ showTwo: true,
|
|
459
|
+ showThree: false,
|
|
460
|
+ orderList: [],
|
|
461
|
+ };
|
|
462
|
+ },
|
|
463
|
+ methods: {
|
|
464
|
+ getInitOrder() {
|
|
465
|
+ getInitOrder().then((response) => {
|
|
466
|
+ var drugList = response.data.data.drugList;
|
|
467
|
+ this.manufactuerList = response.data.data.manufactuerList;
|
|
468
|
+ this.goodTypeList = response.data.data.goodTypeList;
|
|
469
|
+ this.drugTypeList = response.data.data.drugTypeList;
|
|
470
|
+ this.supplyList = response.data.data.supplyList;
|
|
471
|
+ if (response.data.state == 1) {
|
|
472
|
+ var drugList = response.data.data.drugList;
|
|
473
|
+ this.manufactuerList = response.data.data.manufactuerList;
|
|
474
|
+ this.goodTypeList = response.data.data.goodTypeList;
|
|
475
|
+ this.drugTypeList = response.data.data.drugTypeList;
|
|
476
|
+ this.supplyList = response.data.data.supplyList;
|
|
477
|
+ for (let i = 0; i < drugList.length; i++) {
|
|
478
|
+ for (let z = 0; z < drugList[i].drug_warehouse_info.length; z++) {
|
|
479
|
+ if (
|
|
480
|
+ drugList[i].max_unit ==
|
|
481
|
+ drugList[i].drug_warehouse_info[z].max_unit
|
|
482
|
+ ) {
|
|
483
|
+ drugList[i].drug_warehouse_info[z].stock_max_number =
|
|
484
|
+ drugList[i].drug_warehouse_info[z].stock_max_number *
|
|
485
|
+ drugList[i].min_number;
|
480
|
486
|
}
|
481
|
|
- }
|
482
|
|
- for (let y = 0; y < this.drugTypeList.length; y++) {
|
483
|
|
- if (drugList[i].drug_type == this.drugTypeList[y].value) {
|
484
|
|
- drugList[i].drug_type = this.drugTypeList[y].name;
|
|
487
|
+ for (let j = 0; j < this.manufactuerList.length; j++) {
|
|
488
|
+ if (drugList[i].manufacturer == this.manufactuerList[j].id) {
|
|
489
|
+ drugList[i].manufacturer =
|
|
490
|
+ this.manufactuerList[j].manufacturer_name;
|
|
491
|
+ }
|
485
|
492
|
}
|
486
|
|
- }
|
487
|
|
- drugList[i].supply_name =
|
488
|
|
- drugList[i].drug_name +
|
489
|
|
- " " +
|
490
|
|
- drugList[i].dose +
|
491
|
|
- drugList[i].dose_unit +
|
492
|
|
- "*" +
|
493
|
|
- drugList[i].min_number +
|
494
|
|
- drugList[i].min_unit +
|
495
|
|
- "/" +
|
496
|
|
- drugList[i].max_unit +
|
497
|
|
- " " +
|
498
|
|
- drugList[i].manufacturer;
|
499
|
|
- drugList[i].supply_type = drugList[i].drug_type;
|
500
|
|
- drugList[i].supply_specification_name =
|
501
|
|
- drugList[i].dose +
|
502
|
|
- drugList[i].dose_unit +
|
503
|
|
- "*" +
|
504
|
|
- drugList[i].min_number +
|
505
|
|
- drugList[i].min_unit +
|
506
|
|
- "/" +
|
507
|
|
- drugList[i].max_unit;
|
508
|
|
- drugList[i].supply_total = this.getWarehoseInfo(
|
509
|
|
- drugList[i].drug_warehouse_info,
|
510
|
|
- drugList[i].max_unit,
|
511
|
|
- drugList[i].min_unit,
|
512
|
|
- drugList[i].min_number
|
513
|
|
- );
|
514
|
|
- drugList[i].supply_count = "";
|
515
|
|
- drugList[i].supply_total_price = "";
|
516
|
|
- drugList[i].supply_manufacturer = drugList[i].manufacturer;
|
517
|
|
- drugList[i].supply_license_number = drugList[i].number;
|
518
|
|
- drugList[i].supply_remake = "";
|
519
|
|
- drugList[i].type = 1;
|
520
|
|
- drugList[i].supply_price = drugList[i].last_price;
|
521
|
|
- drugList[i].name = drugList[i].drug_name;
|
522
|
|
- drugList[i].unitList = [
|
523
|
|
- { id: 1, name: "" },
|
524
|
|
- { id: 2, name: "" },
|
525
|
|
- ];
|
526
|
|
- drugList[i].supply_unit = drugList[i].max_unit;
|
527
|
|
- for (let j = 0; j < drugList[i].unitList.length; j++) {
|
528
|
|
- drugList[i].unitList[0].name = drugList[i].max_unit;
|
529
|
|
- drugList[i].unitList[1].name = drugList[i].min_unit;
|
530
|
|
- }
|
531
|
|
- this.tabList.push(drugList[i]);
|
532
|
|
- }
|
533
|
|
- this.drugList = drugList;
|
534
|
|
- var goodList = response.data.data.goodList;
|
535
|
|
- for (let i = 0; i < goodList.length; i++) {
|
536
|
|
- for (let j = 0; j < this.manufactuerList.length; j++) {
|
537
|
|
- if (goodList[i].manufacturer == this.manufactuerList[j].id) {
|
538
|
|
- goodList[i].manufacturer =
|
539
|
|
- this.manufactuerList[j].manufacturer_name;
|
|
493
|
+ for (let y = 0; y < this.drugTypeList.length; y++) {
|
|
494
|
+ if (drugList[i].drug_type == this.drugTypeList[y].value) {
|
|
495
|
+ drugList[i].drug_type = this.drugTypeList[y].name;
|
|
496
|
+ }
|
540
|
497
|
}
|
541
|
|
- }
|
542
|
|
- for (let y = 0; y < this.goodTypeList.length; y++) {
|
543
|
|
- if (goodList[i].good_type_id == this.goodTypeList[y].id) {
|
544
|
|
- goodList[i].good_type_id = this.goodTypeList[y].type_name;
|
|
498
|
+ drugList[i].supply_name =
|
|
499
|
+ drugList[i].drug_name +
|
|
500
|
+ " " +
|
|
501
|
+ drugList[i].dose +
|
|
502
|
+ drugList[i].dose_unit +
|
|
503
|
+ "*" +
|
|
504
|
+ drugList[i].min_number +
|
|
505
|
+ drugList[i].min_unit +
|
|
506
|
+ "/" +
|
|
507
|
+ drugList[i].max_unit +
|
|
508
|
+ " " +
|
|
509
|
+ drugList[i].manufacturer;
|
|
510
|
+ drugList[i].supply_type = drugList[i].drug_type;
|
|
511
|
+ drugList[i].supply_specification_name =
|
|
512
|
+ drugList[i].dose +
|
|
513
|
+ drugList[i].dose_unit +
|
|
514
|
+ "*" +
|
|
515
|
+ drugList[i].min_number +
|
|
516
|
+ drugList[i].min_unit +
|
|
517
|
+ "/" +
|
|
518
|
+ drugList[i].max_unit;
|
|
519
|
+ drugList[i].supply_total = this.getWarehoseInfo(
|
|
520
|
+ drugList[i].drug_warehouse_info,
|
|
521
|
+ drugList[i].max_unit,
|
|
522
|
+ drugList[i].min_unit,
|
|
523
|
+ drugList[i].min_number
|
|
524
|
+ );
|
|
525
|
+ drugList[i].supply_count = "";
|
|
526
|
+ drugList[i].supply_total_price = "";
|
|
527
|
+ drugList[i].supply_manufacturer = drugList[i].manufacturer;
|
|
528
|
+ drugList[i].supply_license_number = drugList[i].number;
|
|
529
|
+ drugList[i].supply_remake = "";
|
|
530
|
+ drugList[i].type = 1;
|
|
531
|
+ drugList[i].supply_price = drugList[i].last_price;
|
|
532
|
+ drugList[i].name = drugList[i].drug_name;
|
|
533
|
+ drugList[i].unitList = [
|
|
534
|
+ { id: 1, name: "" },
|
|
535
|
+ { id: 2, name: "" },
|
|
536
|
+ ];
|
|
537
|
+ drugList[i].supply_unit = drugList[i].max_unit;
|
|
538
|
+ for (let j = 0; j < drugList[i].unitList.length; j++) {
|
|
539
|
+ drugList[i].unitList[0].name = drugList[i].max_unit;
|
|
540
|
+ drugList[i].unitList[1].name = drugList[i].min_unit;
|
545
|
541
|
}
|
|
542
|
+ this.tabList.push(drugList[i]);
|
546
|
543
|
}
|
547
|
|
- goodList[i].supply_name =
|
548
|
|
- goodList[i].good_name +
|
549
|
|
- " " +
|
550
|
|
- goodList[i].specification_name +
|
551
|
|
- " " +
|
552
|
|
- goodList[i].manufacturer;
|
553
|
|
- goodList[i].supply_type = goodList[i].good_type_id;
|
554
|
|
- goodList[i].supply_specification_name =
|
555
|
|
- goodList[i].specification_name;
|
556
|
|
- goodList[i].supply_price = goodList[i].buy_price;
|
557
|
|
- goodList[i].supply_total = this.getTotalStockCount(
|
558
|
|
- goodList[i].good_warehouse_info
|
559
|
|
- );
|
560
|
|
- goodList[i].supply_count = "";
|
561
|
|
- goodList[i].supply_total_price = "";
|
562
|
|
- goodList[i].supply_manufacturer = goodList[i].manufacturer;
|
563
|
|
- goodList[i].supply_license_number = "";
|
564
|
|
- goodList[i].supply_remake = "";
|
565
|
|
- goodList[i].type = 2;
|
566
|
|
- goodList[i].name = goodList[i].good_name;
|
567
|
|
- goodList[i].unitList = [
|
568
|
|
- { id: 1, name: "" },
|
569
|
|
- { id: 2, name: "" },
|
570
|
|
- ];
|
571
|
|
- goodList[i].supply_unit = goodList[i].packing_unit;
|
572
|
|
- for (let j = 0; j < goodList[i].unitList.length; j++) {
|
573
|
|
- goodList[i].unitList[0].name = goodList[i].packing_unit;
|
|
544
|
+ this.drugList = drugList;
|
|
545
|
+ var goodList = response.data.data.goodList;
|
|
546
|
+ for (let i = 0; i < goodList.length; i++) {
|
|
547
|
+ for (let j = 0; j < this.manufactuerList.length; j++) {
|
|
548
|
+ if (goodList[i].manufacturer == this.manufactuerList[j].id) {
|
|
549
|
+ goodList[i].manufacturer =
|
|
550
|
+ this.manufactuerList[j].manufacturer_name;
|
|
551
|
+ }
|
|
552
|
+ }
|
|
553
|
+ for (let y = 0; y < this.goodTypeList.length; y++) {
|
|
554
|
+ if (goodList[i].good_type_id == this.goodTypeList[y].id) {
|
|
555
|
+ goodList[i].good_type_id = this.goodTypeList[y].type_name;
|
|
556
|
+ }
|
|
557
|
+ }
|
|
558
|
+ goodList[i].supply_name =
|
|
559
|
+ goodList[i].good_name +
|
|
560
|
+ " " +
|
|
561
|
+ goodList[i].specification_name +
|
|
562
|
+ " " +
|
|
563
|
+ goodList[i].manufacturer;
|
|
564
|
+ goodList[i].supply_type = goodList[i].good_type_id;
|
|
565
|
+ goodList[i].supply_specification_name =
|
|
566
|
+ goodList[i].specification_name;
|
|
567
|
+ goodList[i].supply_price = goodList[i].buy_price;
|
|
568
|
+ goodList[i].supply_total = this.getTotalStockCount(
|
|
569
|
+ goodList[i].good_warehouse_info
|
|
570
|
+ );
|
|
571
|
+ goodList[i].supply_count = "";
|
|
572
|
+ goodList[i].supply_total_price = "";
|
|
573
|
+ goodList[i].supply_manufacturer = goodList[i].manufacturer;
|
|
574
|
+ goodList[i].supply_license_number = "";
|
|
575
|
+ goodList[i].supply_remake = "";
|
|
576
|
+ goodList[i].type = 2;
|
|
577
|
+ goodList[i].name = goodList[i].good_name;
|
|
578
|
+ goodList[i].unitList = [
|
|
579
|
+ { id: 1, name: "" },
|
|
580
|
+ { id: 2, name: "" },
|
|
581
|
+ ];
|
|
582
|
+ goodList[i].supply_unit = goodList[i].packing_unit;
|
|
583
|
+ for (let j = 0; j < goodList[i].unitList.length; j++) {
|
|
584
|
+ goodList[i].unitList[0].name = goodList[i].packing_unit;
|
|
585
|
+ }
|
|
586
|
+ this.tabList.push(goodList[i]);
|
574
|
587
|
}
|
575
|
|
- this.tabList.push(goodList[i]);
|
|
588
|
+ this.goodList = goodList;
|
576
|
589
|
}
|
577
|
|
- this.goodList = goodList;
|
578
|
|
- console.log(this.goodList, "oo");
|
579
|
590
|
}
|
580
|
591
|
});
|
581
|
592
|
},
|
|
593
|
+
|
582
|
594
|
changeGoodName(val) {
|
583
|
595
|
this.currentIndex = val;
|
584
|
596
|
},
|
|
@@ -1044,7 +1056,7 @@ getInitOrder(){
|
1044
|
1056
|
this.getInitOrder();
|
1045
|
1057
|
this.getPurchaseOrderDetail();
|
1046
|
1058
|
|
1047
|
|
- this.getAllPrice()
|
|
1059
|
+ this.getAllPrice();
|
1048
|
1060
|
},
|
1049
|
1061
|
};
|
1050
|
1062
|
</script>
|
|
@@ -1104,7 +1116,7 @@ getInitOrder(){
|
1104
|
1116
|
bottom: 20px;
|
1105
|
1117
|
height: 100%;
|
1106
|
1118
|
}
|
1107
|
|
-.reviewImg{
|
|
1119
|
+.reviewImg {
|
1108
|
1120
|
position: fixed;
|
1109
|
1121
|
left: 50%;
|
1110
|
1122
|
transform: translateX(-50%);
|