Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
629a812a98

+ 18 - 0
src/router/modules/supply.js View File

@@ -127,6 +127,24 @@ export default {
127 127
       hidden: true,
128 128
       is_menu: false,
129 129
       isChild: true
130
+    },
131
+    {
132
+      path: '/good/return/print',
133
+      component: () => import('@/xt_pages/supply/components/goodReturnPrint'),
134
+      name: 'goodReturnPrint',
135
+      meta: { title: 'goodReturnPrint', noCache: true },
136
+      hidden: true,
137
+      is_menu: false,
138
+      isChild: true
139
+    },
140
+    {
141
+      path: '/good/order/print',
142
+      component: () => import('@/xt_pages/supply/components/goodOrderPrint'),
143
+      name: 'goodOrderPrint',
144
+      meta: { title: 'goodOrderPrint', noCache: true },
145
+      hidden: true,
146
+      is_menu: false,
147
+      isChild: true
130 148
     }
131 149
 
132 150
   ]

+ 4 - 4
src/views/layout/Layout.vue View File

@@ -17,10 +17,10 @@
17 17
           <p>透析管理</p>
18 18
         </div>
19 19
 
20
-<!--        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">-->
21
-<!--          <i class="iconfont icon-kccx navIcon"></i>-->
22
-<!--          <p>采购管理</p>-->
23
-<!--       </div>-->
20
+       <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
21
+         <i class="iconfont icon-kccx navIcon"></i>
22
+        <p>采购管理</p>
23
+       </div>
24 24
 
25 25
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
26 26
           <i class="iconfont icon-kccx navIcon"></i>

+ 6 - 3
src/xt_pages/supply/components/addGoodOrder.vue View File

@@ -76,6 +76,7 @@
76 76
           <el-button size="small" type="primary" @click="checkGoodOrder" v-if="is_check == 2" >审核</el-button>
77 77
           <el-button size="small" type="primary" @click="MofyGoodOrder" v-if="is_check == 1">反审核</el-button>
78 78
           <el-button size="small" type="primary" @click="toClick" v-if="is_check == 1" >生成采购退货单</el-button>
79
+          <el-button size="small" type="primary" @click="toPrint" v-show="showSix" >打印</el-button>
79 80
         </div>
80 81
       </div>
81 82
 
@@ -553,7 +554,8 @@ export default {
553 554
       warese_out_id: 0,
554 555
       return_remark: "",
555 556
       is_warehouse:0,
556
-      tableDataList:[]
557
+      tableDataList:[],
558
+      showSix:false,
557 559
     };
558 560
   },
559 561
    watch: {
@@ -950,8 +952,7 @@ export default {
950 952
       });
951 953
     },
952 954
     toPrint() {
953
-      var id = this.$route.query.id;
954
-      this.$router.push({ path: "/purchase/order/print?&id=" + id });
955
+      this.$router.push({ path: "/good/order/print?&id=" + this.id });
955 956
     },
