Browse Source

新分支

28169 10 months ago
parent
commit
60b8658024

+ 10 - 0
src/api/drug/drug.js View File

652
     params: params
652
     params: params
653
   })
653
   })
654
 }
654
 }
655
+
656
+
657
+export function getPurchaseStockQueryList(params){
658
+  
659
+  return request({
660
+    url:"/api/stock/getpurchasestockquerylist",
661
+    method:"Get",
662
+    params:params,
663
+  })
664
+}

+ 5 - 0
src/xt_pages/dialysis/details/assessmentAfter.vue View File

338
           <label>灌流器凝血: </label>
338
           <label>灌流器凝血: </label>
339
           <span class="content" >{{ this.record.condenser}}</span>
339
           <span class="content" >{{ this.record.condenser}}</span>
340
         </li>
340
         </li>
341
+
342
+        <li v-if="isShow('上次透后体重')">
343
+          <label>上次透后体重: </label>
344
+          <span class="content" >{{ this.record.last_after_weight}}</span>
345
+        </li>
341
       </ul>
346
       </ul>
342
     </div>
347
     </div>
343
     <!-- <div class="note">
348
     <!-- <div class="note">

+ 14 - 1
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue View File

58
             </el-form-item>
58
             </el-form-item>
59
           </el-col>
59
           </el-col>
60
 
60
 
61
+          <el-col :span="8" v-if="isShow('上次透后体重')">
62
+            <el-form-item label="上次透后体重(kg): " :prop="isName('上次透后体重')" :rules="isCheckmust('上次透后体重')">
63
+              <el-input v-model="form.last_after_weight"></el-input>
64
+            </el-form-item>
65
+          </el-col>
66
+
61
           <el-col :span="8" v-if="isShow('穿刺处血肿')">
67
           <el-col :span="8" v-if="isShow('穿刺处血肿')">
62
             <el-form-item label="穿刺处血肿: " :prop="isName('穿刺处血肿')" :rules="isCheckmust('穿刺处血肿')">
68
             <el-form-item label="穿刺处血肿: " :prop="isName('穿刺处血肿')" :rules="isCheckmust('穿刺处血肿')">
63
               <el-radio-group v-model="form.puncture_point_haematoma">
69
               <el-radio-group v-model="form.puncture_point_haematoma">
879
         after_urea:"",
885
         after_urea:"",
880
         accumulated_blood_volume:"",
886
         accumulated_blood_volume:"",
881
         transfusion_volume:"",
887
         transfusion_volume:"",
882
-        condenser:""
888
+        condenser:"",
889
+        last_after_weight:""
883
       },
890
       },
884
       lapseList:[],
891
       lapseList:[],
885
       leaveOfficeMethod:[],
892
       leaveOfficeMethod:[],
1221
           data["accumulated_blood_volume"] = this.form.accumulated_blood_volume
1228
           data["accumulated_blood_volume"] = this.form.accumulated_blood_volume
1222
           data["transfusion_volume"] = this.form.transfusion_volume
1229
           data["transfusion_volume"] = this.form.transfusion_volume
1223
           data["condenser"] = this.form.condenser
1230
           data["condenser"] = this.form.condenser
1231
+          if(this.form.last_after_weight >0){
1232
+            data["last_after_weight"] = this.form.last_after_weight.toString()
1233
+          }else{
1234
+            data["last_after_weight"] = ""
1235
+          }
1236
+         
1224
           console.log("Paramsquery",data)
1237
           console.log("Paramsquery",data)
1225
 
1238
 
1226
           postAssessmentAfterDislysis(ParamsQuery, data)
1239
           postAssessmentAfterDislysis(ParamsQuery, data)

+ 2 - 3
src/xt_pages/stock/query/purchaseNewStockQuery.vue View File

1060
            const filterVal = ['index','good_number', 'query_date', 'good_type','good_name','specification_name_one','manufacturer_name','dealer_name','stockIn','stock_in_price','stockMoney','stockAdd','addStockMoney','saleStockMoney','outStock','stockOutprice','saleOutMoney','overStock','overPrice','overMoney']
