|
@@ -183,9 +183,13 @@
|
183
|
183
|
</div> -->
|
184
|
184
|
|
185
|
185
|
<div style="margin-top: 10px;margin-bottom:10px">
|
186
|
|
- <el-button type="primary" size="small" @click="toStatic" v-if="org_id!=9671 && org_id!=10340">统计</el-button>
|
|
186
|
+ <el-button type="primary" size="small" @click="toStatic" v-if="org_id!=9671 && org_id!=10340">药品统计</el-button>
|
187
|
187
|
|
188
|
|
- <el-button type="primary" size="small" @click="toStaticOne" v-if="org_id == 9671 || org_id==10340">统计</el-button>
|
|
188
|
+ <el-button type="primary" size="small" @click="toStaticOne" v-if="org_id == 9671 || org_id==10340">药品统计</el-button>
|
|
189
|
+
|
|
190
|
+ <el-button type="primary" size="small" @click="toStaticTwo">耗材统计</el-button>
|
|
191
|
+
|
|
192
|
+
|
189
|
193
|
</div>
|
190
|
194
|
|
191
|
195
|
|
|
@@ -736,6 +740,76 @@
|
736
|
740
|
<el-button type="primary" @click="startdialogVisibleOne = false">确 定</el-button>
|
737
|
741
|
</span>
|
738
|
742
|
</el-dialog>
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+ <el-dialog
|
|
746
|
+ title="耗材统计表"
|
|
747
|
+ :visible.sync="startdialogVisibleTwo"
|
|
748
|
+ width="60%">
|
|
749
|
+ <span>
|
|
750
|
+ <div class="cell clearfix" style="margin-bottom:10px">
|
|
751
|
+ <label class="title"> <span class="name">排班班次</span> : </label>
|
|
752
|
+ <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleTypeTwo" >
|
|
753
|
+ <el-option
|
|
754
|
+ v-for="item in schedulArr"
|
|
755
|
+ :key="item.value"
|
|
756
|
+ :label="item.label"
|
|
757
|
+ :value="item.value">
|
|
758
|
+ </el-option>
|
|
759
|
+ </el-select>
|
|
760
|
+ <label class="title"> <span class="name">病区选择</span> : </label>
|
|
761
|
+ <el-select v-model="partion_type" placeholder="请选择" @change="changePartionTypeTwo" multiple >
|
|
762
|
+ <el-option
|
|
763
|
+ v-for="item in partitionArr"
|
|
764
|
+ :key="item.id"
|
|
765
|
+ :label="item.name"
|
|
766
|
+ :value="item.id">
|
|
767
|
+ </el-option>
|
|
768
|
+ </el-select>
|
|
769
|
+ <el-button size="small" icon="el-icon-printer" @click="toPrintThree" type="primary">打印</el-button>
|
|
770
|
+ <el-button size="small" @click="toExportListTwo" type="primary">导出</el-button>
|
|
771
|
+ </div>
|
|
772
|
+
|
|
773
|
+ <el-table
|
|
774
|
+ :data="tableProjectList"
|
|
775
|
+ border
|
|
776
|
+ :row-style="{ color: '#303133' }"
|
|
777
|
+ :header-cell-style="{
|
|
778
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
779
|
+ color: '#606266'
|
|
780
|
+ }"
|
|
781
|
+ >
|
|
782
|
+ <el-table-column align="center" label="序号">
|
|
783
|
+ <template slot-scope="scope">
|
|
784
|
+ {{scope.$index+1}}
|
|
785
|
+ </template>
|
|
786
|
+ </el-table-column>
|
|
787
|
+ <el-table-column align="center" label="耗材名称">
|
|
788
|
+ <template slot-scope="scope">
|
|
789
|
+ {{scope.row.good_name}}
|
|
790
|
+ </template>
|
|
791
|
+ </el-table-column>
|
|
792
|
+ <el-table-column align="center" label="规格">
|
|
793
|
+ <template slot-scope="scope">
|
|
794
|
+ {{scope.row.specification_name}}
|
|
795
|
+ </template>
|
|
796
|
+ </el-table-column>
|
|
797
|
+
|
|
798
|
+ <el-table-column align="center" label="数量">
|
|
799
|
+ <template slot-scope="scope">
|
|
800
|
+ {{scope.row.count}}
|
|
801
|
+ </template>
|
|
802
|
+ </el-table-column>
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+ </el-table>
|
|
807
|
+ </span>
|
|
808
|
+ <span slot="footer" class="dialog-footer">
|
|
809
|
+ <el-button @click="startdialogVisibleTwo = false">取 消</el-button>
|
|
810
|
+ <el-button type="primary" @click="startdialogVisibleTwo = false">确 定</el-button>
|
|
811
|
+ </span>
|
|
812
|
+ </el-dialog>
|
739
|
813
|
</div>
|
740
|
814
|
|
741
|
815
|
|
|
@@ -744,7 +818,7 @@
|
744
|
818
|
|
745
|
819
|
<script>
|
746
|
820
|
const moment = require('moment')
|
747
|
|
-import { getSchedualPatient, GetAllZone,getDialysisAdviceToday } from "@/api/dialysis";
|
|
821
|
+import { getSchedualPatient, GetAllZone,getDialysisAdviceToday,getDialysisProject } from "@/api/dialysis";
|
748
|
822
|
import { parseTime } from "@/utils";
|
749
|
823
|
import { uParseTime } from '@/utils/tools'
|
750
|
824
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
|
@@ -826,6 +900,7 @@ export default {
|
826
|
900
|
tableList:[],
|
827
|
901
|
startdialogVisible:false,
|
828
|
902
|
startdialogVisibleOne:false,
|
|
903
|
+ startdialogVisibleTwo:false,
|
829
|
904
|
schedule_type:0,
|
830
|
905
|
partion_type:0,
|
831
|
906
|
druglist:[],
|
|
@@ -839,6 +914,7 @@ export default {
|
839
|
914
|
zoneIdList:[],
|
840
|
915
|
partion_str:"",
|
841
|
916
|
keyword:"",
|
|
917
|
+ tableProjectList:[],
|
842
|
918
|
};
|
843
|
919
|
},
|
844
|
920
|
created() {
|
|
@@ -1882,7 +1958,7 @@ export default {
|
1882
|
1958
|
this.tableList = hisarr
|
1883
|
1959
|
}
|
1884
|
1960
|
|
1885
|
|
- console.log("中国人民解放军",this.tableList)
|
|
1961
|
+
|
1886
|
1962
|
}
|
1887
|
1963
|
}
|
1888
|
1964
|
})
|
|
@@ -1932,7 +2008,7 @@ export default {
|
1932
|
2008
|
|
1933
|
2009
|
if(doctorList!=null && doctorList.length > 0){
|
1934
|
2010
|
|
1935
|
|
- let dataInfo = {}
|
|
2011
|
+ let dataInfo = {}
|
1936
|
2012
|
doctorList.forEach((item, index) => {
|
1937
|
2013
|
item.advice_name = item.advice_name.replace(/\s/g,"")
|
1938
|
2014
|
let { advice_name } = item
|
|
@@ -2009,6 +2085,73 @@ export default {
|
2009
|
2085
|
})
|
2010
|
2086
|
|
2011
|
2087
|
},
|
|
2088
|
+ toStaticTwo(){
|
|
2089
|
+ var str = ""
|
|
2090
|
+ if(this.partion_type==0){
|
|
2091
|
+ str = this.zoneIdList.join(",")
|
|
2092
|
+ }
|
|
2093
|
+ if(this.partion_type!=0){
|
|
2094
|
+ str = this.partion_type.join(",")
|
|
2095
|
+ }
|
|
2096
|
+ this.partion_str = ""
|
|
2097
|
+ this.partion_str = str
|
|
2098
|
+ this.tableList = []
|
|
2099
|
+ var params = {
|
|
2100
|
+ schedule_type:this.schedule_type,
|
|
2101
|
+ partion_type:str,
|
|
2102
|
+ selected_date: moment(this.time).format('YYYY-MM-DD'),
|
|
2103
|
+ }
|
|
2104
|
+ getDialysisProject(params).then(response=>{
|
|
2105
|
+ if(response.data.state ==1){
|
|
2106
|
+ var list = response.data.data.list
|
|
2107
|
+ var newArr = []
|
|
2108
|
+ if(list!=null && list.length>0){
|
|
2109
|
+ for(let i=0;i<list.length;i++){
|
|
2110
|
+ for(let j=0;j<list[i].his_doctor_project.length;j++){
|
|
2111
|
+ newArr.push(list[i].his_doctor_project[j])
|
|
2112
|
+ }
|
|
2113
|
+ }
|
|
2114
|
+ }
|
|
2115
|
+
|
|
2116
|
+ let dataInfo = {}
|
|
2117
|
+ newArr.forEach((item, index) => {
|
|
2118
|
+ let { project_id } = item
|
|
2119
|
+ if (!dataInfo[project_id]) {
|
|
2120
|
+ dataInfo[project_id] = {
|
|
2121
|
+ project_id:item.project_id,
|
|
2122
|
+ good_name:item.good.good_name,
|
|
2123
|
+ specification_name:item.good.specification_name,
|
|
2124
|
+ child: [],
|
|
2125
|
+ count:0,
|
|
2126
|
+ }
|
|
2127
|
+ }
|
|
2128
|
+ })
|
|
2129
|
+ let arr = Object.values(dataInfo)
|
|
2130
|
+
|
|
2131
|
+ if(arr!=null && arr.length >0){
|
|
2132
|
+ for(let i =0;i<arr.length;i++){
|
|
2133
|
+ for(let j=0;j<newArr.length;j++){
|
|
2134
|
+ if(arr[i].project_id == newArr[j].project_id){
|
|
2135
|
+ arr[i].child.push(newArr[i])
|
|
2136
|
+ }
|
|
2137
|
+ }
|
|
2138
|
+ }
|
|
2139
|
+ for(let i =0;i<arr.length;i++){
|
|
2140
|
+ for(let j=0;j<arr[i].child.length;j++){
|
|
2141
|
+ arr[i].count += parseInt(arr[i].child[j].count)
|
|
2142
|
+ }
|
|
2143
|
+ }
|
|
2144
|
+
|
|
2145
|
+ console.log("arr0000000000000000000000",arr)
|
|
2146
|
+
|
|
2147
|
+ this.startdialogVisibleTwo = true
|
|
2148
|
+ this.tableProjectList = []
|
|
2149
|
+ this.tableProjectList = arr
|
|
2150
|
+
|
|
2151
|
+ }
|
|
2152
|
+ }
|
|
2153
|
+ })
|
|
2154
|
+ },
|
2012
|
2155
|
getDrugAdviceCount(advice_name,zone_name){
|
2013
|
2156
|
var str = ""
|
2014
|
2157
|
var arr =[]
|
|
@@ -2100,6 +2243,10 @@ export default {
|
2100
|
2243
|
var schedule_date = moment(this.time).format('YYYY-MM-DD')
|
2101
|
2244
|
this.$router.push({path:"/dialysis/doctorNewAdviceStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
|
2102
|
2245
|
},
|
|
2246
|
+ toPrintThree(){
|
|
2247
|
+ var schedule_date = moment(this.time).format('YYYY-MM-DD')
|
|
2248
|
+ this.$router.push({path:"/dialysis/doctorNewProjectStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
|
|
2249
|
+ },
|
2103
|
2250
|
toExportListOne(){
|
2104
|
2251
|
import('@/vendor/Export2Excel').then(excel => {
|
2105
|
2252
|
|
|
@@ -2127,6 +2274,26 @@ export default {
|
2127
|
2274
|
this.downloadLoading = false
|
2128
|
2275
|
})
|
2129
|
2276
|
},
|
|
2277
|
+ toExportListTwo(){
|
|
2278
|
+ import('@/vendor/Export2Excel').then(excel => {
|
|
2279
|
+
|
|
2280
|
+ if(this.tableProjectList!=null && this.tableProjectList.length > 0){
|
|
2281
|
+ for(let i=0;i<this.tableProjectList.length;i++){
|
|
2282
|
+ this.tableProjectList[i].index = i+1
|
|
2283
|
+ }
|
|
2284
|
+ }
|
|
2285
|
+ const tHeader = ['序号','耗材名称','规格','数量']
|
|
2286
|
+ const filterVal = ['index','good_name','specification_name','count']
|
|
2287
|
+
|
|
2288
|
+ const data = this.formatJson(filterVal, this.tableProjectList)
|
|
2289
|
+ excel.export_json_to_excel({
|
|
2290
|
+ header: tHeader,
|
|
2291
|
+ data,
|
|
2292
|
+ filename: '耗材统计'
|
|
2293
|
+ })
|
|
2294
|
+ this.downloadLoading = false
|
|
2295
|
+ })
|
|
2296
|
+ },
|
2130
|
2297
|
formatJson(filterVal, jsonData) {
|
2131
|
2298
|
return jsonData.map(v => filterVal.map(j => v[j]));
|
2132
|
2299
|
},
|
|
@@ -2146,6 +2313,14 @@ export default {
|
2146
|
2313
|
this.tableDataList = []
|
2147
|
2314
|
this.toStaticOne()
|
2148
|
2315
|
},
|
|
2316
|
+ changeScheduleTypeTwo(){
|
|
2317
|
+ this.tableProjectList = []
|
|
2318
|
+ this.toStaticTwo()
|
|
2319
|
+ },
|
|
2320
|
+ changePartionTypeTwo(){
|
|
2321
|
+ this.tableProjectList=[]
|
|
2322
|
+ this.toStaticTwo()
|
|
2323
|
+ },
|
2149
|
2324
|
getModeId(val){
|
2150
|
2325
|
if(val!=null && val.length > 0){
|
2151
|
2326
|
let dataInfo = {}
|
|
@@ -2273,6 +2448,21 @@ export default {
|
2273
|
2448
|
if(hisNewArr[i].mode_id == 32){
|
2274
|
2449
|
hisNewArr[i].mode_id = "HDP"
|
2275
|
2450
|
}
|
|
2451
|
+ if(hisNewArr[i].mode_id == 33){
|
|
2452
|
+ hisNewArr[i].mode_id = "HFD"
|
|
2453
|
+ }
|
|
2454
|
+ if(hisNewArr[i].mode_id == 34){
|
|
2455
|
+ hisNewArr[i].mode_id = "HDF100"
|
|
2456
|
+ }
|
|
2457
|
+ if(hisNewArr[i].mode_id == 35){
|
|
2458
|
+ hisNewArr[i].mode_id = "HDF600"
|
|
2459
|
+ }
|
|
2460
|
+ if(hisNewArr[i].mode_id == 36){
|
|
2461
|
+ hisNewArr[i].mode_id = "HDF800"
|
|
2462
|
+ }
|
|
2463
|
+ if(hisNewArr[i].mode_id == 37){
|
|
2464
|
+ hisNewArr[i].mode_id = "HDF1000"
|
|
2465
|
+ }
|
2276
|
2466
|
str += hisNewArr[i].mode_id +"("+hisNewArr[i].child.length+")" +"\n"
|
2277
|
2467
|
}
|
2278
|
2468
|
|