956 957
     saveGoodOrder() {
957 958
       if (this.supplier_name == 0 || this.supplier_name == "") {
@@ -1014,6 +1015,7 @@ export default {
1014 1015
               this.$message.success("保存成功!");
1015 1016
               this.showOne = false;
1016 1017
               this.showTwo = true;
1018
+              this.showSix = true
1017 1019
               var orderInfo = response.data.data.list;
1018 1020
               var warehouseOut = response.data.data.warehouseOut;
1019 1021
               this.is_check = 2
@@ -1027,6 +1029,7 @@ export default {
1027 1029
               this.supplier_name = warehouseOut.supplier_id;
1028 1030
               this.return_remake = warehouseOut.return_remake;
1029 1031
               this.warehousing_id  = warehouseOut.warehousing_id
1032
+              this.id = warehouseOut.id
1030 1033
               this.start_time = this.getTimes(warehouseOut.document_date);
1031 1034
               for (let i = 0; i < orderInfo.length; i++) {
1032 1035
                 orderInfo[i].supply_count = orderInfo[i].count;

+ 56 - 13
src/xt_pages/supply/components/addGoodReturn.vue View File

@@ -60,6 +60,13 @@
60 60
             v-show="showTwo"
61 61
             >保存</el-button
62 62
           >
63
+          <el-button
64
+            size="small"
65
+            type="primary"
66
+            @click="toPrint"
67
+            v-show="showSix"
68
+            >打印</el-button
69
+          >
63 70
           <el-button size="small" type="primary" v-if="is_check == 2" @click="checkReturnOrder">审核</el-button>
64 71
           <el-button size="small" type="primary" v-if="is_check == 1" @click="modefyReturnOrder">反审核</el-button> 
65 72
         </div>
@@ -468,6 +475,7 @@ export default {
468 475
       showThree:false,
469 476
       tableDataList:[],
470 477
       Reviewed:false,
478
+      showSix:false,
471 479
     };
472 480
   },
473 481
   watch: {
@@ -809,9 +817,7 @@ export default {
809 817
     },
810 818
     count_discount() {
811 819
       this.rate_of_concession = (
812
-        this.discount_amount /
813
-        (this.total_price * 0.01)
814
-      ).toFixed(2);
820
+        this.discount_amount /(this.total_price * 0.01)).toFixed(2);
815 821
     },
816 822
       count_payment() {
817 823
       let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
@@ -945,15 +951,18 @@ export default {
945 951
         }
946 952
       });
947 953
     },
948
-    toPrint() {
949
-      var id = this.$route.query.id;
950
-      this.$router.push({ path: "/purchase/order/print?&id=" + id });
951
-    },
952 954
     saveGoodReturn(){
955
+      this.loading = true
956
+      if (this.supplier_name == 0 || this.supplier_name == "") {
957
+            this.$message.error("供应商不能为空!");
958
+            this.loading = false;
959
+            return false;
960
+       }
953 961
       var warehouse_out_id = this.$route.query.id
954 962
       this.$refs["tableForm"].validate((valid)=>{
955 963
         if(valid){
956
-          this.loading = true
964
+        
965
+        
957 966
           for(let i=0;i<this.recordInfo.tableList.length;i++){
958 967
             if(this.recordInfo.tableList[i].count == ""){
959 968
               this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
@@ -1004,6 +1013,7 @@ export default {
1004 1013
                 this.loading = false
1005 1014
                 this.showOne = false
1006 1015
                 this.showTwo = true
1016
+                this.showSix = true
1007 1017
                 this.is_check = 2
1008 1018
                 this.$message.success("保存成功!")
1009 1019
                 var warehouseCancel = response.data.data.warehouseCancel
@@ -1011,10 +1021,28 @@ export default {
1011 1021
                 this.id = out.id
1012 1022
                 this.warehouse_out_id = out.warehouse_out_id
1013 1023
                 this.supplier_name = out.supplier_id
1014
-                this.rate_of_concession = out.rate_of_concession
1015
-                this.discount_amount = out.discount_amount
1016
-                this.payment = out.payment
1017
-                this.arrearage = out.arrearage
1024
+                if(out.rate_of_concession == 0){
1025
+                  this.rate_of_concession = ""
1026
+                }else{
1027
+                 this.rate_of_concession = out.rate_of_concession
1028
+                }
1029
+                if(out.discount_amount == 0){
1030
+                  this.discount_amount = ""
1031
+                }else{
1032
+                  this.discount_amount = out.discount_amount
1033
+                }
1034
+                if(this.payment == 0){
1035
+                   this.payment  = ""
1036
+                }else{
1037
+                  this.payment = out.payment
1038
+                }
1039
+               
1040
+                if(out.arrearage == 0){
1041
+                   this.arrearage = ""
1042
+                }else{
1043
+                  this.arrearage = out.arrearage
1044
+                }
1045
+               
1018 1046
                 this.start_time = this.getTimes(out.document_date)
1019 1047
                 var orderInfo = response.data.data.list
1020 1048
                 
@@ -1074,11 +1102,23 @@ export default {
1074 1102
       })
1075 1103
     },
1076 1104
     updateGoodReturn(){
1105
+      this.loading = true
1106
+      if (this.supplier_name == 0 || this.supplier_name == "") {
1107
+            this.$message.error("供应商不能为空!");
1108
+            this.loading = false;
1109
+            return false;
1110
+       }
1077 1111
       var warehouse_out_id = this.id;
1078 1112
       this.$refs["tableForm"].validate((valid)=>{
1079 1113
         if(valid){
1080
-          this.loading = true
1114
+         
1115
+        
1081 1116
           for(let i=0;i<this.recordInfo.tableList.length;i++){
1117
+            if(this.recordInfo.tableList[i].count == ""){
1118
+              this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
1119
+              this.loading = false
1120
+              return false
1121
+            }
1082 1122
             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
1083 1123
             this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
1084 1124
             this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
@@ -1215,6 +1255,9 @@ export default {
1215 1255
       }
1216 1256
     
1217 1257
     },
1258
+    toPrint() {
1259
+      this.$router.push({ path: "/good/return/print?&id=" + this.id });
1260
+    },
1218 1261
   },
1219 1262
   created() {
1220 1263
     const tempObj = {};

+ 23 - 4
src/xt_pages/supply/components/editGoodOrder.vue View File

@@ -70,6 +70,12 @@
70 70
             @click="MofyGoodOrder"
71 71
             >反审核</el-button
72 72
           >
73
+          <el-button
74
+            size="small"
75
+            type="primary"
76
+            @click="toPrint"
77
+            >打印</el-button
78
+          >
73 79
         </div>
74 80
       </div>
75 81
 
@@ -950,9 +956,22 @@ export default {
950 956
           this.id = out.id;
951 957
           this.supplier_name = out.supplier_id;
952 958
           this.rate_of_concession = out.rate_of_concession;
953
-          this.discount_amount = out.discount_amount;
954
-          this.payment = out.payment;
955
-          this.arrearage = out.arrearage;
959
+          if(out.discount_amount >0){
960
+           this.discount_amount = out.discount_amount;
961
+          }else{
962
+             this.discount_amount= ""
963
+          }
964
+          if(out.payment > 0){
965
+            this.payment = out.payment;
966
+          }else{
967
+           this.payment = ""
968
+          }
969
+          if(out.arrearage >0){
970
+            this.arrearage = out.arrearage;
971
+          }else{
972
+            this.arrearage = ""
973
+          }
974
+          
956 975
           this.number = out.number;
957 976
           this.good_number = out.good_number;
958 977
           this.return_remark = out.return_remake;
@@ -1049,7 +1068,7 @@ export default {
1049 1068
     },
1050 1069
     toPrint() {
1051 1070
       var id = this.$route.query.id;
1052
-      this.$router.push({ path: "/purchase/order/print?&id=" + id });
1071
+      this.$router.push({ path: "/good/order/print?&id=" + id });
1053 1072
     },
1054 1073
     updateGoodOrder() {
1055 1074
       if (this.supplier_name == 0 || this.supplier_name == "") {

+ 96 - 22
src/xt_pages/supply/components/editGoodReturn.vue View File

@@ -75,6 +75,12 @@
75 75
             v-if="is_check == 1"
76 76
             >反审核</el-button
77 77
           >
78
+          <el-button
79
+            size="small"
80
+            type="primary"
81
+            @click="toPrint"
82
+            >打印</el-button
83
+          >
78 84
         </div>
79 85
       </div>
80 86
 
@@ -792,6 +798,42 @@ export default {
792 798
       }
793 799
       return max_str + min_str;
794 800
     },
801
+    getWarehoseInfoSix(arr, max_unit, min_unit, min_number,supply_warehouse_detail_info) {
802
+      console.log("arr2332232323",arr,max_unit,min_unit,supply_warehouse_detail_info)
803
+      var total = 0;
804
+      var max_str = "";
805
+      var min_str = "";
806
+      var newArr = []
807
+      if (arr.length > 0) {
808
+        for (let i = 0; i < arr.length; i++) {
809
+          if(supply_warehouse_detail_info == arr[i].supply_warehouse_detail_info){
810
+             newArr.push(arr[i])
811
+          }
812
+         
813
+        }
814
+      }
815
+      if(newArr.length >0){
816
+         for (let i = 0; i < newArr.length; i++) {
817
+           total += parseInt(newArr[i].stock_max_number+ newArr[i].stock_min_number);
818
+         }
819
+      }
820
+      if (total < min_number) {
821
+        min_str = total + min_unit;
822
+      }
823
+      if (total == 0) {
824
+        min_str = "";
825
+        max_str = "";
826
+      }
827
+      if (total >= min_number) {
828
+        if (parseInt(total / min_number) != 0) {
829
+          max_str = parseInt(total / min_number) + max_unit;
830
+        }
831
+        if (total % min_number != 0) {
832
+          min_str = (total % min_number) + min_unit;
833
+        }
834
+      }
835
+      return max_str + min_str;
836
+    },
795 837
     getWarehoseInfoTwo(arr, max_unit, min_unit, min_number){
796 838
       var total = 0;
797 839
       if (arr.length > 0) {
@@ -996,10 +1038,32 @@ export default {
996 1038
           this.is_check = out.is_check;
997 1039
           this.id = out.id;
998 1040
           this.supplier_name = out.supplier_id;
999
-          this.rate_of_concession = out.rate_of_concession;
1000
-          this.discount_amount = out.discount_amount;
1001
-          this.payment = out.payment;
1002
-          this.arrearage = out.arrearage;
1041
+          if(out.rate_of_concession >0){
1042
+             this.rate_of_concession = out.rate_of_concession;
1043
+          }else{
1044
+             this.rate_of_concession = ""
1045
+          }
1046
+          
1047
+          if(out.discount_amount > 0){
1048
+           this.discount_amount = out.discount_amount;
1049
+          }else{
1050
+             this.discount_amount= ""
1051
+          }
1052
+
1053
+          if(out.payment>0){
1054
+           this.payment = out.payment;
1055
+          }else{
1056
+            this.payment = ""
1057
+          }
1058
+          
1059
+          if(out.arrearage>0){
1060
+            this.arrearage = out.arrearage;
1061
+          }else{
1062
+             this.arrearage = ""
1063
+          }
1064
+          
1065
+          
1066
+         
1003 1067
           this.return_remark = out.return_remark
1004 1068
           this.start_time = this.getTimes(out.document_date);
1005 1069
           var orderInfo = response.data.data.orderCancelDetail;
@@ -1020,37 +1084,45 @@ export default {
1020 1084
             orderInfo[i].supply_unit = orderInfo[i].supply_unit;
1021 1085
             orderInfo[i].order_number = orderInfo[i].order_number;
1022 1086
             orderInfo[i].good_number = orderInfo[i].good_number;
1023
-            orderInfo[i].supply_total_price = (
1024
-              orderInfo[i].count * orderInfo[i].price
1025
-            ).toFixed(2);
1087
+            orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2);
1026 1088
             orderInfo[i].supply_expiry_date = orderInfo[i].supply_expiry_date;
1027 1089
             orderInfo[i].supply_product_date = orderInfo[i].supply_product_date;
1028 1090
             if (orderInfo[i].is_source == 1) {
1029 1091
               for (let j = 0; j < drugList.length; j++) {
1030 1092
                 if (orderInfo[i].project_id == drugList[j].id) {
1031
-                  
1093
+                  for (let z = 0; z < drugList[j].drug_warehouse_info.length; z++) {
1094
+                    if (drugList[j].max_unit == drugList[j].drug_warehouse_info[z].max_unit) {
1095
+                      drugList[j].drug_warehouse_info[z].stock_max_number = drugList[j].drug_warehouse_info[z].stock_max_number *drugList[j].min_number;
1096
+                    }
1097
+                   }
1032 1098
                   if (drugList[j].max_unit != drugList[j].min_unit) {
1033
-                    orderInfo[i].unitList = [{ id: 1, name: "" },{ id: 2, name: "" }];
1034
-                    orderInfo[i].unitList[0].name = drugList[j].max_unit;
1035
-                    orderInfo[i].unitList[1].name = drugList[j].min_unit;
1099
+                      orderInfo[i].unitList = [{ id: 1, name: "" },{ id: 2, name: "" }];
1100
+                      orderInfo[i].unitList[0].name = drugList[j].max_unit;
1101
+                      orderInfo[i].unitList[1].name = drugList[j].min_unit;
1036 1102
                   }
1037 1103
                   if (drugList[j].max_unit == drugList[j].min_unit) {
1038
-                    orderInfo[i].unitList = [{ id: 1, name: "" }];
1039
-                    orderInfo[i].unitList[0].name = drugList[j].max_unit;
1104
+                      orderInfo[i].unitList = [{ id: 1, name: "" }];
1105
+                      orderInfo[i].unitList[0].name = drugList[j].max_unit;
1040 1106
                   }
1041 1107
                   //用来统计数量比大小
1042
-                  if(orderInfo[i].supply_unit == drugList[j].max_unit){
1043
-                    orderInfo[i].sum_count = orderInfo[i].count*drugList[j].min_number
1044
-                  }
1045
-                  if(orderInfo[i].supply_unit == drugList[j].min_unit){
1046
-                     orderInfo[i].sum_count = orderInfo[i].count
1047
-                  }
1108
+                  // if(orderInfo[i].supply_unit == drugList[j].max_unit){
1109
+                  //   orderInfo[i].sum_count = orderInfo[i].count*drugList[j].min_number
1110
+                  // }
1111
+                  // if(orderInfo[i].supply_unit == drugList[j].min_unit){
1112
+                  //    orderInfo[i].sum_count = orderInfo[i].count
1113
+                  // }
1048 1114
                   orderInfo[i].min_number =  drugList[j].min_number
1049 1115
                   orderInfo[i].max_unit =drugList[j].max_unit
1050 1116
                   orderInfo[i].min_unit =drugList[j].min_unit
1117
+                  orderInfo[i].sum_count = this.getWarehoseInfoTwo(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number)
1118
+                  orderInfo[i].count = this.getWarehoseInfoSix(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number,orderInfo[i].supply_warehouse_detail_info)
1119
+                  orderInfo[i].supply_total = this.getWarehoseInfoSix(drugList[j].drug_warehouse_info,drugList[j].max_unit,drugList[j].min_unit,drugList[j].min_number,orderInfo[i].supply_warehouse_detail_info)
1051 1120
                 }
1121
+                
1052 1122
               }
1053
-              orderInfo[i].count = orderInfo[i].count + orderInfo[i].supply_unit
1123
+             // orderInfo[i].count = orderInfo[i].count 
1124
+
1125
+             
1054 1126
             }
1055 1127
             if (orderInfo[i].is_source == 2) {
1056 1128
               for (let j = 0; j < goodList.length; j++) {
@@ -1061,7 +1133,9 @@ export default {
1061 1133
               }
1062 1134
               orderInfo[i].sum_count = orderInfo[i].count
1063 1135
               orderInfo[i].min_number = 0
1064
-              orderInfo[i].count = orderInfo[i].count;
1136
+              //orderInfo[i].count = orderInfo[i].count;
1137
+              orderInfo[i].count = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1138
+              orderInfo[i].supply_total = this.getTotalStockCountTwo(goodList[j].good_warehouse_info);
1065 1139
               orderInfo[i].max_unit =""
1066 1140
               orderInfo[i].min_unit =""
1067 1141
             }
@@ -1075,7 +1149,7 @@ export default {
1075 1149
     },
1076 1150
     toPrint() {
1077 1151
       var id = this.$route.query.id;
1078
-      this.$router.push({ path: "/purchase/order/print?&id=" + id });
1152
+      this.$router.push({ path: "/good/return/print?&id=" + id });
1079 1153
     },
1080 1154
     updateGoodReturn() {
1081 1155
       var warehouse_out_id = this.$route.query.id;

+ 12 - 2
src/xt_pages/supply/components/editPurchaseOrder.vue View File

@@ -844,8 +844,18 @@ export default {
844 844
           this.return_remark = info.return_remake;
845 845
           this.id = info.id;
846 846
           this.supplier_name = info.supplier_id;
847
-          this.rate_of_concession = info.rate_of_concession;
848
-          this.discount_amount = info.discount_amount;
847
+         
848
+          if(info.rate_of_concession >0){
849
+           this.rate_of_concession = info.rate_of_concession;
850
+          }else{
851
+             this.rate_of_concession= ""
852
+          }
853
+          if(info.discount_amount >0){
854
+           this.discount_amount = info.discount_amount;
855
+          }else{
856
+            this.discount_amount= ""
857
+          }
858
+          
849 859
           this.start_time = this.getTimes(info.document_date);
850 860
           this.end_time = this.getTimes(info.delivery_date);
851 861
           var orderInfo = response.data.data.orderInfo;

+ 77 - 30
src/xt_pages/supply/components/purchaseOrderPrint.vue View File

@@ -26,7 +26,7 @@
26 26
               供应商:{{ getSupplyName(supplier_id) }}
27 27
             </div>
28 28
             <div style="margin-bottom: 1px; font-size: 18px">
29
-              单据日期:{{ rate_of_concession }}
29
+              单据日期:{{ getTimes(document_date) }}
30 30
             </div>
31 31
             <div style="margin-bottom: 1px; font-size: 18px">
32 32
               单据编号:{{ number }}
@@ -42,11 +42,8 @@
42 42
                   <td style="line-height: 18px" width="80">商品</td>
43 43
                   <td style="line-height: 18px" width="80">单位</td>
44 44
                   <td style="line-height: 18px" width="80">数量</td>
45
-                  <td style="line-height: 18px" width="80">购货单价</td>
46
-                  <td style="line-height: 18px" width="80">折扣率</td>
47
-                  <td style="line-height: 18px" width="80">折扣额</td>
48
-                  <td style="line-height: 18px" width="60">购物金额</td>
49
-                  <td style="line-height: 18px" width="80">仓库</td>
45
+                  <td style="line-height: 18px" width="80">采购单价</td>
46
+                  <td style="line-height: 18px" width="60">采购金额</td>
50 47
                 </tr>
51 48
               </thead>
52 49
               <tbody>
@@ -66,21 +63,18 @@
66 63
                   <td style="line-height: 18px">
67 64
                     <span>{{ item.price }}</span>
68 65
                   </td>
69
-                  <td style="line-height: 18px">
70
-                    <span>{{ rate_of_concession }}</span>
71
-                  </td>
72
-                  <td style="line-height: 18px">
73
-                    <span>{{ discount_amount }}</span>
74
-                  </td>
75 66
                   <td style="line-height: 18px">
76 67
                     <span>{{ (item.count * item.price).toFixed(2) }}</span>
77 68
                   </td>
78
-                  <td style="line-height: 18px"><span></span></td>
79 69
                 </tr>
80 70
                 <tr>
81
-                  <td>合计</td>
82
-                  <td colspan="12" style="text-align: right"></td>
71
+                  <td colspan="3" style="line-height: 18px">合计</td>
72
+                  <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
73
+                  <td colspan="2" style="line-height: 18px"></td>
83 74
                 </tr>
75
+                 <tr>
76
+                  <td colspan="6" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
77
+                 </tr>
84 78
               </tbody>
85 79
             </table>
86 80
 
@@ -124,17 +118,7 @@
124 118
                 font-size: 18px;
125 119
               "
126 120
             >
127
-              供应商:
128
-            </div>
129
-            <div
130
-              style="
131
-                width: 25%;
132
-                text-align: left;
133
-                margin-bottom: 1px;
134
-                font-size: 18px;
135
-              "
136
-            >
137
-              折扣金额:
121
+              供应商:{{ getSupplyName(supplier_id) }}
138 122
             </div>
139 123
             <div
140 124
               style="
@@ -144,7 +128,7 @@
144 128
                 font-size: 18px;
145 129
               "
146 130
             >
147
-              本次付款:
131
+              优惠率:<span v-if="rate_of_concession>0">{{rate_of_concession}}%</span>
148 132
             </div>
149 133
             <div
150 134
               style="
@@ -154,7 +138,7 @@
154 138
                 font-size: 18px;
155 139
               "
156 140
             >
157
-              本次欠款:
141
+              优惠金额:<span v-if="discount_amount>0">{{discount_amount}}</span>
158 142
             </div>
159 143
             <div
160 144
               style="
@@ -164,7 +148,7 @@
164 148
                 font-size: 18px;
165 149
               "
166 150
             >
167
-              备注:
151
+              备注:{{return_remake}}
168 152
             </div>
169 153
             <div
170 154
               style="
@@ -174,7 +158,7 @@
174 158
                 font-size: 18px;
175 159
               "
176 160
             >
177
-              制单人:
161
+              制单人:{{getXuserName(creater)}}
178 162
             </div>
179 163
             <div
180 164
               style="
@@ -240,6 +224,8 @@ export default {
240 224
       discount_amount: "",
241 225
       supplyList: [],
242 226
       document_date: "",
227
+      return_remake:"",
228
+      creater:""
243 229
     };
244 230
   },
245 231
   methods: {
@@ -320,6 +306,8 @@ export default {
320 306
           this.document_date = info.document_date;
321 307
           var orderInfo = response.data.data.orderInfo;
322 308
           var supplyList = response.data.data.supplyList;
309
+          this.return_remake = info.return_remake
310
+          this.creater = info.creater
323 311
           this.supplyList = supplyList;
324 312
           for (let i = 0; i < orderInfo.length; i++) {
325 313
             orderInfo[i].supply_count = orderInfo[i].count;
@@ -342,6 +330,65 @@ export default {
342 330
       }
343 331
       return name;
344 332
     },
333
+    getTimes(time) {
334
+      if (time === "") {
335
+        return "";
336
+      }
337
+      return uParseTime(time, "{y}-{m}-{d}");
338
+    },
339
+    getAllPrice() {
340
+      var total_price = 0;
341
+      for (let i = 0; i < this.tableList.length; i++) {
342
+        total_price +=(this.tableList[i].price *this.tableList[i].count)
343
+      }
344
+      this.total_price = total_price;
345
+      if(total_price > 0){
346
+         return this.smallToBIG(total_price.toFixed(2));
347
+      }else{
348
+        return ""
349
+      }
350
+     
351
+    },
352
+     smallToBIG(price) {
353
+        let fraction = ['角', '分'];
354
+        let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
355
+        let unit = [['元.', '万,', '亿,'], ['', '拾', '佰', '仟']];
356
+        let head = price < 0 ? '欠' : '';
357
+        price = Math.abs(price);
358
+        console.log("price",price)
359
+        let upper = '';
360
+        for (let i = 0; i < fraction.length; i++) {
361
+          upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
362
+        }
363
+        upper = upper || '整';
364
+        console.log("price",upper)
365
+        price = Math.floor(price);
366
+        for (let i = 0; i < unit[0].length && price > 0; i++) {
367
+          let p = '';
368
+          for (let j = 0; j < unit[1].length && price > 0; j++) {
369
+            p = digit[price % 10] + unit[1][j] + p;
370
+            price = Math.floor(price / 10);
371
+          }
372
+          upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
373
+        }
374
+       
375
+        var zhongwen = head + upper.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
376
+      
377
+        var ztr = zhongwen.replaceAll(".","");
378
+    
379
+        return ztr
380
+      },
381
+     getAllCount(){
382
+      var total = 0
383
+      for(let i=0;i<this.tableList.length;i++){
384
+         total +=this.tableList[i].count
385
+      }  
386
+      if(total > 0){
387
+       return total
388
+      }else{
389
+        return ""
390
+      } 
391
+    },
345 392
   },
346 393
   created() {
347 394
     this.orgName = this.$store.getters.xt_user.org.org_name;

+ 1 - 1
src/xt_pages/supply/goodreturn.vue View File

@@ -347,7 +347,7 @@ export default {
347 347
       var buy_price = 0;
348 348
       if (arr != undefined && arr.length > 0) {
349 349
         for (let i = 0; i < arr.length; i++) {
350
-          buy_price += parseInt(arr[i].supply_count) * arr[i].price;
350
+          buy_price += (parseInt(arr[i].supply_count) * arr[i].price -(parseInt(arr[i].supply_count) * arr[i].price * arr[i].deposit_rate/100));
351 351
         }
352 352
       }
353 353
       return (buy_price - discount_amount).toFixed(2);

+ 1 - 3
src/xt_pages/supply/purchaseOrderQuery.vue View File

@@ -128,7 +128,7 @@
128 128
             <!-- <span v-if="scope.row.is_warehouse == 1">全部入库</span>
129 129
             <span v-if="scope.row.is_warehouse == 2">未入库</span>
130 130
             <span v-if="scope.row.is_warehouse == 3">部分入库</span> -->
131
-          
131
+           <span v-if="scope.row.orderOut!= undefined && scope.row.orderOut.length == 0">未入库</span>
132 132
             <span v-if="scope.row.orderOut!= undefined && scope.row.orderOut.length > 0">
133 133
               <span >
134 134
                 <span v-if="getStatus(scope.row.orderOut) == 0">未入库</span>
@@ -137,8 +137,6 @@
137 137
                   <span v-if="getStatus(scope.row.orderOut) < getAllCount(scope.row.orderInfo) ">部分入库</span>
138 138
                 </span>
139 139
               </span> 
140
-              
141
-              
142 140
             </span> 
143 141
           </template>
144 142
         </el-table-column>

+ 4 - 5
src/xt_pages/user/doctorAdvice.vue View File

@@ -3450,6 +3450,7 @@ export default {
3450 3450
     },
3451 3451
 
3452 3452
     selectAdvice(selection, row) {
3453
+      console.log("row322232322323",row)
3453 3454
       if (this.adviceType != 3) {
3454 3455
         this.lstableData = [];
3455 3456
       } else if (this.adviceType != 1) {
@@ -3489,6 +3490,7 @@ export default {
3489 3490
       // console.log("val", val);
3490 3491
     },
3491 3492
     printThisInfo() {
3493
+       console.log("hh233233",this.adviceType)
3492 3494
       if (this.adviceType == 1) {
3493 3495
         if (this.cqtableData.length == 0) {
3494 3496
           this.$message.error("请勾选需要打印的医嘱!");
@@ -4345,11 +4347,8 @@ export default {
4345 4347
       getAllAdviceConfig().then(response => {
4346 4348
         if (response.data.state == 1) {
4347 4349
           this.deliveryWayOptions =
4348
-            response.data.data.drugways === null
4349
-              ? []
4350
-              : response.data.data.drugways;
4351
-          this.executionFrequencyOptions =
4352
-            response.data.data.efs === null ? [] : response.data.data.efs;
4350
+            response.data.data.drugways === null? []: response.data.data.drugways;
4351
+          this.executionFrequencyOptions = response.data.data.efs === null ? [] : response.data.data.efs;
4353 4352
         }
4354 4353
       });
4355 4354
     },