1060
            const filterVal = ['index','good_number', 'query_date', 'good_type','good_name','specification_name_one','manufacturer_name','dealer_name','stockIn','stock_in_price','stockMoney','stockAdd','addStockMoney','saleStockMoney','outStock','stockOutprice','saleOutMoney','overStock','overPrice','overMoney']
1061
     
1061
     
1062
            const data = this.formatJson(filterVal, this.tableList)
1062
            const data = this.formatJson(filterVal, this.tableList)
1063
-           
1063
+        
1064
            const filename = '进销存查询'
1064
            const filename = '进销存查询'
1065
-     
1066
-          
1065
+            
1067
             excel.export_json_to_excel({
1066
             excel.export_json_to_excel({
1068
               multiHeader,
1067
               multiHeader,
1069
               header,
1068
               header,

+ 74 - 46
src/xt_pages/stock/query/purchaseStockQuery.vue View File

53
           <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
53
           <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
54
          </div>
54
          </div>
55
          <div>
55
          <div>
56
+       
56
            <el-button type="primary" size="small" @click="toPrint">打印</el-button>
57
            <el-button type="primary" size="small" @click="toPrint">打印</el-button>
57
            <el-button type="primary" size="small" @click="exportList">导出</el-button>
58
            <el-button type="primary" size="small" @click="exportList">导出</el-button>
58
          </div>
59
          </div>
68
             :class="signAndWeighBoxPatients"
69
             :class="signAndWeighBoxPatients"
69
             border
70
             border
70
           >
71
           >
72
+        
71
             <el-table-column label="耗材类型" align="center">
73
             <el-table-column label="耗材类型" align="center">
72
               <template slot-scope="scope">
74
               <template slot-scope="scope">
73
                  {{getGoodTypeName(scope.row.good_type_id)}}
75
                  {{getGoodTypeName(scope.row.good_type_id)}}
74
               </template>
76
               </template>
75
             </el-table-column>
77
             </el-table-column>
78
+            <el-table-column label="耗材编码" align="center">
79
+              <template slot-scope="scope">
80
+                <span v-if="scope.row.good_number>0">{{ scope.row.good_number?scope.row.good_number:"" }}</span> 
81
+              </template>
82
+            </el-table-column>
76
             <el-table-column label="耗材名称" align="center">
83
             <el-table-column label="耗材名称" align="center">
77
               <template slot-scope="scope">
84
               <template slot-scope="scope">
78
                 {{scope.row.good_name}}
85
                 {{scope.row.good_name}}
79
               </template>
86
               </template>
80
             </el-table-column>
87
             </el-table-column>
88
+
81
             <el-table-column label="规格&单位" align="center">
89
             <el-table-column label="规格&单位" align="center">
82
                 <template slot-scope="scope">
90
                 <template slot-scope="scope">
83
                   {{scope.row.specification_name}}/{{scope.row.packing_unit}}
91
                   {{scope.row.specification_name}}/{{scope.row.packing_unit}}
88
                  {{getManufacturName(scope.row.manufacturer)}}
96
                  {{getManufacturName(scope.row.manufacturer)}}
89
               </template>
97
               </template>
90
             </el-table-column>
98
             </el-table-column>
99
+            <el-table-column label="经销商" align="center">
100
+              <template slot-scope="scope">
101
+                 {{getDearName(scope.row.dealer)}}
102
+              </template>
103
+            </el-table-column>
104
+
105
+            <el-table-column label="单位" align="center">
106
+              <template slot-scope="scope">
107
+                 {{scope.row.packing_unit}}
108
+              </template>
109
+            </el-table-column>
91
             <el-table-column label="期初结余" align="center">
110
             <el-table-column label="期初结余" align="center">
92
                
111
                
93
                  <el-table-column prop="stockIn" label="数量" width="100">
112
                  <el-table-column prop="stockIn" label="数量" width="100">
157
   </div>
176
   </div>
158
 </template>
177
 </template>
159
 <script>
178
 <script>
160
-import { getStorehouseList,getPurchaseStockQuery } from "@/api/drug/drug"
179
+import { getStorehouseList,getPurchaseStockQueryList,getGoodOverCount } from "@/api/drug/drug"
161
 import {
180
 import {
162
   getStockDrugCount
181
   getStockDrugCount
163
 } from "@/api/stock";
182
 } from "@/api/stock";
201
      loading:false,
220
      loading:false,
202
      pickerOptions:{ //禁用当前日期之前的日期
221
      pickerOptions:{ //禁用当前日期之前的日期
203
            disabledDate(v) {
222
            disabledDate(v) {
204
-            return v.getTime() < 1667232000000
223
+            return v.getTime() < 1667491200000
205
           },
224
           },
206
       },
225
       },
226
+     dealerList:[],
207
     }
227
     }
208
   
228
   
209
   },
229
   },
231
              this.goodTypeList.push(goodTypeList[i])
251
              this.goodTypeList.push(goodTypeList[i])
232
             }
252
             }
233
            this.patientList = response.data.data.patientList
253
            this.patientList = response.data.data.patientList
254
+           this.dealerList = response.data.data.dealerList
234
          }
255
          }
235
       })
256
       })
236
     },
257
     },
244
           start_time:this.start_time,
265
           start_time:this.start_time,
245
           end_time:this.end_time,
266
           end_time:this.end_time,
246
         }
267
         }
247
-      getPurchaseStockQuery(params).then(response=>{
268
+      getPurchaseStockQueryList(params).then(response=>{
248
          if(response.data.state == 1){
269
          if(response.data.state == 1){
249
             var list = response.data.data.list
270
             var list = response.data.data.list
271
+           
250
             this.loading = false
272
             this.loading = false
251
             for(let i=0;i<list.length;i++){
273
             for(let i=0;i<list.length;i++){
252
                
274
                
253
-              list[i].stockIn = this.getWarehouseInfoStart(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo) //期初结余
254
-              list[i].stock_in_price = this.getWarehouseInfoStartPrice(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo)
255
-              list[i].stockMoney = this.getWarehouseInfoStartMoney(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo)
256
-              
275
+               list[i].stockIn = list[i].GoodStartFlowInfo.over_count
276
+               list[i].stock_in_price = list[i].buy_price
277
+               list[i].stockMoney = (list[i].buy_price * list[i].GoodStartFlowInfo.over_count).toFixed(2)
278
+            
257
               list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
279
               list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
258
-              list[i].addStockMoney = this.getAddStockMony(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
259
-              list[i].saleStockMoney = this.getSaleStockMony(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)
280
+              list[i].addStockMoney = list[i].buy_price
281
+              list[i].saleStockMoney = (list[i].stockAdd * list[i].buy_price).toFixed(2)
260
 
282
 
261
               list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
283
               list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
262
-              list[i].stockOutprice = this.stockOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
263
-              list[i].saleOutMoney = this.getSaleStockMony(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)
264
-              
265
-              // list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
266
-
284
+              list[i].stockOutprice = list[i].retail_price
285
+              list[i].saleOutMoney = (list[i].outStock * list[i].stockOutprice).toFixed(2)
286
+             
287
+             
267
               list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
288
               list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
268
-              list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
269
-              list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
289
+              list[i].overPrice = list[i].buy_price
290
+              list[i].overMoney = (list[i].overStock * list[i].buy_price).toFixed(2)
270
              
291
              
271
             }
292
             }
293
+            console.log("listwowowoowowowow",list)
272
             this.tableList = list
294
             this.tableList = list
273
             this.total = response.data.data.total
295
             this.total = response.data.data.total
274
 
296
 
275
            this.manufacturerList = response.data.data.manufacturerList
297
            this.manufacturerList = response.data.data.manufacturerList
298
+          
276
            
299
            
277
          }
300
          }
278
       })
301
       })
572
         countfive +=arr5[i].count
595
         countfive +=arr5[i].count
573
       }
596
       }
574
     }
597
     }
575
-    console.log("countOne",countOne)
576
-    console.log("countTwo",countTwo)
577
-    console.log("countthree",countthree)
578
-    console.log("countfour",countfour)
579
-    console.log("*********************")
598
+   
580
     count = countOne - countTwo + countthree - countfour + countfive
599
     count = countOne - countTwo + countthree - countfour + countfive
581
     if(count > 0 ){
600
     if(count > 0 ){
582
       return count
601
       return count
610
      }
629
      }
611
     }
630
     }
612
     all_count = count + countOne
631
     all_count = count + countOne
613
-    console.log("count2332323223232o2222222222wide",count)
614
-    console.log("countONE23232322323323223",countOne)
615
-    console.log("all_count9999999999999wode",all_count)
616
-    console.log("-------------------------------------------")
632
+   
617
     if(all_count > 0 ){
633
     if(all_count > 0 ){
618
       return all_count
634
       return all_count
619
     }else{
635
     }else{
674
     }
690
     }
675
    },
691
    },
676
    open(){
692
    open(){
677
-    this.start_time = moment().year(2022).month(10).date(1).format('YYYY-MM-DD')
693
+    // this.start_time = moment().year(2022).month(10).date(4).format('YYYY-MM-DD')
694
+    this.start_time = moment().startOf('month').format('YYYY-MM-DD')
678
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
695
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
679
     this.houseList = []
696
     this.houseList = []
680
     this.goodTypeList= []
697
     this.goodTypeList= []
788
         count_two +=val3[i].count
805
         count_two +=val3[i].count
789
       }
806
       }
790
      }
807
      }
808
+    
791
      all_count = count +count_one - count_two
809
      all_count = count +count_one - count_two
792
      if(all_count >0){
810
      if(all_count >0){
793
        return all_count
811
        return all_count
920
          total_price_four +=val4[i].count * val4[i].buy_price
938
          total_price_four +=val4[i].count * val4[i].buy_price
921
        }
939
        }
922
      }
940
      }
923
-     console.log("total_price",total_price)
924
-     console.log("total_price_three",total_price_three)
925
-     console.log("total_price_two",total_price_two)
926
-     console.log("total_price_one",total_price_one)
927
-     console.log("total_price_four",total_price_four)
941
+   
928
      all_price = total_price- total_price_three +total_price_one - total_price_two + total_price_four
942
      all_price = total_price- total_price_three +total_price_one - total_price_two + total_price_four
929
      console.log("arrll_price",all_price)
943
      console.log("arrll_price",all_price)
930
      if(all_price >0){
944
      if(all_price >0){
976
     this.$router.push({path:"/purchase/stock/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&good_type="+this.good_type})
990
     this.$router.push({path:"/purchase/stock/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&good_type="+this.good_type})
977
    },
991
    },
978
    exportList: function() {
992
    exportList: function() {
993
+
979
         for(let i=0;i<this.tableList.length;i++){
994
         for(let i=0;i<this.tableList.length;i++){
980
           this.tableList[i].index = i+1
995
           this.tableList[i].index = i+1
981
           this.tableList[i].query_date = this.start_time+"~"+this.end_time
996
           this.tableList[i].query_date = this.start_time+"~"+this.end_time
982
           this.tableList[i].good_type = this.getGoodTypeName(this.tableList[i].good_type_id)
997
           this.tableList[i].good_type = this.getGoodTypeName(this.tableList[i].good_type_id)
983
           this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
998
           this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
999
+          this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
984
           this.tableList[i].specification_name_one = this.tableList[i].specification_name + "/"+this.tableList[i].packing_unit
1000
           this.tableList[i].specification_name_one = this.tableList[i].specification_name + "/"+this.tableList[i].packing_unit
985
         }
1001
         }
986
         import('@/vendor/Export2Excel').then(excel => {
1002
         import('@/vendor/Export2Excel').then(excel => {
987
-           const multiHeader = [['序号', '查询日期',' 耗材类型','耗材名称','规格&单位','生产产商', '期初结余' , '', '', '本期增加', '', '', '本期减少' , '', '', '期末结余' , '', '']]
988
-           const header = ['', '','','','','', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额']
989
-           const merges = ['A1:A2', 'B1:B2','C1:C2','D1:D2','E1:E2','F1:F2','G1:I1', 'J1:L1', 'M1:O1', 'P1:R1']
990
-           const filterVal = ['index', 'query_date', 'good_type','good_name','specification_name_one','manufacturer_name','stockIn','stock_in_price','stockMoney','stockAdd','addStockMoney','saleStockMoney','outStock','stockOutprice','saleOutMoney','overStock','overPrice','overMoney']
1003
+            const multiHeader = [['序号', '查询日期',' 耗材类型','耗材编码','耗材名称','规格&单位','生产产商','经销商','单位', '期初结余' , '', '', '本期增加', '', '', '本期减少' , '', '', '期末结余' , '', '']]
1004
+            const header = ['','','','','','','','','', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额']
1005
+            const merges = ['A1:A2', 'B1:B2','C1:C2','D1:D2','E1:E2','F1:F2','G1:G2','H1:H2','I1:I2', 'J1:L1', 'M1:O1', 'P1:R1','S1:U1']
1006
+            const filterVal = ['index', 'query_date', 'good_type','good_number','good_name','specification_name_one','manufacturer_name','dealer_name','packing_unit','stockIn','stock_in_price','stockMoney','stockAdd','addStockMoney','saleStockMoney','outStock','stockOutprice','saleOutMoney','overStock','overPrice','overMoney']
991
     
1007
     
992
-           const data = this.formatJson(filterVal, this.tableList)
993
-           
994
-           const filename = '进销存查询'
995
-     
996
-          
1008
+            const data = this.formatJson(filterVal, this.tableList)
1009
+            console.log("datae3ooo2o2o2o",data)
1010
+            const filename = '进销存查询'
1011
+      
997
             excel.export_json_to_excel({
1012
             excel.export_json_to_excel({
998
               multiHeader,
1013
               multiHeader,
999
               header,
1014
               header,
1002
               filename
1017
               filename
1003
             })
1018
             })
1004
         })
1019
         })
1020
+
1005
       },
1021
       },
1006
       formatJson(filterVal, jsonData) {
1022
       formatJson(filterVal, jsonData) {
1007
         return jsonData.map(v => filterVal.map(j => v[j]));
1023
         return jsonData.map(v => filterVal.map(j => v[j]));
1008
       },
1024
       },
1009
-     
1025
+     toOverCount(){
1026
+       getGoodOverCount().then(response=>{
1027
+         if(response.data.state == 1){
1028
+           var msg = response.data.data.msg
1029
+           this.$message.success("调试成功")
1030
+         }
1031
+       })
1032
+     },
1033
+     getDearName(id){
1034
+      var dear_name = ""
1035
+      for(let i=0;i<this.dealerList.length;i++){
1036
+        if(id == this.dealerList[i].id){
1037
+          dear_name = this.dealerList[i].dealer_name
1038
+        }
1039
+      }
1040
+      return dear_name
1041
+    },
1010
   },
1042
   },
1011
-  // created(){
1012
-  //   this.getStorehouseList()
1013
-  //   this.getlist()
1014
-  //   this.getStockDrugCount()
1015
-  // }
1043
+
1016
 }
1044
 }
1017
 </script>
1045
 </script>
1018
 
1046
 

File diff suppressed because it is too large
+ 703 - 688
src/xt_pages/stock/query/purchaseStockQueryPrint.vue


+ 2 - 2
src/xt_pages/stock/stockNewQuery.vue View File

10
               <GoodNewQuery></GoodNewQuery>
10
               <GoodNewQuery></GoodNewQuery>
11
             </el-tab-pane>
11
             </el-tab-pane>
12
           
12
           
13
-            <!-- <el-tab-pane label="进销存查询" name="second">
13
+            <el-tab-pane label="进销存查询" name="second">
14
                <PurchaseStockQuery ref="mychild"></PurchaseStockQuery>
14
                <PurchaseStockQuery ref="mychild"></PurchaseStockQuery>
15
-            </el-tab-pane> -->
15
+            </el-tab-pane>
16
 
16
 
17
              <el-tab-pane label="进销存查询" name="five">
17
              <el-tab-pane label="进销存查询" name="five">
18
                <PurchaseNewStockQuery ref="mychildfive"></PurchaseNewStockQuery>
18
                <PurchaseNewStockQuery ref="mychildfive"></PurchaseNewStockQuery>