Browse Source

Merge branch '20220812' of http://git.shengws.com/csx/Vue_New into 20220812

csx 2 years ago
parent
commit
677a786c69
55 changed files with 10394 additions and 5492 deletions
  1. 15 5
      src/api/advice.js
  2. 16 0
      src/api/dialysis_record.js
  3. 72 0
      src/api/drug/drug.js
  4. 1 0
      src/lang/zh.js
  5. 6 0
      src/router/modules/drugs.js
  6. 8 0
      src/router/modules/hisTool.js
  7. 2 2
      src/views/layout/Layout.vue
  8. 492 274
      src/xt_pages/Pharmacy/DrugDispensing.vue
  9. 60 16
      src/xt_pages/Pharmacy/PatientDispensing.vue
  10. 33 26
      src/xt_pages/Pharmacy/print/drugPrint.vue
  11. 79 28
      src/xt_pages/Pharmacy/print/patientPrint.vue
  12. 2 1
      src/xt_pages/data/components/addDrugs.vue
  13. 7 2
      src/xt_pages/dialysis/PatientBox.vue
  14. 184 116
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  15. 43 23
      src/xt_pages/dialysis/details/index.vue
  16. 7 5
      src/xt_pages/dialysis/dialysisPrintOrder.vue
  17. 2 1
      src/xt_pages/dialysis/schedualPatient.vue
  18. 11 3
      src/xt_pages/dialysis/template/DialysisPrintOrderFiftySix.vue
  19. 1095 1708
      src/xt_pages/dialysis/template/DialysisPrintOrderFiftyThree.vue
  20. 2094 2175
      src/xt_pages/dialysis/template/DialysisPrintOrderFiftyfive.vue
  21. 1 0
      src/xt_pages/dialysis/template/DialysisPrintOrderFortyFour.vue
  22. 15 14
      src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue
  23. 2301 927
      src/xt_pages/dialysis/template/DialysisPrintOrderFortyThree.vue
  24. 37 33
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue
  25. 2 1
      src/xt_pages/hospitalStation/components/callPrescription.vue
  26. 6 2
      src/xt_pages/hospitalStation/components/deskPrescription.vue
  27. 7 8
      src/xt_pages/hospitalStation/invoiceTemplate/printTwo.vue
  28. 2 1
      src/xt_pages/outpatientCharges/invoiceTemplate/printFour.vue
  29. 326 0
      src/xt_pages/outpatientDoctorStation/batch_mode_template.vue
  30. 10 4
      src/xt_pages/outpatientDoctorStation/components/callPrescription.vue
  31. 16 10
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  32. 7 2
      src/xt_pages/outpatientDoctorStation/modeTemplate.vue
  33. 4 1
      src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue
  34. 1 1
      src/xt_pages/stock/detail/print.vue
  35. 440 0
      src/xt_pages/stock/drugs/components/drugPatientQuery.vue
  36. 0 0
      src/xt_pages/stock/drugs/components/drugQuery.vue
  37. 532 0
      src/xt_pages/stock/drugs/components/expiryDateDrugQuery.vue
  38. 0 0
      src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue
  39. 4 2
      src/xt_pages/stock/drugs/drugDamaged.vue
  40. 135 0
      src/xt_pages/stock/drugs/drugNewQuery.vue
  41. 2 1
      src/xt_pages/stock/drugs/inventory.vue
  42. 2 2
      src/xt_pages/stock/drugs/query.vue
  43. 2 1
      src/xt_pages/stock/inventory.vue
  44. 2 1
      src/xt_pages/stock/inventoryDetails.vue
  45. 548 2
      src/xt_pages/stock/query/expiryDateQuery.vue
  46. 547 27
      src/xt_pages/stock/query/goodNewQuery.vue
  47. 438 6
      src/xt_pages/stock/query/patientQuery.vue
  48. 548 2
      src/xt_pages/stock/query/purchaseStockQuery.vue
  49. 7 1
      src/xt_pages/stock/stockBatchNumber.vue
  50. 4 2
      src/xt_pages/stock/stockDamaged.vue
  51. 0 1
      src/xt_pages/stock/stockQuery.vue
  52. 60 10
      src/xt_pages/user/components/EditGroupAdvice.vue
  53. 37 8
      src/xt_pages/user/components/PatientDetail.vue
  54. 14 1
      src/xt_pages/user/components/PatientForm.vue
  55. 108 36
      src/xt_pages/user/doctorAdvice.vue

+ 15 - 5
src/api/advice.js View File

42
   })
42
   })
43
 }
43
 }
44
 
44
 
45
-export function ExecDoctorAdvice(patient, id, time, mode, origin) {
45
+export function ExecDoctorAdvice(patient, id, time, mode, origin, hisAdviceIds, adviceIds) {
46
   var params = {
46
   var params = {
47
     id: id,
47
     id: id,
48
     patient: patient,
48
     patient: patient,
49
     execution_time: time,
49
     execution_time: time,
50
     mode: mode,
50
     mode: mode,
51
-    origin: origin
51
+    origin: origin,
52
+    hisAdviceIds: hisAdviceIds,
53
+    adviceIds: adviceIds
52
   }
54
   }
53
 
55
 
54
   return request({
56
   return request({
60
     }
62
     }
61
   })
63
   })
62
 }
64
 }
63
-export function CheckDoctorAdvice(patient, id, mode, origin) {
65
+export function CheckDoctorAdvice(patient, id, mode, origin, hisAdviceIds, adviceIds) {
64
   var params = {
66
   var params = {
65
     id: id,
67
     id: id,
66
     patient: patient,
68
     patient: patient,
67
     mode: mode,
69
     mode: mode,
68
-    origin: origin
69
-    // execution_time: time,
70
+    origin: origin,
71
+    hisAdviceIds: hisAdviceIds,
72
+    adviceIds: adviceIds
70
   }
73
   }
71
   return request({
74
   return request({
72
     url: '/api/patients/advice/check',
75
     url: '/api/patients/advice/check',
509
   })
512
   })
510
 }
513
 }
511
 
514
 
515
+export function GetOrderDoctorAdvice(params) {
516
+  return request({
517
+    url: '/api/schedule/getorderdoctoradvice',
518
+    method: 'get',
519
+    params: params
520
+  })
521
+}

+ 16 - 0
src/api/dialysis_record.js View File

113
   })
113
   })
114
 }
114
 }
115
 
115
 
116
+export function getLongAdviceOne(params) {
117
+  return request({
118
+    url: '/api/dialysis/advice_remind/one',
119
+    method: 'Get',
120
+    params: params
121
+  })
122
+}
123
+
124
+export function getLongAdviceTwo(params) {
125
+  return request({
126
+    url: '/api/dialysis/advice_remind/two',
127
+    method: 'Get',
128
+    params: params
129
+  })
130
+}
131
+
116
 export function GetSchedualNumber(params) {
132
 export function GetSchedualNumber(params) {
117
   return request({
133
   return request({
118
     url: '/api/schedule/get',
134
     url: '/api/schedule/get',

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

491
     params: params
491
     params: params
492
   })
492
   })
493
 }
493
 }
494
+
495
+export function getStorehouseList(params) {
496
+  return request({
497
+    url: '/api/drug/getstorehouselist',
498
+    method: 'get',
499
+    params: params
500
+  })
501
+}
502
+
503
+export function getGoodNewQuery(params) {
504
+  return request({
505
+    url: '/api/drug/getgoodnewquery',
506
+    method: 'get',
507
+    params: params
508
+  })
509
+}
510
+
511
+export function getGoodWarehouseOutInfoById(params) {
512
+  return request({
513
+    url: '/api/drug/getgoodwarehouseoutinfobyid',
514
+    method: 'get',
515
+    params: params
516
+  })
517
+}
518
+
519
+export function getGoodPatientList(params) {
520
+  return request({
521
+    url: '/api/good/getgoodpatientlist',
522
+    method: 'get',
523
+    params: params
524
+  })
525
+}
526
+
527
+export function getWarehouseOutDetailByPatientId(params) {
528
+  return request({
529
+    url: '/api/good/getwarehouseoutdetailbypatientid',
530
+    method: 'Get',
531
+    params: params
532
+  })
533
+}
534
+
535
+export function getGoodExpiryDateQuery(params) {
536
+  return request({
537
+    url: '/api/good/getgoodexpirydatequery',
538
+    method: 'Get',
539
+    params: params
540
+  })
541
+}
542
+
543
+export function getPurchaseStockQuery(params) {
544
+  return request({
545
+    url: '/api/good/getpurchasestockquery',
546
+    method: 'Get',
547
+    params: params
548
+  })
549
+}
550
+
551
+export function getDrugWarehouseOutDetailByPatientId(params) {
552
+  return request({
553
+    url: '/api/good/getdrugwarehouseoutdetailbypatientid',
554
+    method: 'get',
555
+    params: params
556
+  })
557
+}
558
+
559
+export function getDrugExpiryDateQuery(params) {
560
+  return request({
561
+    url: '/api/drug/getdrugexpirydatequery',
562
+    method: 'get',
563
+    params: params
564
+  })
565
+}

+ 1 - 0
src/lang/zh.js View File

170
     drugsExpiryDate: '药品有效期预警',
170
     drugsExpiryDate: '药品有效期预警',
171
     drugsSurplus: '药品剩余预警',
171
     drugsSurplus: '药品剩余预警',
172
     drugsQuery: '库存查询',
172
     drugsQuery: '库存查询',
173
+    drugsNewQuery: '库存查询',
173
     drugsReportLoss: '药品报损',
174
     drugsReportLoss: '药品报损',
174
     drugsAdjustPrice: '药品调价',
175
     drugsAdjustPrice: '药品调价',
175
     drugsStockCancel: '退库单',
176
     drugsStockCancel: '退库单',

+ 6 - 0
src/router/modules/drugs.js View File

18
       name: 'drugsQuery',
18
       name: 'drugsQuery',
19
       meta: { title: 'drugsQuery', noCache: true }
19
       meta: { title: 'drugsQuery', noCache: true }
20
     },
20
     },
21
+    {
22
+      path: '/stock/drugs/drugNewQuery',
23
+      component: () => import('@/xt_pages/stock/drugs/drugNewQuery'),
24
+      name: 'drugsNewQuery',
25
+      meta: { title: 'drugsNewQuery', noCache: true }
26
+    },
21
     {
27
     {
22
       path: '/stock/drugs/stock/in',
28
       path: '/stock/drugs/stock/in',
23
       component: () => import('@/xt_pages/stock/drugs/drugStockInOrder'),
29
       component: () => import('@/xt_pages/stock/drugs/drugStockInOrder'),

+ 8 - 0
src/router/modules/hisTool.js View File

18
       name: 'modeTemplate',
18
       name: 'modeTemplate',
19
       meta: { title: 'modeTemplate', noCache: true }
19
       meta: { title: 'modeTemplate', noCache: true }
20
     },
20
     },
21
+    {
22
+      path: '/hisTool/batchTemplate',
23
+      component: () => import('@/xt_pages/outpatientDoctorStation/batch_mode_template'),
24
+      name: 'batchModeTemplate',
25
+      meta: { title: 'batchModeTemplate', noCache: true },
26
+      hidden: true,
27
+      is_menu: false
28
+    },
21
     {
29
     {
22
       path: '/hisTool/modeTemplateDetail',
30
       path: '/hisTool/modeTemplateDetail',
23
       component: () => import('@/xt_pages/outpatientDoctorStation/modeTemplateDetail'),
31
       component: () => import('@/xt_pages/outpatientDoctorStation/modeTemplateDetail'),

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

12
           <i class="iconfont icon-s_bingli navIcon"></i>
12
           <i class="iconfont icon-s_bingli navIcon"></i>
13
           <p>电子病历</p>
13
           <p>电子病历</p>
14
         </div>
14
         </div>
15
-        <!-- <div v-if="medicianshow" :class="index == 7 ? 'navOne navActive' : 'navOne'" @click="clickActive(7,'药房管理')">
15
+        <div v-if="medicianshow" :class="index == 7 ? 'navOne navActive' : 'navOne'" @click="clickActive(7,'药房管理')">
16
           <i class="iconfont icon-shangcheng-1 navIcon"></i>
16
           <i class="iconfont icon-shangcheng-1 navIcon"></i>
17
           <p>药房管理</p>
17
           <p>药房管理</p>
18
-        </div> -->
18
+        </div>
19
         <div v-if="touxiShow" :class="index == 2 ? 'navOne navActive' : 'navOne'" @click="clickActive(2,'透析管理')">
19
         <div v-if="touxiShow" :class="index == 2 ? 'navOne navActive' : 'navOne'" @click="clickActive(2,'透析管理')">
20
           <i class="iconfont icon-computer_fill navIcon"></i>
20
           <i class="iconfont icon-computer_fill navIcon"></i>
21
           <p>透析管理</p>
21
           <p>透析管理</p>

+ 492 - 274
src/xt_pages/Pharmacy/DrugDispensing.vue View File

1
-<template><!--药品发药页面-->
1
+<template>
2
+  <!--药品发药页面-->
2
   <div class="main-contain new-main-contain">
3
   <div class="main-contain new-main-contain">
3
     <div class="position">
4
     <div class="position">
4
       <!--      <bread-crumb :crumbs='crumbs'></bread-crumb>-->
5
       <!--      <bread-crumb :crumbs='crumbs'></bread-crumb>-->
18
               format="yyyy-MM-dd"
19
               format="yyyy-MM-dd"
19
               value-format="yyyy-MM-dd"
20
               value-format="yyyy-MM-dd"
20
               placeholder="选择日期"
21
               placeholder="选择日期"
21
-              :change="testsss()"
22
+              @change="changeTimes()"
22
             >
23
             >
23
             </el-date-picker>
24
             </el-date-picker>
24
           </div>
25
           </div>
25
 
26
 
26
           <div class="list">
27
           <div class="list">
27
-            <el-radio-group v-model="state">
28
+            <el-radio-group v-model="state" @change="lala()">
28
               <el-radio :label="1">待发药</el-radio>
29
               <el-radio :label="1">待发药</el-radio>
29
               <el-radio :label="2">已发药</el-radio>
30
               <el-radio :label="2">已发药</el-radio>
30
             </el-radio-group>
31
             </el-radio-group>
49
           <el-table
50
           <el-table
50
             v-if="state == 1"
51
             v-if="state == 1"
51
             :height="tableHeight"
52
             :height="tableHeight"
52
-            :data="tableData"
53
+            :data="waiting_drug"
53
             border
54
             border
54
             style="width: 100%"
55
             style="width: 100%"
55
             highlight-current-row
56
             highlight-current-row
56
-            ref="singleTable"
57
+            ref="table01"
57
             @current-change="handleCurrentChange"
58
             @current-change="handleCurrentChange"
59
+            :row-style="{ color: '#303133' }"
60
+            :header-cell-style="{
61
+              backgroundColor: 'rgb(245, 247, 250)',
62
+              color: '#606266',
63
+            }"
58
           >
64
           >
59
             <el-table-column prop="name" label="名称" width="100">
65
             <el-table-column prop="name" label="名称" width="100">
60
-               <template slot-scope="scope">
61
-                {{scope.row.drug_name}}
66
+              <template slot-scope="scope">
67
+                {{ scope.row.name }}
62
               </template>
68
               </template>
63
             </el-table-column>
69
             </el-table-column>
64
             <el-table-column prop="specifications" label="规格" width="100">
70
             <el-table-column prop="specifications" label="规格" width="100">
65
               <template slot-scope="scope">
71
               <template slot-scope="scope">
66
-                {{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
72
+                {{ scope.row.specifications }}
67
               </template>
73
               </template>
68
             </el-table-column>
74
             </el-table-column>
69
             <el-table-column prop="stock" label="库存" width="100">
75
             <el-table-column prop="stock" label="库存" width="100">
70
-               <template slot-scope="scope">
71
-                {{getWarehoseInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}
76
+              <template slot-scope="scope">
77
+                {{ scope.row.stock }}
72
               </template>
78
               </template>
73
             </el-table-column>
79
             </el-table-column>
74
           </el-table>
80
           </el-table>
76
           <el-table
82
           <el-table
77
             v-if="state == 2"
83
             v-if="state == 2"
78
             :height="tableHeight"
84
             :height="tableHeight"
79
-            :data="tableData"
85
+            :data="issued_drug"
80
             border
86
             border
81
             style="width: 100%"
87
             style="width: 100%"
82
             highlight-current-row
88
             highlight-current-row
83
-            @current-change="handleSelectionChangeOne"
84
-            ref="singleTable"
89
+            @current-change="handleCurrentChange"
90
+            :row-style="{ color: '#303133' }"
91
+            :header-cell-style="{
92
+              backgroundColor: 'rgb(245, 247, 250)',
93
+              color: '#606266',
94
+            }"
95
+            ref="table02"
85
           >
96
           >
86
             <el-table-column prop="name" label="名称" width="100">
97
             <el-table-column prop="name" label="名称" width="100">
87
-               <template slot-scope="scope">
88
-                {{scope.row.drug_name}}
98
+              <template slot-scope="scope">
99
+                {{ scope.row.name }}
89
               </template>
100
               </template>
90
             </el-table-column>
101
             </el-table-column>
91
             <el-table-column prop="specifications" label="规格" width="100">
102
             <el-table-column prop="specifications" label="规格" width="100">
92
               <template slot-scope="scope">
103
               <template slot-scope="scope">
93
-                {{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
104
+                {{ scope.row.specifications }}
94
               </template>
105
               </template>
95
             </el-table-column>
106
             </el-table-column>
96
             <el-table-column prop="stock" label="库存" width="100">
107
             <el-table-column prop="stock" label="库存" width="100">
97
-               <template slot-scope="scope">
98
-                {{getWarehoseInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}
108
+              <template slot-scope="scope">
109
+                {{ scope.row.stock }}
99
               </template>
110
               </template>
100
             </el-table-column>
111
             </el-table-column>
101
           </el-table>
112
           </el-table>
103
       </div>
114
       </div>
104
       <div class="mainRight">
115
       <div class="mainRight">
105
         <div class="titlelist">
116
         <div class="titlelist">
106
-          <el-button type="primary" @click="dispense" v-if="state == 1">发药</el-button>
117
+          <!--          <el-button type="primary" @click="tt">调试</el-button>-->
118
+          <el-button type="primary" @click="dispense" v-if="state == 1"
119
+            >发药</el-button
120
+          >
107
           <el-button type="primary" @click="toPrint">打印</el-button>
121
           <el-button type="primary" @click="toPrint">打印</el-button>
108
-          <el-button type="primary" @click="toSetting">设置</el-button>
122
+          <!--          <el-button @click="tt">调试</el-button>-->
123
+          <!--          <el-button type="primary" @click="toSetting">设置</el-button>-->
109
         </div>
124
         </div>
110
         <el-divider></el-divider>
125
         <el-divider></el-divider>
111
         <div>
126
         <div>
112
           <el-table
127
           <el-table
113
             :height="tableHeight"
128
             :height="tableHeight"
114
-            :data="tableData_list"
129
+            :data="tableData"
115
             border
130
             border
131
+            highlight-current-row
116
             style="width: 1328px"
132
             style="width: 1328px"
133
+            :row-style="{ color: '#303133' }"
134
+            :header-cell-style="{
135
+              backgroundColor: 'rgb(245, 247, 250)',
136
+              color: '#606266',
137
+            }"
117
             @selection-change="handleSelectionChange"
138
             @selection-change="handleSelectionChange"
118
-             v-if="state == 1"
139
+            v-if="state == 1"
119
           >
140
           >
141
+            <el-table-column type="selection" width="55" align="center">
142
+            </el-table-column>
143
+            <el-table-column
144
+              type="index"
145
+              label="序号"
146
+              width="120"
147
+              align="center"
148
+            >
149
+            </el-table-column>
150
+            <el-table-column
151
+              prop="name"
152
+              label="患者名称"
153
+              width="180"
154
+              align="center"
120
             >
155
             >
121
-            <el-table-column type="selection" width="55" align="center"> </el-table-column>
122
-            <el-table-column type="index" label="序号" width="120" align="center">
123
               <template slot-scope="scope">
156
               <template slot-scope="scope">
124
-                {{scope.$index + 1}}
157
+                {{ scope.row.name }}
125
               </template>
158
               </template>
126
             </el-table-column>
159
             </el-table-column>
127
-            <el-table-column prop="name" label="患者名称" width="180" align="center">
128
-                <template slot-scope="scope">
129
-                 {{getPatientName(scope.row.patient_id)}}
160
+            <el-table-column
161
+              prop="name"
162
+              label="单次用量"
163
+              width="170"
164
+              align="center"
165
+            >
166
+              <template slot-scope="scope">
167
+                {{ scope.row.single_dosage }}
130
               </template>
168
               </template>
131
             </el-table-column>
169
             </el-table-column>
132
-            <el-table-column prop="name" label="单次用量" width="170" align="center">
133
-               <template  slot-scope="scope">
134
-                 {{scope.row.single_dose}}
135
-               </template>
136
-            </el-table-column>
137
-            <el-table-column prop="name" label="用法" width="160" align="center">
138
-               <template  slot-scope="scope">
139
-                 {{scope.row.delivery_way}}
140
-               </template>
170
+            <el-table-column
171
+              prop="name"
172
+              label="用法"
173
+              width="160"
174
+              align="center"
175
+            >
176
+              <template slot-scope="scope">
177
+                {{ scope.row.usage }}
178
+              </template>
141
             </el-table-column>
179
             </el-table-column>
142
-            <el-table-column prop="name" label="频率" width="160" align="center">
143
-                <template  slot-scope="scope">
144
-                 {{scope.row.execution_frequency}}
145
-               </template>
180
+            <el-table-column
181
+              prop="name"
182
+              label="频率"
183
+              width="160"
184
+              align="center"
185
+            >
186
+              <template slot-scope="scope">
187
+                {{ scope.row.frequency }}
188
+              </template>
146
             </el-table-column>
189
             </el-table-column>
147
-            <el-table-column prop="name" label="天数" width="160" align="center">
148
-               <template  slot-scope="scope">
149
-                 {{scope.row.day}}
150
-               </template>
190
+            <el-table-column
191
+              prop="name"
192
+              label="天数"
193
+              width="160"
194
+              align="center"
195
+            >
196
+              <template slot-scope="scope">
197
+                {{ scope.row.days }}
198
+              </template>
151
             </el-table-column>
199
             </el-table-column>
152
-            <el-table-column prop="name" label="总量" width="160" align="center">
153
-                <template  slot-scope="scope">
154
-                 {{scope.row.prescribing_number}}
155
-               </template>
200
+            <el-table-column
201
+              prop="name"
202
+              label="总量"
203
+              width="160"
204
+              align="center"
205
+            >
206
+              <template slot-scope="scope">
207
+                {{ scope.row.total }}
208
+              </template>
156
             </el-table-column>
209
             </el-table-column>
157
-            <el-table-column prop="name" label="数据来源" width="162" align="center">
158
-                <template  slot-scope="scope">
159
-                 <span v-if="scope.row.type == 1">血透</span>
160
-                 <span v-if="scope.row.type == 2">HIS</span>
161
-               </template>
210
+            <el-table-column
211
+              prop="name"
212
+              label="数据来源"
213
+              width="162"
214
+              align="center"
215
+            >
216
+              <template slot-scope="scope">
217
+                {{ scope.row.data_sources }}
218
+              </template>
162
             </el-table-column>
219
             </el-table-column>
163
           </el-table>
220
           </el-table>
164
-
165
-
166
-            <el-table
221
+        </div>
222
+        <div>
223
+          <el-table
167
             :height="tableHeight"
224
             :height="tableHeight"
168
-            :data="tableList"
225
+            :data="tableData"
169
             border
226
             border
170
             style="width: 1328px"
227
             style="width: 1328px"
171
             v-if="state == 2"
228
             v-if="state == 2"
172
           >
229
           >
230
+            <!--            <el-table-column type="selection" width="55"> </el-table-column>-->
231
+            <el-table-column
232
+              type="index"
233
+              label="序号"
234
+              width="120"
235
+              align="center"
236
+            >
237
+            </el-table-column>
238
+            <el-table-column
239
+              prop="name"
240
+              label="患者名称"
241
+              width="180"
242
+              align="center"
173
             >
243
             >
174
-            <el-table-column type="selection" width="55"> </el-table-column>
175
-            <el-table-column type="index" label="序号" width="120" align="center">
176
               <template slot-scope="scope">
244
               <template slot-scope="scope">
177
-                {{scope.$index + 1}}
245
+                {{ scope.row.name }}
178
               </template>
246
               </template>
179
             </el-table-column>
247
             </el-table-column>
180
-            <el-table-column prop="name" label="患者名称" width="180" align="center">
181
-                <template slot-scope="scope">
182
-                 {{getPatientName(scope.row.patient_id)}}
248
+            <el-table-column
249
+              prop="name"
250
+              label="单次用量"
251
+              width="170"
252
+              align="center"
253
+            >
254
+              <template slot-scope="scope">
255
+                {{ scope.row.single_dosage }}
183
               </template>
256
               </template>
184
             </el-table-column>
257
             </el-table-column>
185
-            <el-table-column prop="name" label="单次用量" width="170" align="center">
186
-               <template  slot-scope="scope">
187
-                 {{scope.row.single_dose}}
188
-               </template>
258
+            <el-table-column
259
+              prop="name"
260
+              label="用法"
261
+              width="160"
262
+              align="center"
263
+            >
264
+              <template slot-scope="scope">
265
+                {{ scope.row.usage }}
266
+              </template>
189
             </el-table-column>
267
             </el-table-column>
190
-            <el-table-column prop="name" label="用法" width="160" align="center">
191
-               <template  slot-scope="scope">
192
-                 {{scope.row.delivery_way}}
193
-               </template>
268
+            <el-table-column
269
+              prop="name"
270
+              label="频率"
271
+              width="160"
272
+              align="center"
273
+            >
274
+              <template slot-scope="scope">
275
+                {{ scope.row.frequency }}
276
+              </template>
194
             </el-table-column>
277
             </el-table-column>
195
-            <el-table-column prop="name" label="频率" width="160" align="center">
196
-                <template  slot-scope="scope">
197
-                 {{scope.row.execution_frequency}}
198
-               </template>
278
+            <el-table-column
279
+              prop="name"
280
+              label="天数"
281
+              width="160"
282
+              align="center"
283
+            >
284
+              <template slot-scope="scope">
285
+                {{ scope.row.days }}
286
+              </template>
199
             </el-table-column>
287
             </el-table-column>
200
-            <el-table-column prop="name" label="天数" width="160" align="center">
201
-               <template  slot-scope="scope">
202
-                 {{scope.row.day}}
203
-               </template>
288
+            <el-table-column
289
+              prop="name"
290
+              label="总量"
291
+              width="160"
292
+              align="center"
293
+            >
294
+              <template slot-scope="scope">
295
+                {{ scope.row.total }}
296
+              </template>
204
             </el-table-column>
297
             </el-table-column>
205
-            <el-table-column prop="name" label="总量" width="160" align="center">
206
-                <template  slot-scope="scope">
207
-                 {{scope.row.prescribing_number}}
208
-               </template>
298
+            <el-table-column
299
+              prop="name"
300
+              label="数据来源"
301
+              width="162"
302
+              align="center"
303
+            >
304
+              <template slot-scope="scope">
305
+                {{ scope.row.data_sources }}
306
+              </template>
209
             </el-table-column>
307
             </el-table-column>
210
-            <el-table-column prop="name" label="数据来源" width="162" align="center">
211
-                <template  slot-scope="scope">
212
-                 <span v-if="scope.row.type == 1">血透</span>
213
-                 <span v-if="scope.row.type == 2">HIS</span>
214
-               </template>
308
+            <el-table-column
309
+              prop="name"
310
+              label="领药人"
311
+              width="160"
312
+              align="center"
313
+            >
314
+              <template slot-scope="scope">
315
+                {{ scope.row.people }}
316
+              </template>
215
             </el-table-column>
317
             </el-table-column>
216
           </el-table>
318
           </el-table>
217
-
218
-
219
         </div>
319
         </div>
220
-        <div style="margin-top:12px;" v-if="state == 1">领药人:
320
+        <div style="margin-top: 25px" v-if="state == 1">
321
+          领药人:
221
           <el-select v-model="admin_user_id" placeholder="请选择">
322
           <el-select v-model="admin_user_id" placeholder="请选择">
222
             <el-option
323
             <el-option
223
               v-for="item in doctorList"
324
               v-for="item in doctorList"
224
               :key="item.admin_user_id"
325
               :key="item.admin_user_id"
225
               :label="item.user_name"
326
               :label="item.user_name"
226
-              :value="item.admin_user_id">
327
+              :value="item.admin_user_id"
328
+            >
227
             </el-option>
329
             </el-option>
228
-           </el-select>
330
+          </el-select>
229
         </div>
331
         </div>
230
       </div>
332
       </div>
231
 
333
 
235
           <el-radio v-model="is_open" label="1">是</el-radio>
337
           <el-radio v-model="is_open" label="1">是</el-radio>
236
           <el-radio v-model="is_open" label="2">否</el-radio>
338
           <el-radio v-model="is_open" label="2">否</el-radio>
237
         </span>
339
         </span>
238
-        <div style="height: 50px; background: #c7ebfc; border-radius: 5px;padding: 7px;">
239
-          <i class="el-icon-info" style="color: #3399ff;font-size: 17px;"></i>
340
+        <div
341
+          style="
342
+            height: 50px;
343
+            background: #c7ebfc;
344
+            border-radius: 5px;
345
+            padding: 7px;
346
+          "
347
+        >
348
+          <i class="el-icon-info" style="color: #3399ff; font-size: 17px"></i>
240
           若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
349
           若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
241
         </div>
350
         </div>
242
         <span slot="footer" class="dialog-footer">
351
         <span slot="footer" class="dialog-footer">
259
 <script>
368
 <script>
260
 import drugPrint from "./print/drugPrint.vue";
369
 import drugPrint from "./print/drugPrint.vue";
261
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
370
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
262
-import { getTodayAdviceList,getPharmacyBaseDrug,updatePharmacyBaseDrug,SaveSetting,getPharmacyConfig,getUserdDrugList } from "@/api/his/advice";
263
-// import {
264
-//   waitingdrug,
265
-//   issueddrugs,
266
-//   getpharmacycontent
267
-// } from "@/api/pharmacy"
268
-const moment = require('moment')
371
+import {
372
+  getTodayAdviceList,
373
+  getPharmacyBaseDrug,
374
+  updatePharmacyBaseDrug,
375
+  SaveSetting,
376
+  getPharmacyConfig,
377
+  getUserdDrugList,
378
+} from "@/api/his/advice";
379
+import {
380
+  dispensemedicine,
381
+  waitingmedicine,
382
+  getpatientswithdrugs,
383
+  medicinedeparture,
384
+  getcurrentname,
385
+} from "@/api/pharmacy";
386
+const moment = require("moment");
269
 export default {
387
 export default {
270
   components: {
388
   components: {
271
     BreadCrumb,
389
     BreadCrumb,
274
   data() {
392
   data() {
275
     return {
393
     return {
276
       crumbs: [
394
       crumbs: [
277
-        { path: false, name: "药品发药" },
395
+        { path: false, name: "药房管理" },
278
         { path: "/Pharmacy/DrugDispensing", name: "药品发药" },
396
         { path: "/Pharmacy/DrugDispensing", name: "药品发药" },
279
       ],
397
       ],
280
       tableHeight: 400,
398
       tableHeight: 400,
284
       alreadmount: 0,
402
       alreadmount: 0,
285
       tableData: [],
403
       tableData: [],
286
       tableData_list: [],
404
       tableData_list: [],
287
-      tableList:[],
405
+      tableList: [],
288
       multipleSelection: [],
406
       multipleSelection: [],
289
-      start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
290
-      patientList:[],
291
-      keywords:"",
292
-      dialogVisible:false,
293
-      is_open:"2",
294
-      isVisibility:"",
295
-      propsTable:"",
296
-      doctorList:[],
297
-      admin_user_id:this.$store.getters.xt_user.user.id,
407
+      start_time: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
408
+      patientList: [],
409
+      keywords: "",
410
+      dialogVisible: false,
411
+      is_open: "2",
412
+      isVisibility: "",
413
+      propsTable: "",
414
+      doctorList: [],
415
+      admin_user_id: 0,
416
+      waiting_drug: [], //待发药列表
417
+      issued_drug: [], //已发药列表
418
+      currentRow: null,
419
+      tmp: 0,
298
     };
420
     };
299
   },
421
   },
300
 
422
 
301
   methods: {
423
   methods: {
302
-    testsss(){
303
-      console.log("time",this.start_time);
424
+    tt() {
425
+      console.log("this.currentRow", this.currentRow);
426
+      this.$router.go(0);
427
+    },
428
+    async fun3() {
429
+      console.log("fun3");
430
+      this.fun1().then((val) => {
431
+        this.fun2();
432
+      });
433
+    },
434
+    async fun4(tps) {
435
+      console.log("fun3", tps);
436
+      this.fun1().then((val) => {
437
+        console.log("this.issued_drug", this.issued_drug);
438
+        for (let i = 0; i < this.issued_drug.length; i++) {
439
+          if (tps == this.issued_drug[i].id) {
440
+            this.$refs.table02.setCurrentRow(this.issued_drug[i]);
441
+            this.handleCurrentChange(this.issued_drug[i]);
442
+          }
443
+        }
444
+      });
445
+    },
446
+    async fun5(tps) {
447
+      console.log("fun3", tps);
448
+      this.fun1().then((val) => {
449
+        console.log("this.issued_drug", this.waiting_drug);
450
+        for (let i = 0; i < this.waiting_drug.length; i++) {
451
+          if (tps == this.waiting_drug[i].id) {
452
+            this.$refs.table01.setCurrentRow(this.waiting_drug[i]);
453
+            this.handleCurrentChange(this.waiting_drug[i]);
454
+          }
455
+        }
456
+      });
457
+    },
458
+    changeTimes() {
459
+      // alert("aa")
460
+      // this.getdruglist();
461
+      this.fun3();
304
     },
462
     },
305
     //初始化
463
     //初始化
306
-    init(){
307
-
464
+    init() {
465
+      this.state = 1;
466
+      this.tableData = null;
467
+      this.currentRow = null;
468
+    },
469
+    lala() {
470
+      this.currentRow = null;
471
+      this.tableData = null;
472
+      this.selectedbydefault();
308
     },
473
     },
309
-     searchAction() {
310
-      this.getlist();
474
+    searchAction() {
475
+      // this.getlist();
476
+      this.tableData = null;
477
+      this.currentRow = null;
478
+      this.getdruglist();
311
     },
479
     },
312
     // 跳转打印页面
480
     // 跳转打印页面
313
     toPrint() {
481
     toPrint() {
314
-      // this.$router.push({ path: "/Pharmacy/print/patientPrint" });
315
-      this.$refs.drugprint.show();
482
+      if (this.state == 1 && this.multipleSelection.length == 0) {
483
+        this.$message.error("未选择任何数据");
484
+        return;
485
+      }
486
+      if (this.state == 2 && this.tableData == null) {
487
+        this.$message.error("未选择任何数据");
488
+        return;
489
+      }
490
+      this.$refs.drugprint.show(
491
+        this.tableData,
492
+        this.currentRow,
493
+        this.state,
494
+        this.multipleSelection,
495
+        this.start_time
496
+      );
316
     },
497
     },
498
+    //列表选择
317
     handleSelectionChange(val) {
499
     handleSelectionChange(val) {
318
       this.multipleSelection = val;
500
       this.multipleSelection = val;
319
     },
501
     },
320
-    handleSelectionChangeOne(val){
321
-      this.tableList = []
322
-      this.getUserlist(val.id)
502
+    //默认选中
503
+    selectedbydefault() {
504
+      if (this.state == 1 && this.waiting_drug.length > 0) {
505
+        this.$refs.table01.setCurrentRow(this.waiting_drug[0]);
506
+        this.handleCurrentChange(this.waiting_drug[0]);
507
+      }
508
+      if (this.state == 2 && this.issued_drug.length > 0) {
509
+        this.$refs.table02.setCurrentRow(this.issued_drug[0]);
510
+        this.handleCurrentChange(this.issued_drug[0]);
511
+      }
512
+    },
513
+    //包装selectedbydefault
514
+    fun2() {
515
+      console.log("3333333this.waitmount_data", this.waiting_drug);
516
+      // return new Promise((resolve, reject) => {
517
+      if (this.state == 1 && this.waiting_drug.length > 0) {
518
+        this.$refs.table01.setCurrentRow(this.waiting_drug[0]);
519
+        this.handleCurrentChange(this.waiting_drug[0]);
520
+      }
521
+      if (this.state == 2 && this.issued_drug.length > 0) {
522
+        this.$refs.table02.setCurrentRow(this.issued_drug[0]);
523
+        this.handleCurrentChange(this.issued_drug[0]);
524
+      }
525
+      // });
323
     },
526
     },
324
     // 药品发药
527
     // 药品发药
325
     dispense() {
528
     dispense() {
326
-      var blood_ids = []
327
-      var his_ids = []
328
-      var bloodStr = ""
329
-      var hisStr = ""
330
-      for(let i=0;i<this.tableData.length;i++){
331
-        if(this.tableData[i].type == 1){
332
-          blood_ids.push(this.tableData[i].id)
333
-        }
334
-        if(this.tableData[i].type == 2){
335
-          his_ids.push(this.tableData[i].id)
336
-        }
529
+      var tps = this.currentRow.id;
530
+      if (this.multipleSelection.length < 1) {
531
+        this.$message.error("未选择任何信息");
532
+        return;
337
       }
533
       }
338
-      bloodStr = blood_ids.join(",")
339
-      hisStr =  his_ids.join(",")
340
-      var params = {
341
-        bloodStr:bloodStr,
342
-        hisStr:hisStr,
343
-        admin_user_id:this.admin_user_id,
534
+      var tmp = "";
535
+      for (var i = 0; i < this.multipleSelection.length; i++) {
536
+        tmp = tmp + this.multipleSelection[i].id + ",";
344
       }
537
       }
538
+      var params = {
539
+        creater: this.admin_user_id,
540
+        ids: tmp,
541
+      };
345
       this.$confirm("确定是否对该药品进行发药?", "患者发药", {
542
       this.$confirm("确定是否对该药品进行发药?", "患者发药", {
346
         confirmButtonText: "确 定",
543
         confirmButtonText: "确 定",
347
         cancelButtonText: "取 消",
544
         cancelButtonText: "取 消",
348
         type: "warning",
545
         type: "warning",
349
       }).then(() => {
546
       }).then(() => {
350
-        updatePharmacyBaseDrug(params).then(response=>{
351
-           if(response.data.state == 1){
352
-           var msg = response.data.data.msg
353
-           var medical =  response.data.data.medical
354
-           if(msg === 1){
355
-             this.$message.success("发药成功!")
356
-           }
357
-           if(msg == 2 || msg ===3){
358
-             this.$message.error("库存不足")
359
-           }
360
-         }
361
-        })
362
-      }).catch(() => {});
363
-    },
364
-
365
-    // 药品退药
366
-    endispense() {
367
-      var params = {};
368
-      this.$confirm("确定是否对该药品进行退药?", "患者退药", {
369
-        confirmButtonText: "确 定",
370
-        cancelButtonText: "取 消",
371
-        type: "warning",
372
-      })
373
-        .then(() => {})
374
-        .catch(() => {});
547
+        medicinedeparture(params).then((res) => {
548
+          if (res.data.state == 1) {
549
+            this.$message.success("操作成功");
550
+            this.getdruglist();
551
+            //刷新列表
552
+            this.handleCurrentChange(this.currentRow);
553
+            this.fun4(tps);
554
+            this.state = 2;
555
+            this.multipleSelection = [];
556
+          } else {
557
+            this.$message.error("操作失败:" + res.data.msg);
558
+            //刷新列表
559
+            this.handleCurrentChange(this.currentRow);
560
+            this.fun5(tps);
561
+            this.state = 1;
562
+          }
563
+        });
564
+      });
375
     },
565
     },
376
-
377
-    getlist(){
566
+    //获取药品列表
567
+    getdruglist() {
378
       var params = {
568
       var params = {
379
-        start_time:this.start_time,
380
-        keywords:this.keywords,
381
-      }
382
-      getTodayAdviceList(params).then(response=>{
383
-         if(response.data.state == 1){
384
-           var list =  response.data.data.list
385
-           this.$refs.singleTable.setCurrentRow(list[0])
386
-           this.tableData = list
387
-           var doctorlist = response.data.data.doctorlist
388
-           this.doctorList = doctorlist
389
-         }
390
-      })
391
-    },
392
-   getWarehoseInfo(arr, max_unit, min_unit, min_number) {
393
-      var total = 0;
394
-      var max_str = "";
395
-      var min_str = "";
396
-      if (arr.length > 0) {
397
-        for (let i = 0; i < arr.length; i++) {
398
-          total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
569
+        keyword: this.keywords,
570
+        time: this.start_time,
571
+      };
572
+      waitingmedicine(params).then((res) => {
573
+        if (res.data.state == 1) {
574
+          this.waiting_drug = res.data.data.list;
399
         }
575
         }
400
-      }
401
-      if (total < min_number) {
402
-        min_str = total + min_unit;
403
-      }
404
-      if (total == 0) {
405
-        min_str = "";
406
-        max_str = "";
407
-      }
408
-      if (total >= min_number) {
409
-        if (parseInt(total / min_number) != 0) {
410
-          max_str = parseInt(total / min_number) + max_unit;
576
+      });
577
+      dispensemedicine(params).then((res) => {
578
+        if (res.data.state == 1) {
579
+          this.issued_drug = res.data.data.list;
411
         }
580
         }
412
-        if (total % min_number != 0) {
413
-          min_str = (total % min_number) + min_unit;
581
+      });
582
+    },
583
+    async fun1() {
584
+      var params = {
585
+        keyword: this.keywords,
586
+        time: this.start_time,
587
+      };
588
+      await waitingmedicine(params).then((res) => {
589
+        if (res.data.state == 1) {
590
+          this.waiting_drug = res.data.data.list;
414
         }
591
         }
415
-      }
416
-      return max_str + min_str;
592
+        console.log("fun1lil1111i");
593
+      });
594
+      await dispensemedicine(params).then((res) => {
595
+        if (res.data.state == 1) {
596
+          this.issued_drug = res.data.data.list;
597
+        }
598
+        console.log("fun122222222");
599
+      });
600
+      console.log("fun1");
417
     },
601
     },
418
 
602
 
419
-    handleCurrentChange(row) {
420
-      this.getPharmacyBaseDrug(row.id)
603
+    morencreatename() {
604
+      var param = {};
605
+      getcurrentname(param).then((res) => {
606
+        console.log("res(药)", res);
607
+        if (res.data.state == 1) {
608
+          this.admin_user_id = res.data.data.list;
609
+          console.log("this.admin_user_id(药)", this.admin_user_id);
610
+        }
611
+      });
421
     },
612
     },
422
-    getPharmacyBaseDrug(drug_id){
613
+    //获取领药人选项
614
+    getlist() {
423
       var params = {
615
       var params = {
424
-        start_time:this.start_time,
425
-        drug_id:drug_id,
426
-      }
427
-      getPharmacyBaseDrug(params).then(response=>{
428
-        if(response.data.state == 1){
429
-           var advicelist = response.data.data.advicelist
430
-           for(let i=0;i<advicelist.length;i++){
431
-             advicelist[i].type = 1
432
-             advicelist[i].day = " "
433
-             this.tableData_list.push(advicelist[i])
434
-           }
435
-           var hisAdviceList = response.data.data.hisAdviceList
436
-           for(let i=0;i<hisAdviceList.length;i++){
437
-             hisAdviceList[i].type = 2
438
-             this.tableData_list.push(hisAdviceList[i])
439
-           }
440
-           var patient = response.data.data.patient
441
-           this.patientList = patient
616
+        start_time: this.start_time,
617
+        keywords: this.keywords,
618
+      };
619
+      getTodayAdviceList(params).then((response) => {
620
+        if (response.data.state == 1) {
621
+          this.doctorList = response.data.data.doctorlist;
622
+          console.log("this.admin_user_id(药2)", this.admin_user_id);
623
+          // this.admin_user_id = this.doctorList[0].admin_user_id
624
+          // this.admin_user_id = this.tmp
442
         }
625
         }
443
-      })
626
+      });
444
     },
627
     },
445
-    getPatientName(id){
446
-       var name = ""
447
-       for(let i=0;i<this.patientList.length;i++){
448
-          if(id == this.patientList[i].id){
449
-             name = this.patientList[i].name
450
-          }
451
-       }
452
-       return name
628
+    //  //获取药品的患者信息
629
+    informationofdrugs(val) {
630
+      var params = {
631
+        // patient_id: this.currentRow.
632
+      };
633
+    },
634
+    handleCurrentChange(val) {
635
+      this.currentRow = val;
636
+      if (this.state == 1) {
637
+        this.getdrugsdetails(0);
638
+      }
639
+      if (this.state == 2) {
640
+        this.getdrugsdetails(1);
641
+      }
642
+    },
643
+    getdrugsdetails(val) {
644
+      var params = {
645
+        drug_id: this.currentRow.id,
646
+        is_medicine: val,
647
+        time: this.start_time,
648
+      };
649
+      getpatientswithdrugs(params).then((res) => {
650
+        if (res.data.state == 1) {
651
+          this.tableData = res.data.data.list; //列表数据
652
+        } else {
653
+          this.$message.error(res.data.msg);
654
+        }
655
+      });
453
     },
656
     },
454
-    toSetting(){
455
-      getPharmacyConfig().then(response=>{
456
-        if(response.data.state == 1){
457
-           this.dialogVisible = true
458
-           var config = response.data.data.config
459
-           this.is_open = config.is_open.toString()
657
+
658
+    toSetting() {
659
+      getPharmacyConfig().then((response) => {
660
+        if (response.data.state == 1) {
661
+          this.dialogVisible = true;
662
+          var config = response.data.data.config;
663
+          this.is_open = config.is_open.toString();
460
         }
664
         }
461
-      })
665
+      });
462
     },
666
     },
463
-    SaveSetting(){
667
+    SaveSetting() {
464
       var params = {
668
       var params = {
465
-        is_open:parseInt(this.is_open),
466
-      }
467
-     SaveSetting(params).then(response=>{
468
-       if(response.data.state == 1){
469
-         var config = response.data.data.config
470
-         this.$message.success("保存成功!")
471
-         this.dialogVisible = false
472
-       }
473
-     })
669
+        is_open: parseInt(this.is_open),
670
+      };
671
+      SaveSetting(params).then((response) => {
672
+        if (response.data.state == 1) {
673
+          var config = response.data.data.config;
674
+          this.$message.success("保存成功!");
675
+          this.dialogVisible = false;
676
+        }
677
+      });
474
     },
678
     },
475
-    getUserlist(drug_id){
476
-       var params = {
477
-        start_time:this.start_time,
478
-        drug_id:drug_id,
479
-      }
480
-      getUserdDrugList(params).then(response=>{
481
-       if(response.data.state == 1){
482
-           var advicelist = response.data.data.advicelist
483
-           for(let i=0;i<advicelist.length;i++){
484
-             advicelist[i].type = 1
485
-             advicelist[i].day = " "
486
-             this.tableList.push(advicelist[i])
487
-           }
488
-           var hisAdviceList = response.data.data.hisAdviceList
489
-           for(let i=0;i<hisAdviceList.length;i++){
490
-             hisAdviceList[i].type = 2
491
-             this.tableList.push(hisAdviceList[i])
492
-           }
493
-           var patient = response.data.data.patient
494
-           this.patientList = patient
679
+    getUserlist(drug_id) {
680
+      var params = {
681
+        start_time: this.start_time,
682
+        drug_id: drug_id,
683
+      };
684
+      getUserdDrugList(params).then((response) => {
685
+        if (response.data.state == 1) {
686
+          var advicelist = response.data.data.advicelist;
687
+          for (let i = 0; i < advicelist.length; i++) {
688
+            advicelist[i].type = 1;
689
+            advicelist[i].day = " ";
690
+            this.tableList.push(advicelist[i]);
691
+          }
692
+          var hisAdviceList = response.data.data.hisAdviceList;
693
+          for (let i = 0; i < hisAdviceList.length; i++) {
694
+            hisAdviceList[i].type = 2;
695
+            this.tableList.push(hisAdviceList[i]);
696
+          }
697
+          var patient = response.data.data.patient;
698
+          this.patientList = patient;
495
         }
699
         }
496
-      })
497
-    }
700
+      });
701
+    },
498
   },
702
   },
499
   created() {
703
   created() {
500
     this.init();
704
     this.init();
501
-    this.getlist()
705
+    this.morencreatename();
706
+    this.getlist();
707
+    // this.getdruglist();
708
+    this.fun3();
502
   },
709
   },
503
 };
710
 };
504
 </script>
711
 </script>
538
     display: flex;
745
     display: flex;
539
     justify-content: flex-end;
746
     justify-content: flex-end;
540
   }
747
   }
748
+  .el-button {
749
+    height: 34px;
750
+    width: 65px;
751
+  }
752
+  .el-table {
753
+    margin-top: -13px;
754
+  }
755
+  /deep/ .el-divider {
756
+    height: 2px;
757
+    margin-top: 10px;
758
+  }
541
 }
759
 }
542
 
760
 
543
 /deep/ .el-table--scrollable-x .el-table__body-wrapper {
761
 /deep/ .el-table--scrollable-x .el-table__body-wrapper {

+ 60 - 16
src/xt_pages/Pharmacy/PatientDispensing.vue View File

14
           <div class="list">
14
           <div class="list">
15
             <el-date-picker
15
             <el-date-picker
16
               style="width: 200px"
16
               style="width: 200px"
17
-              v-model="datepick"
17
+              v-model="start_time"
18
               type="date"
18
               type="date"
19
+              format="yyyy-MM-dd"
20
+              value-format="yyyy-MM-dd"
19
               placeholder="选择日期"
21
               placeholder="选择日期"
22
+              @change="changeTimes()"
20
             >
23
             >
21
             </el-date-picker>
24
             </el-date-picker>
22
           </div>
25
           </div>
38
               v-model="keywords"
41
               v-model="keywords"
39
               class="filter-item"
42
               class="filter-item"
40
               placeholder="请输入患者名称"
43
               placeholder="请输入患者名称"
44
+              clearable
41
             />
45
             />
42
             <el-button
46
             <el-button
43
               size="small"
47
               size="small"
57
             border
61
             border
58
             style="width: 100%"
62
             style="width: 100%"
59
             v-if="state == 1"
63
             v-if="state == 1"
64
+             :row-style="{ color: '#303133' }"
65
+            :header-cell-style="{
66
+              backgroundColor: 'rgb(245, 247, 250)',
67
+              color: '#606266',
68
+            }"
60
           >
69
           >
61
             <el-table-column prop="date" label="患者姓名" width="100">
70
             <el-table-column prop="date" label="患者姓名" width="100">
62
               <template slot-scope="scope">
71
               <template slot-scope="scope">
78
             highlight-current-row
87
             highlight-current-row
79
             @current-change="handleCurrentChange"
88
             @current-change="handleCurrentChange"
80
             border
89
             border
90
+             :row-style="{ color: '#303133' }"
91
+            :header-cell-style="{
92
+              backgroundColor: 'rgb(245, 247, 250)',
93
+              color: '#606266',
94
+            }"
81
             style="width: 100%"
95
             style="width: 100%"
82
             v-if="state == 2"
96
             v-if="state == 2"
83
           >
97
           >
110
             >设置</el-button
124
             >设置</el-button
111
           >
125
           >
112
         </div>
126
         </div>
113
-        <el-divider></el-divider>
127
+        <el-divider style="margin-top: 10px"></el-divider>
114
         <div>
128
         <div>
115
           <el-table
129
           <el-table
116
             :height="tableHeight"
130
             :height="tableHeight"
117
-            :data="tableData_list"
131
+            :data="tableData"
118
             border
132
             border
119
             style="width: 100%"
133
             style="width: 100%"
134
+            :row-style="{ color: '#303133' }"
135
+            :header-cell-style="{
136
+              backgroundColor: 'rgb(245, 247, 250)',
137
+              color: '#606266',
138
+            }"
120
           >
139
           >
121
             <el-table-column
140
             <el-table-column
122
               type="index"
141
               type="index"
186
           <el-radio v-model="is_open" label="1">是</el-radio>
205
           <el-radio v-model="is_open" label="1">是</el-radio>
187
           <el-radio v-model="is_open" label="2">否</el-radio>
206
           <el-radio v-model="is_open" label="2">否</el-radio>
188
         </span>
207
         </span>
189
-        <div style="height: 50px; background: #c7ebfc; border-radius: 5px;padding: 7px;">
190
-          <i class="el-icon-info" style="color: #3399ff;font-size: 17px;"></i>
208
+        <div
209
+          style="
210
+            height: 50px;
211
+            background: #c7ebfc;
212
+            border-radius: 5px;
213
+            padding: 7px;
214
+          "
215
+        >
216
+          <i class="el-icon-info" style="color: #3399ff; font-size: 17px"></i>
191
           若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
217
           若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
192
         </div>
218
         </div>
193
         <span slot="footer" class="dialog-footer">
219
         <span slot="footer" class="dialog-footer">
228
     return {
254
     return {
229
       patient_id: 0,
255
       patient_id: 0,
230
       crumbs: [
256
       crumbs: [
231
-        { path: false, name: "患者发药" },
257
+        { path: false, name: "药房管理" },
232
         { path: "/Pharmacy/patiantDispensing", name: "患者发药" },
258
         { path: "/Pharmacy/patiantDispensing", name: "患者发药" },
233
       ],
259
       ],
234
       tableHeight: 400,
260
       tableHeight: 400,
281
       });
307
       });
282
     },
308
     },
283
     async fun5(tmp) {
309
     async fun5(tmp) {
284
-      console.log("fun3");
310
+      console.log("fun5555");
285
       this.fun1().then((val) => {
311
       this.fun1().then((val) => {
286
         console.log("this.alreadmount_data", this.waitmount_data);
312
         console.log("this.alreadmount_data", this.waitmount_data);
287
         for (let i = 0; i < this.waitmount_data.length; i++) {
313
         for (let i = 0; i < this.waitmount_data.length; i++) {
288
           console.log("tmp = ", tmp);
314
           console.log("tmp = ", tmp);
289
           if (this.waitmount_data[i].PatientID == tmp) {
315
           if (this.waitmount_data[i].PatientID == tmp) {
290
             console.log("i = ", i);
316
             console.log("i = ", i);
291
-            this.$refs.table02.setCurrentRow(this.waitmount_data[i]);
317
+            this.$refs.table01.setCurrentRow(this.waitmount_data[i]);
292
             this.handleCurrentChange(this.waitmount_data[i]);
318
             this.handleCurrentChange(this.waitmount_data[i]);
293
           }
319
           }
294
         }
320
         }
427
         this.$message.error("未选择任何数据");
453
         this.$message.error("未选择任何数据");
428
         return;
454
         return;
429
       }
455
       }
430
-      this.$refs.patientprint.show(this.tableData, this.currentRow, this.state);
456
+      this.$refs.patientprint.show(
457
+        this.tableData,
458
+        this.currentRow,
459
+        this.state,
460
+        this.start_time
461
+      );
431
     },
462
     },
432
 
463
 
433
     // 搜索患者
464
     // 搜索患者
434
-    searchAction() {},
465
+    searchAction() {
466
+      this.tableData = null;
467
+      this.getwaitmount();
468
+    },
435
 
469
 
436
     // 药品发药
470
     // 药品发药
437
     dispense() {
471
     dispense() {
440
         patient_id: this.currentRow.PatientID,
474
         patient_id: this.currentRow.PatientID,
441
         time: this.start_time,
475
         time: this.start_time,
442
       };
476
       };
443
-      this.$confirm("确定是否对该药品进行发药?", "患者发药", {
477
+      this.$confirm("确定是否对该患者进行发药?", "患者发药", {
444
         confirmButtonText: "确 定",
478
         confirmButtonText: "确 定",
445
         cancelButtonText: "取 消",
479
         cancelButtonText: "取 消",
446
         type: "warning",
480
         type: "warning",
492
         }
526
         }
493
       });
527
       });
494
     },
528
     },
495
-
496
     // 药品退药
529
     // 药品退药
497
     endispense() {
530
     endispense() {
498
       var tmp = this.currentRow.PatientID;
531
       var tmp = this.currentRow.PatientID;
500
         patient_id: this.currentRow.PatientID,
533
         patient_id: this.currentRow.PatientID,
501
         time: this.start_time,
534
         time: this.start_time,
502
       };
535
       };
503
-      this.$confirm("确定是否对该药品进行退药?", "患者退药", {
536
+      this.$confirm("确定是否对该患者进行退药?", "患者退药", {
504
         confirmButtonText: "确 定",
537
         confirmButtonText: "确 定",
505
         cancelButtonText: "取 消",
538
         cancelButtonText: "取 消",
506
         type: "warning",
539
         type: "warning",
512
               this.gettodaynumber();
545
               this.gettodaynumber();
513
               this.searchAction();
546
               this.searchAction();
514
               this.tableData = null;
547
               this.tableData = null;
515
-              this.fun4(tmp);
548
+              this.fun5(tmp);
516
               this.state = 1;
549
               this.state = 1;
517
             } else {
550
             } else {
518
               this.$message.error(res.data.msg);
551
               this.$message.error(res.data.msg);
560
     display: flex;
593
     display: flex;
561
     justify-content: flex-end;
594
     justify-content: flex-end;
562
   }
595
   }
596
+  .el-table {
597
+    margin-top: -13px;
598
+  }
599
+  .el-button {
600
+    height: 34px;
601
+    width: 65px;
602
+  }
603
+  /deep/ .el-divider {
604
+    height: 2px;
605
+    margin-top: 10px;
606
+  }
563
 }
607
 }
564
 
608
 
565
-.el-input__inner{
609
+/deep/ .el-input__inner {
566
   padding-right: 15px;
610
   padding-right: 15px;
567
 }
611
 }
568
 
612
 
586
   width: 15px !important;
630
   width: 15px !important;
587
   height: 15px !important;
631
   height: 15px !important;
588
 }
632
 }
589
-</style>
633
+</style>

+ 33 - 26
src/xt_pages/Pharmacy/print/drugPrint.vue View File

9
       >打印</el-button
9
       >打印</el-button
10
     >
10
     >
11
     <div id="dialysis-print-box-1" class="dialysis-print-box-1">
11
     <div id="dialysis-print-box-1" class="dialysis-print-box-1">
12
-      <div class="list_title" style="border-bottom:none;"><div style="width:100%;text-align:center;font-size:16px;font-weight:bold;">{{org_name}} 领药单</div></div>
12
+      <div class="list_title" style="border-bottom:none;"><div style="width:100%;text-align:center;font-size:16px;font-weight:bold;">{{org_name}} <span v-if="state_name=='待发药'">发药单</span> <span v-if="state_name=='已发药'">领药单</span></div></div>
13
       <div class="list_title">
13
       <div class="list_title">
14
         <div>药品名称:{{name}}</div>
14
         <div>药品名称:{{name}}</div>
15
         <div>规格:{{specifications}}</div>
15
         <div>规格:{{specifications}}</div>
16
         <div>发药状态:{{state_name}}</div>
16
         <div>发药状态:{{state_name}}</div>
17
-        <div>日期:</div>
18
-<!--        <div v-if="state==2">领药人:</div>-->
17
+        <div>日期:{{times}}</div>
18
+<!--  <div v-if="state==2">领药人:</div>-->
19
       </div>
19
       </div>
20
 
20
 
21
       <el-table
21
       <el-table
25
         max-height="450"
25
         max-height="450"
26
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
26
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
27
       >
27
       >
28
-        <el-table-column type="index" prop="index" label="序号" width="60">
28
+        <el-table-column type="index" prop="index" label="序号" width="60" align="center">
29
         </el-table-column>
29
         </el-table-column>
30
-        <el-table-column prop="name" label="患者姓名" width="160">
30
+        <el-table-column prop="name" label="患者姓名" width="160" align="center">
31
           <template  slot-scope="scope">
31
           <template  slot-scope="scope">
32
             {{scope.row.name}}
32
             {{scope.row.name}}
33
           </template>
33
           </template>
34
         </el-table-column>
34
         </el-table-column>
35
-        <el-table-column prop="single_dosage" label="单次用量" width="120">
35
+        <el-table-column prop="single_dosage" label="单次用量" width="120" align="center">
36
           <template  slot-scope="scope">
36
           <template  slot-scope="scope">
37
             {{scope.row.single_dosage}}
37
             {{scope.row.single_dosage}}
38
           </template>
38
           </template>
39
         </el-table-column>
39
         </el-table-column>
40
-        <el-table-column prop="usage" label="用法" width="120">
40
+        <el-table-column prop="usage" label="用法" width="120" align="center">
41
           <template  slot-scope="scope">
41
           <template  slot-scope="scope">
42
             {{scope.row.usage}}
42
             {{scope.row.usage}}
43
           </template>
43
           </template>
44
         </el-table-column>
44
         </el-table-column>
45
-        <el-table-column prop="frequency" label="频率" width="120">
45
+        <el-table-column prop="frequency" label="频率" width="120" align="center">
46
           <template  slot-scope="scope">
46
           <template  slot-scope="scope">
47
             {{scope.row.frequency}}
47
             {{scope.row.frequency}}
48
           </template>
48
           </template>
49
         </el-table-column>
49
         </el-table-column>
50
-        <el-table-column prop="days" label="天数" width="120">
50
+        <el-table-column prop="days" label="天数" width="120" align="center">
51
           <template  slot-scope="scope">
51
           <template  slot-scope="scope">
52
             {{scope.row.days}}
52
             {{scope.row.days}}
53
           </template>
53
           </template>
54
         </el-table-column>
54
         </el-table-column>
55
-        <el-table-column prop="total" label="总量" width="120">
55
+        <el-table-column prop="total" label="总量" width="120" align="center">
56
           <template  slot-scope="scope">
56
           <template  slot-scope="scope">
57
             {{scope.row.total}}
57
             {{scope.row.total}}
58
           </template>
58
           </template>
59
         </el-table-column>
59
         </el-table-column>
60
-        <el-table-column prop="data_sources" label="数据来源" width="120">
60
+        <el-table-column prop="data_sources" label="数据来源" width="120" align="center">
61
           <template  slot-scope="scope">
61
           <template  slot-scope="scope">
62
             {{scope.row.data_sources}}
62
             {{scope.row.data_sources}}
63
           </template>
63
           </template>
64
         </el-table-column>
64
         </el-table-column>
65
-        <el-table-column prop="people" label="领药人" width="120">
65
+        <el-table-column prop="people" label="领药人" width="120" align="center">
66
           <template  slot-scope="scope">
66
           <template  slot-scope="scope">
67
             {{scope.row.people}}
67
             {{scope.row.people}}
68
           </template>
68
           </template>
83
       tableData: [],
83
       tableData: [],
84
       isClose:false,
84
       isClose:false,
85
       name:"",
85
       name:"",
86
+      times:"",
86
       specifications:"",
87
       specifications:"",
87
       state_name:"",
88
       state_name:"",
88
       org_name: this.$store.getters.xt_user.org.org_name,
89
       org_name: this.$store.getters.xt_user.org.org_name,
97
         type:Number
98
         type:Number
98
     }
99
     }
99
   },
100
   },
100
-
101
+  created(){
102
+    this.init();
103
+  },
101
   methods: {
104
   methods: {
105
+    init(){
106
+      // let year = new Date().getFullYear();
107
+      // let month = new Date().getMonth() +1;
108
+      // let day = new Date().getDate();
109
+      // let hour = new Date().getHours();
110
+      // let minute = new Date().getMinutes();
111
+      // this.times = year + "年" + month + "月" + day + "日" + hour + "时" + minute + "分"
112
+      // console.log("times:",this.times)
113
+    },
114
+
102
     // isClose() {
115
     // isClose() {
103
     //   this.visibility = false;
116
     //   this.visibility = false;
104
     // },
117
     // },
113
         }
126
         }
114
       }
127
       }
115
     },
128
     },
116
-    show: function (val,data,state,ids) {
129
+    show: function (val,data,state,ids,times) {
130
+      this.times = times
117
       this.visibility = true;
131
       this.visibility = true;
118
       this.name = data.name
132
       this.name = data.name
119
       this.specifications = data.specifications
133
       this.specifications = data.specifications
140
 
154
 
141
     // 打印
155
     // 打印
142
     print() {
156
     print() {
157
+      console.log(this.org_name,'this.org_name')
143
       Vue.prototype.printJson = printutils.printJson;
158
       Vue.prototype.printJson = printutils.printJson;
144
-      //   const style =
145
-      //     '@media print {.list_title{  width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto}}';
146
-      //   printJS({
147
-      //     printable: "dialysis-print-box-1",
148
-      //     type: "html",
149
-      //     style: style,
150
-      //     scanStyles: false,
151
-      //   });
152
       this.printJson({
159
       this.printJson({
153
         title: `
160
         title: `
154
         <div>
161
         <div>
157
         <div style="width: 230px;padding: 10px 0;">药品名称:${this.name}</div>
164
         <div style="width: 230px;padding: 10px 0;">药品名称:${this.name}</div>
158
         <div style="width: 230px;padding: 10px 0;">规格:${this.specifications}</div>
165
         <div style="width: 230px;padding: 10px 0;">规格:${this.specifications}</div>
159
         <div style="width: 230px;padding: 10px 0;">发药状态:${this.state_name}</div>
166
         <div style="width: 230px;padding: 10px 0;">发药状态:${this.state_name}</div>
160
-        <div style="width: 230px;padding: 10px 0;">日期:</div>
161
-        </div>`, // 打印出来的标题
167
+        <div style="width: 230px;padding: 10px 0;">日期:${this.times}</div>
168
+        </div></div>`, // 打印出来的标题
162
         data: this.tableData, // 需要打印的数据
169
         data: this.tableData, // 需要打印的数据
163
         serial: true, // 是否需要打印序列号
170
         serial: true, // 是否需要打印序列号
164
         fields: [
171
         fields: [
221
 }
228
 }
222
 .print_style {
229
 .print_style {
223
   position: absolute;
230
   position: absolute;
224
-  right: 10px;
225
-  top: 42px;
231
+  right: 65px;
232
+  top: 50px;
226
 }
233
 }
227
 
234
 
228
 .list_title {
235
 .list_title {

+ 79 - 28
src/xt_pages/Pharmacy/print/patientPrint.vue View File

9
       >打印</el-button
9
       >打印</el-button
10
     >
10
     >
11
     <div id="dialysis-print-box-1" class="dialysis-print-box-1">
11
     <div id="dialysis-print-box-1" class="dialysis-print-box-1">
12
-       <div class="list_title" style="border-bottom:none;"><div style="width:100%;text-align:center;font-size:16px;font-weight:bold;">{{org_name}} 发药单</div></div>
12
+       <div class="list_title" style="border-bottom:none;"><div style="width:100%;text-align:center;font-size:16px;font-weight:bold;">{{org_name}} <span v-if="state=='待发药'">发药单</span> <span v-if="state=='已发药'">领药单</span></div></div>
13
       <div class="list_title">
13
       <div class="list_title">
14
         <div>患者名称:{{name}}</div>
14
         <div>患者名称:{{name}}</div>
15
         <div>发药状态:{{state}}</div>
15
         <div>发药状态:{{state}}</div>
16
-        <div>日期:</div>
16
+        <div>日期:{{times}}</div>
17
       </div>
17
       </div>
18
 
18
 
19
       <el-table
19
       <el-table
26
         <el-table-column type="index" prop="index" label="序号" width="60" align="center">
26
         <el-table-column type="index" prop="index" label="序号" width="60" align="center">
27
         </el-table-column>
27
         </el-table-column>
28
         <el-table-column prop="name" label="名称" width="160" align="center">
28
         <el-table-column prop="name" label="名称" width="160" align="center">
29
+          <template slot-scope="scope" >
30
+            <span>{{scope.row.Name ? scope.row.Name : ""}}</span>
31
+          </template>
29
         </el-table-column>
32
         </el-table-column>
30
         <el-table-column prop="SingleDosage" label="单次用量" width="120" align="center">
33
         <el-table-column prop="SingleDosage" label="单次用量" width="120" align="center">
34
+          <template slot-scope="scope" >
35
+            <span>{{scope.row.SingleDosage ? scope.row.SingleDosage : ""}}</span>
36
+          </template>
37
+        </el-table-column>
38
+        <el-table-column prop="use" label="用法" width="120" align="center">
39
+          <template slot-scope="scope" >
40
+            <span>{{scope.row.Usage ? scope.row.Usage : ""}}</span>
41
+          </template>
31
         </el-table-column>
42
         </el-table-column>
32
-        <el-table-column prop="use" label="用法" width="120" align="center"> </el-table-column>
33
         <el-table-column prop="frequency" label="频率" width="120" align="center">
43
         <el-table-column prop="frequency" label="频率" width="120" align="center">
44
+          <template slot-scope="scope" >
45
+            <span>{{scope.row.Frequency ? scope.row.Frequency : ""}}</span>
46
+          </template>
47
+        </el-table-column>
48
+        <el-table-column prop="day" label="天数" width="120" align="center">
49
+          <template slot-scope="scope" >
50
+            <span>{{scope.row.Days ? scope.row.Days : ""}}</span>
51
+          </template>
34
         </el-table-column>
52
         </el-table-column>
35
-        <el-table-column prop="day" label="天数" width="120" align="center"> </el-table-column>
36
         <el-table-column prop="amount" label="总量" width="120" align="center">
53
         <el-table-column prop="amount" label="总量" width="120" align="center">
54
+          <template slot-scope="scope" >
55
+            <span>{{scope.row.Total ? scope.row.Total : ""}}</span>
56
+          </template>
57
+        </el-table-column>
58
+        <el-table-column prop="tips" label="数据来源" width="120" align="center">
59
+          <template slot-scope="scope" >
60
+            <span>{{scope.row.DataSources ? scope.row.DataSources : ""}}</span>
61
+          </template>
37
         </el-table-column>
62
         </el-table-column>
38
         <el-table-column prop="tips" label="备注" width="120" align="center">
63
         <el-table-column prop="tips" label="备注" width="120" align="center">
64
+          <template slot-scope="scope" >
65
+            <span>{{scope.row.Remarks ? scope.row.Remarks : ""}}</span>
66
+          </template>
39
         </el-table-column>
67
         </el-table-column>
40
       </el-table>
68
       </el-table>
41
     </div>
69
     </div>
50
   data() {
78
   data() {
51
     return {
79
     return {
52
       visibility: false,
80
       visibility: false,
53
-      tableData: [{}],
81
+      tableData: [],
54
       isClose:false,
82
       isClose:false,
55
       name:"",
83
       name:"",
56
       state:null,
84
       state:null,
85
+      times:"",
57
       org_name: this.$store.getters.xt_user.org.org_name,
86
       org_name: this.$store.getters.xt_user.org.org_name,
58
     };
87
     };
59
   },
88
   },
62
       type: Object,
91
       type: Object,
63
     },
92
     },
64
   },
93
   },
65
-
94
+  created(){
95
+    this.init();
96
+  },
66
   methods: {
97
   methods: {
67
     // isClose() {
98
     // isClose() {
68
     //   this.visibility = false;
99
     //   this.visibility = false;
69
     // },
100
     // },
101
+    init(){
102
+      // let year = new Date().getFullYear();
103
+      // let month = new Date().getMonth() +1;
104
+      // let day = new Date().getDate();
105
+      // let hour = new Date().getHours();
106
+      // let minute = new Date().getMinutes();
107
+      // this.times = year + "年" + month + "月" + day + "日" + hour + "时" + minute + "分"
108
+      // console.log("times:",this.times)
109
+    },
70
 
110
 
71
     hide: function () {
111
     hide: function () {
72
       this.visibility = false;
112
       this.visibility = false;
78
         }
118
         }
79
       }
119
       }
80
     },
120
     },
81
-    show: function () {
121
+    show: function (val,data,state,times) {
122
+      this.times = times
82
       this.visibility = true;
123
       this.visibility = true;
124
+      console.log("val",val)
125
+      this.tableData = val
126
+      this.name = data.Name
127
+      if (state == 1){
128
+        this.state = "待发药"
129
+      }
130
+      if (state == 2){
131
+        this.state = "已发药"
132
+      }
133
+
83
     },
134
     },
84
 
135
 
85
     comfirm: function (formName) {
136
     comfirm: function (formName) {
93
 
144
 
94
     // 打印
145
     // 打印
95
     print() {
146
     print() {
147
+      console.log(this.org_name,'this.org_name')
96
       Vue.prototype.printJson = printutils.printJson;
148
       Vue.prototype.printJson = printutils.printJson;
97
       //   const style =
149
       //   const style =
98
       //     '@media print {.list_title{  width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto}}';
150
       //     '@media print {.list_title{  width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto}}';
109
         <div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;font-size:14px;">
161
         <div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;font-size:14px;">
110
         <div style="width: 310px;padding: 10px 0;">患者名称:${this.name}</div>
162
         <div style="width: 310px;padding: 10px 0;">患者名称:${this.name}</div>
111
         <div style="width: 320px;padding: 10px 0;">发药状态:${this.state}</div>
163
         <div style="width: 320px;padding: 10px 0;">发药状态:${this.state}</div>
112
-        <div style="width: 310px;padding: 10px 0;">日期:</div>
113
-        </div>`, // 打印出来的标题
164
+        <div style="width: 310px;padding: 10px 0;">日期:${this.times}</div>
165
+        </div></div>`, // 打印出来的标题
114
         data: this.tableData, // 需要打印的数据
166
         data: this.tableData, // 需要打印的数据
115
         serial: true, // 是否需要打印序列号
167
         serial: true, // 是否需要打印序列号
116
         fields: [
168
         fields: [
117
           // 需要打印的字段
169
           // 需要打印的字段
118
-          // "index",
170
+
119
           "Name",
171
           "Name",
120
           "SingleDosage",
172
           "SingleDosage",
121
-          "use",
122
-          "frequency",
123
-          "day",
124
-          "amount",
125
-          "from",
126
-          "tips",
173
+          "Usage",
174
+          "Frequency",
175
+          "Days",
176
+          "Total",
177
+          "DataSources",
178
+          "Remarks",
127
         ],
179
         ],
128
         properties: [
180
         properties: [
129
           // 需要打印的字段对应的表头名
181
           // 需要打印的字段对应的表头名
130
-         
182
+
131
           {
183
           {
132
-            field: "name",
184
+            field: "Name",
133
             displayName: "名称",
185
             displayName: "名称",
134
           },
186
           },
135
           {
187
           {
136
             field: "SingleDosage",
188
             field: "SingleDosage",
137
-            displayName: "单用量",
189
+            displayName: "单用量",
138
           },
190
           },
139
           {
191
           {
140
-            field: "use",
192
+            field: "Usage",
141
             displayName: "用法",
193
             displayName: "用法",
142
           },
194
           },
143
           {
195
           {
144
-            field: "frequency",
196
+            field: "Frequency",
145
             displayName: "频率",
197
             displayName: "频率",
146
           },
198
           },
147
           {
199
           {
148
-            field: "day",
200
+            field: "Days",
149
             displayName: "天数",
201
             displayName: "天数",
150
           },
202
           },
151
           {
203
           {
152
-            field: "amount",
204
+            field: "Total",
153
             displayName: "总量",
205
             displayName: "总量",
154
           },
206
           },
155
           {
207
           {
156
-            field: "from",
208
+            field: "DataSources",
157
             displayName: "数据来源",
209
             displayName: "数据来源",
158
           },
210
           },
159
           {
211
           {
160
-            field: "tips",
212
+            field: "Remarks",
161
             displayName: "备注",
213
             displayName: "备注",
162
           },
214
           },
163
         ],
215
         ],
167
 };
219
 };
168
 </script>
220
 </script>
169
 
221
 
170
-<style rel="stylesheet/css" lang="scss" scoped>
222
+<style lang="scss" scoped>
171
 /deep/ .el-dialog{
223
 /deep/ .el-dialog{
172
   width: 60%;
224
   width: 60%;
173
 }
225
 }
174
-
175
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
226
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
176
   width: 10px;
227
   width: 10px;
177
   height: 10px;
228
   height: 10px;
219
 .el-table::before {
270
 .el-table::before {
220
   background-color: #d0d3da;
271
   background-color: #d0d3da;
221
 }
272
 }
222
-</style>
273
+</style>

+ 2 - 1
src/xt_pages/data/components/addDrugs.vue View File

621
           is_user:"2",
621
           is_user:"2",
622
           sum_count:"",
622
           sum_count:"",
623
           sum_in_count:"",
623
           sum_in_count:"",
624
-          is_pharmacy:0,//是否通过药房发药
624
+          is_pharmacy:1,//是否通过药房发药
625
         },
625
         },
626
 
626
 
627
         rules: {
627
         rules: {
737
         this.form.intro = ''
737
         this.form.intro = ''
738
       },
738
       },
739
       show(id, obj) {
739
       show(id, obj) {
740
+        console.log("obj3223323232332",obj)
740
         this.unitList = []
741
         this.unitList = []
741
         this.packingUnit = []
742
         this.packingUnit = []
742
         var arr =  getDataConfig('hemodialysis','units')
743
         var arr =  getDataConfig('hemodialysis','units')

+ 7 - 2
src/xt_pages/dialysis/PatientBox.vue View File

240
 import treatmentSummaryDialog from "../dialysis/details/dialog/treatmentSummaryDialog";
240
 import treatmentSummaryDialog from "../dialysis/details/dialog/treatmentSummaryDialog";
241
 import {
241
 import {
242
   getDialysisScheduleDetail,
242
   getDialysisScheduleDetail,
243
-  getLongAdvice,
243
+  getLongAdviceOne,
244
 } from "@/api/dialysis_record";
244
 } from "@/api/dialysis_record";
245
 
245
 
246
 export default {
246
 export default {
340
       type: Array,
340
       type: Array,
341
     },
341
     },
342
     patientStateVal: Number,
342
     patientStateVal: Number,
343
+    selected_date:String,
343
   },
344
   },
344
 
345
 
345
   methods: {
346
   methods: {
661
       });
662
       });
662
     },
663
     },
663
     getLongAdvice() {
664
     getLongAdvice() {
665
+    
664
       let params = {
666
       let params = {
665
         patient_id: this.patient_id,
667
         patient_id: this.patient_id,
668
+        schedule_date:parseTime(this.selected_date, '{y}-{m}-{d}'),
666
       };
669
       };
667
-      getLongAdvice(params).then((rs) => {
670
+      getLongAdviceOne(params).then((rs) => {
668
         var resp = rs.data;
671
         var resp = rs.data;
669
         if (resp.state == 1) {
672
         if (resp.state == 1) {
670
           var status = parseInt(resp.data.status);
673
           var status = parseInt(resp.data.status);
698
               }
701
               }
699
 
702
 
700
               this.is_open = resp.data.is_open_remind;
703
               this.is_open = resp.data.is_open_remind;
704
+              
701
               this.longAdvices = totalAdvice;
705
               this.longAdvices = totalAdvice;
706
+              console.log("长期医嘱22332323232232323",this.longAdvices)
702
               this.waitUploadAdvices = waitUploadAdvices;
707
               this.waitUploadAdvices = waitUploadAdvices;
703
               break;
708
               break;
704
           }
709
           }

+ 184 - 116
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

165
           :disabled="!is_has_exce"
165
           :disabled="!is_has_exce"
166
           @click="execAdvice"
166
           @click="execAdvice"
167
           :loading="deleLoading"
167
           :loading="deleLoading"
168
-
169
         >执行医嘱
168
         >执行医嘱
170
         </el-button>
169
         </el-button>
171
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
170
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
209
       <!-- 医嘱列表 -->
208
       <!-- 医嘱列表 -->
210
       <!--   @row-click="cellMouseEnter" -->
209
       <!--   @row-click="cellMouseEnter" -->
211
       <!--&lt;!&ndash;:header-cell-style="{ backgroundColor: 'rgb(64, 158, 255)', color: 'white'}"&ndash;&gt;@current-change="selectRow"-->
210
       <!--&lt;!&ndash;:header-cell-style="{ backgroundColor: 'rgb(64, 158, 255)', color: 'white'}"&ndash;&gt;@current-change="selectRow"-->
211
+      <!-- :span-method="objectSpanMethod" -->
212
       <el-table
212
       <el-table
213
         v-if="his_is_open !=1 && is_advice_open!=1"
213
         v-if="his_is_open !=1 && is_advice_open!=1"
214
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
214
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
219
         ref="advices_list"
219
         ref="advices_list"
220
         @row-click="cellMouseEnter"
220
         @row-click="cellMouseEnter"
221
         :row-class-name="tableRowClassName"
221
         :row-class-name="tableRowClassName"
222
-        :span-method="objectSpanMethod"
222
+        
223
         :cell-class-name="adviceNameShow"
223
         :cell-class-name="adviceNameShow"
224
         :modal-append-to-body="false"
224
         :modal-append-to-body="false"
225
+        @selection-change="handleSelectionChange"
225
         highlight-current-row
226
         highlight-current-row
226
-
227
       >
227
       >
228
-      <!-- @selection-change="handleSelectionChange" -->
229
-        <!-- <el-table-column type="selection"  width="55"></el-table-column> -->
228
+       <el-table-column type="selection"  width="55" ></el-table-column>
230
        <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
229
        <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
231
           <template slot-scope="scope">
230
           <template slot-scope="scope">
232
             <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
231
             <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
300
             <span>
299
             <span>
301
               {{getXuserName(scope.row.checker)}}
300
               {{getXuserName(scope.row.checker)}}
302
             </span>
301
             </span>
303
-
304
-
305
           </template>
302
           </template>
306
         </el-table-column>
303
         </el-table-column>
307
       </el-table>
304
       </el-table>
321
         :cell-class-name="adviceNameShow"
318
         :cell-class-name="adviceNameShow"
322
         :modal-append-to-body="false"
319
         :modal-append-to-body="false"
323
         highlight-current-row
320
         highlight-current-row
321
+        @selection-change="handleSelectionChange"
324
       >
322
       >
325
-        <!-- <el-table-column type="selection"  width="55"></el-table-column> -->
323
+        <el-table-column type="selection"  width="55"></el-table-column>
326
         <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
324
         <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
327
           <template slot-scope="scope">
325
           <template slot-scope="scope">
328
             <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
326
             <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
330
         </el-table-column>
328
         </el-table-column>
331
 
329
 
332
 
330
 
333
-        <!--===================================-->
334
-<!--        <el-table-column prop="date" label="调试" align="center" min-width="26px">-->
335
-<!--          <template slot-scope="scope">-->
336
-<!--            <span @click="lili(scope.$index,scope.row)">{{ scope.row.parent_id }}</span>-->
337
-<!--          </template>-->
338
-<!--        </el-table-column>-->
339
-
340
         <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
331
         <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
341
           <template slot-scope="scope">
332
           <template slot-scope="scope">
342
             <span>
333
             <span>
623
     EditDoctorAdvice,
614
     EditDoctorAdvice,
624
     ExecDoctorAdvice,
615
     ExecDoctorAdvice,
625
     getAdviceConfig,
616
     getAdviceConfig,
626
-    GetLastOrNextDoctorAdvice
617
+    GetLastOrNextDoctorAdvice,
618
+    GetOrderDoctorAdvice
627
   } from '@/api/advice'
619
   } from '@/api/advice'
628
   import { getDataConfig } from '@/utils/data'
620
   import { getDataConfig } from '@/utils/data'
629
 
621
 
780
         drug_id: 0,
772
         drug_id: 0,
781
         src_type:"",
773
         src_type:"",
782
         org_id:0,
774
         org_id:0,
775
+        hisAdviceIds:"",
776
+        adviceIds:"",
783
       }
777
       }
784
     },
778
     },
785
     watch: {
779
     watch: {
796
 
790
 
797
     },
791
     },
798
     methods: {
792
     methods: {
799
-      handleSelectionChange(){
800
-
801
-      },
802
-
803
-      //调试
804
-      lili(index,row){
805
-        // console.log("==index==",index)
806
-        // console.log("==row==",row)
807
-        console.log("==doctor_advices==",this.doctor_advices)
808
-        console.log("==this.form==",this.form)
793
+      handleSelectionChange(row){
794
+        console.log("row3233223232332322323",row)
795
+       if(row.length >0){
796
+         this.currentRow = row[0]
797
+       }
798
+       var bloodIds= []
799
+       var hisIds=[]
800
+       console.log("this.his_is_open ",this.his_is_open )
801
+       console.log("is_advice_open",this.is_advice_open)
802
+       for(let i=0;i<row.length;i++){
803
+        //血透
804
+         if(this.his_is_open  != 1 && this.is_advice_open!=1){
805
+            bloodIds.push(row[i].id)
806
+         }
807
+         //his
808
+         if(this.his_is_open == 1 && this.is_advice_open!=1){
809
+             hisIds.push(row[i].id)
810
+         }
811
+         
812
+         if(this.his_is_open == 1 && this.is_advice_open == 1){
813
+            if(row[i].origin == 1){
814
+              bloodIds.push(row[i].id)
815
+            }
816
+            if(row[i].origin == 2){
817
+              hisIds.push(row[i].id)
818
+            }
819
+           this.currentRow.origin = 3
820
+         }
821
+       }
822
+      
823
+       if(this.his_is_open  == 1 || this.is_advice_open == 1){
824
+         this.is_has_exce = true
825
+         this.is_has_check = true
826
+       }
827
+     
828
+       if(this.his_is_open!=1 && this.is_advice_open!=1){
829
+        
830
+          this.is_has_exce = true
831
+          this.is_has_check = true
832
+       }
833
+        console.log("bloodIds",bloodIds,"hisIds",hisIds)
834
+       this.adviceIds = bloodIds.join(",")
835
+       this.hisAdviceIds = hisIds.join(",")
836
+      
809
       },
837
       },
810
       getContent: function() {
838
       getContent: function() {
811
         if (this.sch != null) {
839
         if (this.sch != null) {
1242
         let mode = '6'
1270
         let mode = '6'
1243
 
1271
 
1244
 
1272
 
1245
-        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode,this.currentRow.origin).then(response => {
1273
+        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode,this.currentRow.origin,this.hisAdviceIds,this.adviceIds).then(response => {
1246
             if (response.data.state == 0) {
1274
             if (response.data.state == 0) {
1247
               this.$message.error(response.data.msg)
1275
               this.$message.error(response.data.msg)
1248
               this.exceLoading = false
1276
               this.exceLoading = false
1254
                 type: 'success',
1282
                 type: 'success',
1255
                 duration: 2000
1283
                 duration: 2000
1256
               })
1284
               })
1285
+              
1257
               var msg = response.data.data.msg
1286
               var msg = response.data.data.msg
1258
               if(msg == 1){
1287
               if(msg == 1){
1259
-                var exid = response.data.data.advice.id
1260
-                  if (response.data.data.advice.parent_id > 0) {
1261
-                    exid = response.data.data.advice.parent_id
1262
-                  }
1263
-
1264
-                  this.currentRow.execution_state = 1
1265
-                  this.currentRow.execution_staff =
1266
-                    response.data.data.advice.execution_staff
1267
-                  this.currentRow.execution_time =
1268
-                    response.data.data.advice.execution_time
1269
-                  var alen = this.doctor_advices.length
1270
-
1271
-                  for (var index in this.doctor_advices) {
1272
-                    if (
1273
-                      this.doctor_advices[index].id == exid ||
1274
-                      this.doctor_advices[index].parent_id == exid
1275
-                    ) {
1276
-                      this.doctor_advices[index].execution_state = 1
1277
-                      this.doctor_advices[index].execution_staff =
1278
-                        response.data.data.advice.execution_staff
1279
-                      this.doctor_advices[index].execution_time =
1280
-                        response.data.data.advice.execution_time
1281
-                      // this.doctor_advices[index].checker = response.data.data.advice.checker;
1282
-                      break
1283
-                    }
1284
-                  }
1285
-                  this.execTimeDialogVisible = false
1286
-
1287
-                  return false
1288
+                  let params = {
1289
+                  patient_id: this.patientid,
1290
+                  record_time: this.request_record_date,
1291
+                  type: 1,
1292
+                  advice_date:this.$route.query.date,
1293
+                }
1294
+                this.GetOrderDoctorAdvice(params)
1295
+                this.execTimeDialogVisible = false
1288
               }
1296
               }
1297
+            
1298
+              // if(msg == 1){
1299
+              //   var exid = response.data.data.advice.id
1300
+              //     if (response.data.data.advice.parent_id > 0) {
1301
+              //       exid = response.data.data.advice.parent_id
1302
+              //     }
1303
+
1304
+              //     this.currentRow.execution_state = 1
1305
+              //     this.currentRow.execution_staff =
1306
+              //       response.data.data.advice.execution_staff
1307
+              //     this.currentRow.execution_time =
1308
+              //       response.data.data.advice.execution_time
1309
+              //     var alen = this.doctor_advices.length
1310
+
1311
+              //     for (var index in this.doctor_advices) {
1312
+              //       if (
1313
+              //         this.doctor_advices[index].id == exid ||
1314
+              //         this.doctor_advices[index].parent_id == exid
1315
+              //       ) {
1316
+              //         this.doctor_advices[index].execution_state = 1
1317
+              //         this.doctor_advices[index].execution_staff =
1318
+              //           response.data.data.advice.execution_staff
1319
+              //         this.doctor_advices[index].execution_time =
1320
+              //           response.data.data.advice.execution_time
1321
+              //         break
1322
+              //       }
1323
+              //     }
1324
+              //     this.execTimeDialogVisible = false
1325
+
1326
+              //     return false
1327
+              // }
1289
 
1328
 
1290
               if(msg == 2){
1329
               if(msg == 2){
1291
                 this.$message.error("库存不足,请入库")
1330
                 this.$message.error("库存不足,请入库")
1331
+               let params = {
1332
+                patient_id: this.patientid,
1333
+                record_time: this.request_record_date,
1334
+                type: 1,
1335
+                advice_date:this.$route.query.date,
1336
+              }
1337
+              this.GetOrderDoctorAdvice(params)
1292
                 this.execTimeDialogVisible = false
1338
                 this.execTimeDialogVisible = false
1293
                 return false
1339
                 return false
1294
               }
1340
               }
1295
               if(msg == 3){
1341
               if(msg == 3){
1296
                 this.$message.error("无库存,请入库")
1342
                 this.$message.error("无库存,请入库")
1343
+               let params = {
1344
+                patient_id: this.patientid,
1345
+                record_time: this.request_record_date,
1346
+                type: 1,
1347
+                advice_date:this.$route.query.date,
1348
+              }
1349
+              this.GetOrderDoctorAdvice(params)
1297
                 this.execTimeDialogVisible = false
1350
                 this.execTimeDialogVisible = false
1298
                 return false
1351
                 return false
1299
               }
1352
               }
1602
             this.deleLoading = true
1655
             this.deleLoading = true
1603
             let mode = '7'
1656
             let mode = '7'
1604
 
1657
 
1605
-            CheckDoctorAdvice(this.patient.id, this.currentRow.id, mode,this.currentRow.origin).then(
1658
+            CheckDoctorAdvice(this.patient.id, this.currentRow.id, mode,this.currentRow.origin,this.hisAdviceIds,this.adviceIds).then(
1606
               response => {
1659
               response => {
1607
                 if (response.data.state == 0) {
1660
                 if (response.data.state == 0) {
1608
                   this.$message.error(response.data.msg)
1661
                   this.$message.error(response.data.msg)
1616
                     type: 'success',
1669
                     type: 'success',
1617
                     duration: 2000
1670
                     duration: 2000
1618
                   })
1671
                   })
1619
-
1620
-                  var exid = response.data.data.advice.id
1621
-                  if (response.data.data.advice.parent_id > 0) {
1622
-                    exid = response.data.data.advice.parent_id
1672
+                   let params = {
1673
+                    patient_id: this.patientid,
1674
+                    record_time: this.request_record_date,
1675
+                    type: 1,
1676
+                    advice_date:this.$route.query.date,
1623
                   }
1677
                   }
1624
-                  // if (this.currentRow.parent_id > 0) {
1625
-                  //     exid = this.currentRow.parent_id;
1678
+                console.log("param233223223233232",params)
1679
+                 this.GetOrderDoctorAdvice(params)
1680
+                  // var exid = response.data.data.advice.id
1681
+                  // if (response.data.data.advice.parent_id > 0) {
1682
+                  //   exid = response.data.data.advice.parent_id
1683
+                  // }
1684
+                  // this.currentRow.check_state = 1
1685
+                  // this.currentRow.check_time =
1686
+                  //   response.data.data.advice.check_time
1687
+                  // this.currentRow.checker = response.data.data.advice.checker
1688
+                  // var alen = this.doctor_advices.length
1689
+
1690
+                  // for (var index in this.doctor_advices) {
1691
+                  //   if (
1692
+                  //     this.doctor_advices[index].id == exid ||
1693
+                  //     this.doctor_advices[index].parent_id == exid
1694
+                  //   ) {
1695
+                  //     this.doctor_advices[index].check_state = 1
1696
+                  //     this.doctor_advices[index].check_time =
1697
+                  //       response.data.data.advice.check_time
1698
+                  //     this.doctor_advices[index].checker =
1699
+                  //       response.data.data.advice.checker
1700
+                  //     // break;
1701
+                  //   }
1626
                   // }
1702
                   // }
1627
-                  this.currentRow.check_state = 1
1628
-                  this.currentRow.check_time =
1629
-                    response.data.data.advice.check_time
1630
-                  this.currentRow.checker = response.data.data.advice.checker
1631
-                  var alen = this.doctor_advices.length
1632
-
1633
-                  for (var index in this.doctor_advices) {
1634
-                    if (
1635
-                      this.doctor_advices[index].id == exid ||
1636
-                      this.doctor_advices[index].parent_id == exid
1637
-                    ) {
1638
-                      this.doctor_advices[index].check_state = 1
1639
-                      this.doctor_advices[index].check_time =
1640
-                        response.data.data.advice.check_time
1641
-                      this.doctor_advices[index].checker =
1642
-                        response.data.data.advice.checker
1643
-                      // break;
1644
-                    }
1645
-                  }
1646
 
1703
 
1647
                   this.deleLoading = false
1704
                   this.deleLoading = false
1648
                 }
1705
                 }
1736
           this.nowExecTime = new Date(group_top_advice.start_time * 1000)
1793
           this.nowExecTime = new Date(group_top_advice.start_time * 1000)
1737
         }
1794
         }
1738
         this.$refs.exec_time.open()
1795
         this.$refs.exec_time.open()
1739
-        // if (this.currentRow == null) {
1740
-        //   this.$message.error("请先选择要执行的医嘱!");
1741
-        //   return false;
1742
-        // }
1743
-        //
1744
-        // if (
1745
-        //   this.currentRow.stop_state == 1 ||
1746
-        //   this.currentRow.execution_state == 1
1747
-        // ) {
1748
-        //   this.$message.error("所选医嘱已停止或执行");
1749
-        //   return false;
1750
-        // }
1751
-        //
1752
-        // if (
1753
-        //   this.currentRow.checker > 0 &&
1754
-        //   this.currentRow.checker == this.$store.getters.xt_user.user.id
1755
-        // ) {
1756
-        //   this.$message.error("核对与执行不能是同一人");
1757
-        //   return false;
1758
-        // }
1759
-        //
1760
-        // this.execTimeDialogVisible = true;
1761
-        // this.deleLoading = true;
1762
       }
1796
       }
1763
       ,
1797
       ,
1764
 
1798
 
2009
       }
2043
       }
2010
       ,
2044
       ,
2011
       show(his_is_open,is_advice_open) {
2045
       show(his_is_open,is_advice_open) {
2012
-        console.log("his_is_open233232323232323322323",his_is_open)
2013
-        console.log("is_advice_open233232323232323322323",is_advice_open)
2014
         this.his_is_open = his_is_open
2046
         this.his_is_open = his_is_open
2015
         this.is_advice_open = is_advice_open
2047
         this.is_advice_open = is_advice_open
2016
         this.isVisibility = true
2048
         this.isVisibility = true
2116
         }
2148
         }
2117
       },
2149
       },
2118
       cellMouseEnter: function(row, column, event) {
2150
       cellMouseEnter: function(row, column, event) {
2119
-        console.log("row323323322323233232",row)
2151
+       
2120
         this.currentRow = row
2152
         this.currentRow = row
2121
         this.groupSelectRow = row
2153
         this.groupSelectRow = row
2122
         // this.sameRowArr.forEach((arr, i) => {
2154
         // this.sameRowArr.forEach((arr, i) => {
2286
       }
2318
       }
2287
       ,
2319
       ,
2288
       GetLastOrNextDoctorAdvice(params) {
2320
       GetLastOrNextDoctorAdvice(params) {
2321
+       
2289
         GetLastOrNextDoctorAdvice(params).then(response => {
2322
         GetLastOrNextDoctorAdvice(params).then(response => {
2290
           if (response.data.state == 1) {
2323
           if (response.data.state == 1) {
2291
 
2324
 
2292
             var doctor_advices = response.data.data.advices
2325
             var doctor_advices = response.data.data.advices
2293
-
2294
             this.other_doctor_advices = doctor_advices
2326
             this.other_doctor_advices = doctor_advices
2295
             this.request_record_date = uParseTime(this.other_doctor_advices[0].record_date, '{y}-{m}-{d}')
2327
             this.request_record_date = uParseTime(this.other_doctor_advices[0].record_date, '{y}-{m}-{d}')
2296
             this.sch = response.data.data.schedule
2328
             this.sch = response.data.data.schedule
2301
         })
2333
         })
2302
 
2334
 
2303
       },
2335
       },
2336
+      GetOrderDoctorAdvice(params){
2337
+        GetOrderDoctorAdvice(params).then(response=>{
2338
+           if(response.data.state == 1){
2339
+            var doctorAdvice =  response.data.data.doctorAdvice
2340
+            for(let i=0;i<doctorAdvice.lenght;i++){
2341
+               doctorAdvice[i].origin = 1 
2342
+            }
2343
+            
2344
+            var hisDoctorAdvice = response.data.data.hisDoctorAdvice
2345
+            for(let i=0;i<hisDoctorAdvice.length;i++){
2346
+               hisDoctorAdvice[i].origin = 2
2347
+            }
2348
+            this.doctor_advices = []
2349
+            if(this.his_is_open!=1 && this.is_advice_open !=1){
2350
+              
2351
+               this.doctor_advices = doctorAdvice
2352
+            }
2353
+            if(this.his_is_open ==1 && this.is_advice_open!=1){
2354
+              this.doctor_advices = hisDoctorAdvice
2355
+            }
2356
+
2357
+            if(this.his_is_open == 1 &&  this.is_advice_open == 1){
2358
+               for(let i=0;i<doctorAdvice.length;i++){
2359
+                  this.doctor_advices.push(doctorAdvice[i])
2360
+               }
2361
+               for(let i=0;i<hisDoctorAdvice.length;i++){
2362
+                 this.doctor_advices.push(hisDoctorAdvice[i])
2363
+               }
2364
+            }
2365
+           
2366
+           
2367
+           }
2368
+        })
2369
+      },
2304
       getDialysisScheduleDetail() {
2370
       getDialysisScheduleDetail() {
2305
         if(this.$route.query.showView && this.$route.query.showView == true){
2371
         if(this.$route.query.showView && this.$route.query.showView == true){
2306
           return
2372
           return
2341
           let params = {
2407
           let params = {
2342
             patient_id: this.patientid,
2408
             patient_id: this.patientid,
2343
             record_time: this.request_record_date,
2409
             record_time: this.request_record_date,
2344
-            type: 1
2410
+            type: 1,
2411
+            advice_date:this.$route.query.date,
2345
           }
2412
           }
2346
 
2413
 
2347
           this.GetLastOrNextDoctorAdvice(params)
2414
           this.GetLastOrNextDoctorAdvice(params)
2350
           let params = {
2417
           let params = {
2351
             patient_id: this.patientid,
2418
             patient_id: this.patientid,
2352
             record_time: this.request_record_date,
2419
             record_time: this.request_record_date,
2353
-            type: 1
2420
+            type: 1,
2421
+            advice_date:this.$route.query.date,
2354
           }
2422
           }
2355
 
2423
 
2356
           this.GetLastOrNextDoctorAdvice(params)
2424
           this.GetLastOrNextDoctorAdvice(params)
2366
           let params = {
2434
           let params = {
2367
             patient_id: this.patientid,
2435
             patient_id: this.patientid,
2368
             record_time: this.request_record_date,
2436
             record_time: this.request_record_date,
2369
-            type: 2
2437
+            type: 2,
2438
+            advice_date:this.$route.query.date,
2370
           }
2439
           }
2371
 
2440
 
2372
           this.GetLastOrNextDoctorAdvice(params)
2441
           this.GetLastOrNextDoctorAdvice(params)
2374
           let params = {
2443
           let params = {
2375
             patient_id: this.patientid,
2444
             patient_id: this.patientid,
2376
             record_time: this.request_record_date,
2445
             record_time: this.request_record_date,
2377
-            type: 2
2446
+            type: 2,
2447
+            advice_date:this.$route.query.date,
2378
           }
2448
           }
2379
           this.GetLastOrNextDoctorAdvice(params)
2449
           this.GetLastOrNextDoctorAdvice(params)
2380
 
2450
 
2562
      }
2632
      }
2563
     },
2633
     },
2564
     created() {
2634
     created() {
2635
+      console.log("doctor_advices32323233323322332",this.doctor_advices)
2565
       var date = this.$route.query && this.$route.query.date
2636
       var date = this.$route.query && this.$route.query.date
2566
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
2637
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
2567
       this.form.advice_date = this.record_date
2638
       this.form.advice_date = this.record_date
2571
       this.org_id = this.$store.getters.xt_user.org.id
2642
       this.org_id = this.$store.getters.xt_user.org.id
2572
       this.patientid = this.$route.query.patient_id
2643
       this.patientid = this.$route.query.patient_id
2573
       this.request_record_date = this.record_date
2644
       this.request_record_date = this.record_date
2574
-
2575
-
2576
-      // this.getDialysisScheduleDetail()
2577
        //获取自备药
2645
        //获取自备药
2578
       this.getSelfMedicalList()
2646
       this.getSelfMedicalList()
2579
     },
2647
     },

+ 43 - 23
src/xt_pages/dialysis/details/index.vue View File

17
           @click="next"
17
           @click="next"
18
           >下一位</el-button
18
           >下一位</el-button
19
         >
19
         >
20
-        <!-- <el-button
20
+        <el-button
21
           size="small"
21
           size="small"
22
           type="primary"
22
           type="primary"
23
           @click="printOrderOne"
23
           @click="printOrderOne"
24
           icon="el-icon-printer"
24
           icon="el-icon-printer"
25
-          >打印上机单</el-button> -->
25
+          >打印上机单</el-button>
26
 
26
 
27
         <el-button
27
         <el-button
28
           size="small"
28
           size="small"
235
         <div class="print_main_content">
235
         <div class="print_main_content">
236
           <div class="table_panel">
236
           <div class="table_panel">
237
              <div v-for="(main_collection,index) in printList" :key="index">
237
              <div v-for="(main_collection,index) in printList" :key="index">
238
-              <div class="signPrint" style="font-size:16px;">
238
+              <div class="signPrint" style="width: 360px;font-size:16px;">
239
                 <div style="margin-left:50px;">姓名:
239
                 <div style="margin-left:50px;">姓名:
240
                   <span>{{main_collection.patient.name}} </span>
240
                   <span>{{main_collection.patient.name}} </span>
241
                   ({{ main_collection.patient.dialysis_no }},{{ main_collection.patient.age }}岁)
241
                   ({{ main_collection.patient.dialysis_no }},{{ main_collection.patient.age }}岁)
242
                 </div>
242
                 </div>
243
-                <div class="printCell">
244
-                  <span>
243
+                <div class="printCell" style="display:flex;justify-content: space-around;">
244
+                  <span style="display: block;width: 50%;">
245
                     床号:{{ main_collection.number.number }}
245
                     床号:{{ main_collection.number.number }}
246
                     <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
246
                     <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
247
                     <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
247
                     <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
248
                     <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
248
                     <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
249
                   </span>
249
                   </span>
250
-                  <span>{{ printDate }}</span>
250
+                  <span style="display: block;width: 50%;">{{ printDate }}</span>
251
                 </div>
251
                 </div>
252
-                <div class="printCell">
253
-                   <span>干体重:{{main_collection.assessmentbefor.dry_weight}}Kg</span>
254
-                    <span>抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
252
+                <div class="printCell" style="display:flex;justify-content: space-around;">
253
+                   <span style="display: block;width: 50%;">干体重:{{main_collection.assessmentbefor.dry_weight}}Kg</span>
254
+                    <span style="display: block;width: 50%;">抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
255
 
255
 
256
                 </div>
256
                 </div>
257
-                <div class="printCell">
258
-                  <span>净重值:{{ main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.additional_weight }}Kg</span>
259
-                  首剂:<span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
257
+                <div class="printCell" style="display:flex;justify-content: space-around;">
258
+                  <span style="display: block;width: 50%;">净重值:{{ main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.additional_weight }}Kg</span>
259
+                  
260
+                  <span style="display: block;width: 50%;">
261
+                    首剂: <span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
260
                   <span v-if="main_collection.dialysissolution.anticoagulant == 2">
262
                   <span v-if="main_collection.dialysissolution.anticoagulant == 2">
261
                     {{main_collection.dialysissolution.anticoagulant_shouji}}mg
263
                     {{main_collection.dialysissolution.anticoagulant_shouji}}mg
262
                   </span>
264
                   </span>
287
                   <span v-if="main_collection.dialysissolution.anticoagulant == 11">
289
                   <span v-if="main_collection.dialysissolution.anticoagulant == 11">
288
                     {{main_collection.dialysissolution.anticoagulant_shouji}}iu
290
                     {{main_collection.dialysissolution.anticoagulant_shouji}}iu
289
                    </span>
291
                    </span>
292
+                    </span> 
293
+                 
290
                 </div>
294
                 </div>
291
-                <div class="printCell">
292
-                  <span>体重增加:{{ (main_collection.assessmentbefor.weight_before - assessmentAfterDislysis.weight_after).toFixed(2) }}Kg</span>
293
-                 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
295
+                <div class="printCell" style="display:flex;justify-content: space-around;">
296
+                  <span style="display: block;width: 50%;">体重增加:{{ (main_collection.assessmentbefor.weight_before - assessmentAfterDislysis.weight_after).toFixed(2) }}Kg</span>
297
+                 <span style="display: block;width: 50%;">
298
+                     维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
294
                    <span v-if="main_collection.dialysissolution.anticoagulant == 1">
299
                    <span v-if="main_collection.dialysissolution.anticoagulant == 1">
295
                     mg/h
300
                     mg/h
296
                   </span>
301
                   </span>
324
                   <span v-if="main_collection.dialysissolution.anticoagulant == 11">
329
                   <span v-if="main_collection.dialysissolution.anticoagulant == 11">
325
                     iu/h
330
                     iu/h
326
                    </span>
331
                    </span>
332
+                  </span>
333
+                
327
                 </div>
334
                 </div>
328
-                <div class="printCell">
329
-                  <span>处方脱水量:{{ main_collection.prescription.target_ultrafiltration }}L</span>
330
-                 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
335
+                <div class="printCell" style="display:flex;justify-content: space-around;">
336
+                  <span style="display: block;width: 50%;">处方脱水量:{{ main_collection.prescription.target_ultrafiltration }}L</span>
337
+                  <span style="display: block;width: 50%;">
338
+                    总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
331
                   <span v-if="main_collection.dialysissolution.anticoagulant == 1">
339
                   <span v-if="main_collection.dialysissolution.anticoagulant == 1">
332
                     mg
340
                     mg
333
                   </span>
341
                   </span>
361
                   <span v-if="main_collection.dialysissolution.anticoagulant == 11">
369
                   <span v-if="main_collection.dialysissolution.anticoagulant == 11">
362
                    iu
370
                    iu
363
                    </span>
371
                    </span>
372
+                  </span>
364
                 </div>
373
                 </div>
365
               </div>
374
               </div>
366
             </div>
375
             </div>
716
 import OperationStaff from './operationStaff'
725
 import OperationStaff from './operationStaff'
717
 import {
726
 import {
718
   getDialysisScheduleDetail,
727
   getDialysisScheduleDetail,
719
-  getLongAdvice,
728
+  getLongAdviceTwo,
720
   getDialysisRecordInitData,
729
   getDialysisRecordInitData,
721
   getDialysisSchedules,
730
   getDialysisSchedules,
722
   getInitPrintData
731
   getInitPrintData
1077
     },
1086
     },
1078
     getLongAdvice() {
1087
     getLongAdvice() {
1079
       const params = {
1088
       const params = {
1080
-        patient_id: this.patient_id
1089
+        patient_id: this.patient_id,
1090
+        schedule_date:this.$route.query.date,
1081
       }
1091
       }
1082
-      getLongAdvice(params).then(rs => {
1092
+      getLongAdviceTwo(params).then(rs => {
1083
         var resp = rs.data
1093
         var resp = rs.data
1084
         if (resp.state == 1) {
1094
         if (resp.state == 1) {
1085
           var status = parseInt(resp.data.status)
1095
           var status = parseInt(resp.data.status)
1120
                 this.is_open = 1
1130
                 this.is_open = 1
1121
               }
1131
               }
1122
               this.longAdvices = totalAdvice
1132
               this.longAdvices = totalAdvice
1133
+              console.log("长期医嘱汇总 u 公告让你😯23232322332",this.longAdvices)
1123
               this.waitUploadAdvices = waitUploadAdvices
1134
               this.waitUploadAdvices = waitUploadAdvices
1124
               break
1135
               break
1125
           }
1136
           }
1401
       )
1412
       )
1402
     },
1413
     },
1403
     printOrderOne(){
1414
     printOrderOne(){
1415
+
1404
       this.getInitPrintData()
1416
       this.getInitPrintData()
1405
 
1417
 
1406
     },
1418
     },
2145
     },
2157
     },
2146
     printAction: function() {
2158
     printAction: function() {
2147
         const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
2159
         const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
2148
-        const style1 = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 170px;} @page {margin-top:10px;}}'
2160
+        const style1 = '@page {margin-top:10px;} @media print{}'
2149
         printJS({
2161
         printJS({
2150
           printable: 'print_content',
2162
           printable: 'print_content',
2151
           type: 'html',
2163
           type: 'html',
2152
-          documentTitle: '  ',
2164
+          documentTitle: '',
2153
           style: style1,
2165
           style: style1,
2154
           scanStyles: false
2166
           scanStyles: false
2155
         })
2167
         })
2156
       },
2168
       },
2157
     getInitPrintData(){
2169
     getInitPrintData(){
2170
+      const loading = this.$loading({
2171
+        lock: true,
2172
+        text: 'Loading',
2173
+        spinner: 'el-icon-loading',
2174
+        background: 'rgba(0, 0, 0, 0.7)'
2175
+       })
2176
+      
2158
        var params = {
2177
        var params = {
2159
          patient_id:this.$route.query.patient_id,
2178
          patient_id:this.$route.query.patient_id,
2160
          record_date:this.$route.query.date,
2179
          record_date:this.$route.query.date,
2167
           this.printList = list
2186
           this.printList = list
2168
           this.assessmentAfterDislysis = assessmentAfterDislysis
2187
           this.assessmentAfterDislysis = assessmentAfterDislysis
2169
           this.startVisibility = true
2188
           this.startVisibility = true
2189
+          loading.close()
2170
         }
2190
         }
2171
       })
2191
       })
2172
     }
2192
     }

+ 7 - 5
src/xt_pages/dialysis/dialysisPrintOrder.vue View File

1421
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1421
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1422
       const style2 =
1422
       const style2 =
1423
         // 防止分页错位问题:table设置border: none;.tr设置page-break-inside:avoid; // 防止table数据太多,tr分页错乱 td设置border: 1px solid #000;// 防止部分分页的tr边框线没有
1423
         // 防止分页错位问题:table设置border: none;.tr设置page-break-inside:avoid; // 防止table数据太多,tr分页错乱 td设置border: 1px solid #000;// 防止部分分页的tr边框线没有
1424
-        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .print-table{border: none} .print-table tr{page-break-inside:avoid;} .print-table tr td{border: 1px solid #000;} .inside_table{border: none} .inside_table tr{page-break-inside:avoid;} .inside_table tr td{border: 1px solid #000;} .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;} .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px} ';
1424
+        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .print-table{border: none} .print-table tr{page-break-inside:avoid;} .print-table tr td{border: 1px solid #000;} .inside_table{border: none} .inside_table tr{page-break-inside:avoid;} .inside_table tr td{border: 1px solid #000;} .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 20px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;} .print_page_main_content .proj_table tbody tr inside_table tbody tr{page-break-inside:avoid;} .print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;} .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px} ';
1425
       const style3 =
1425
       const style3 =
1426
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:16px;border-color: #000;}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #000;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}.row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line {display: inline-block;border-bottom: 1px solid #000;text-align: center;white-space: nowrap; width: 50%;}';
1426
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:16px;border-color: #000;}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #000;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}.row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line {display: inline-block;border-bottom: 1px solid #000;text-align: center;white-space: nowrap; width: 50%;}';
1427
       // const style3 =
1427
       // const style3 =
1445
       const style11 =
1445
       const style11 =
1446
         '@media print {.dialysis-print-order{width:960px;margin:100px auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:30px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:15px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1446
         '@media print {.dialysis-print-order{width:960px;margin:100px auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:30px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:15px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1447
       // 雷州惠爱样式
1447
       // 雷州惠爱样式
1448
-      const style12 ='@page {margin-top:5px;}@media print {.dialysis-print-order{width:960px;margin:0 auto;margin-top:50px;} .dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:40px;font-size:14px} .dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:40px;font-size:14px} .print-table tbody tr td{border-collapse:collapse;} .dialysis-print-order .print-table .short_tr th p{height:20px !important; line-height:20px !important;} .list_table{border-collapse:collapse;height:40px;display: flex;justify-content: flex-start;} .list_table div{text-align: left;flex: 1;}  .list_table_1{height:40px;line-height:40px;text-align:left;border-collapse:collapse;} .list_table_1 div{height:40px;line-height:40px;} .dialysis-print-order .td_div1{display:flex;white-space: normal;} .dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;line-height:35px} .print-table tr th p{height: 20px; line-height: 20px}  .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}@page {margin-left:30px;margin-right:40px;} ';
1448
+      const style12 ='@page {margin-top:10px;}@media print {.dialysis-print-order{width:960px;margin:0 auto;margin-top:30px;} .dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:40px;font-size:14px} .dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:40px;font-size:14px} .print-table tbody tr td{border-collapse:collapse;} .dialysis-print-order .print-table .short_tr th p{height:20px !important; line-height:20px !important;} .list_table{border-collapse:collapse;height:40px;display: flex;justify-content: flex-start;} .list_table div{text-align: left;flex: 1;}  .list_table_1{height:40px;line-height:40px;text-align:left;border-collapse:collapse;} .list_table_1 div{height:40px;line-height:40px;} .dialysis-print-order .td_div1{display:flex;white-space: normal;} .dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;line-height:35px} .print-table tr th p{height: 20px; line-height: 20px}  .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}@page {margin-left:30px;margin-right:40px;}  .dialysis-print-order tbody .print-table tr{page-break-inside:avoid;} .dialysis-print-order tbody .print-table tr td{border: 1px solid #000;} ';
1449
       // 金乡宏大样式
1449
       // 金乡宏大样式
1450
       const style13 ='@page {margin-top:5px;}@media print {.dialysis-print-order{width:960px;margin:0 auto} .dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:40px;font-size:14px} .dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:40px;font-size:14px} .print-table tbody tr td{border-collapse:collapse;} .list_table{border-collapse:collapse;height:40px;display: flex;justify-content: flex-start;} .list_table div{text-align: left;flex: 1;}  .list_table_1{height:40px;line-height:40px;text-align:left;border-collapse:collapse;} .list_table_1 div{height:40px;line-height:40px;} .dialysis-print-order .print-table-2{ width: 100%;text-align: left;border-collapse: collapse;line-height: 38px;font-size: 14px;} .dialysis-print-order .print-table-2 tbody tr{height:43px; padding-bottom:-12px;} .print-table-2 tbody tr td{padding-bottom:-12px;} .td_div1{display:flex;white-space: normal;} .print-table-3{text-align: center;width: 390px;border-collapse: inherit;height: 129px !important;border: none;} .print-table-3 .tr_3{border-bottom: 1px solid;} .print-table-3 .td_3 {border-right: 1px solid;} .print-table-3 .td_3_1 {width:66px;border-right: 1px solid;} .print-table-3 .td_3_2 {width:72px;border-right: 1px solid;} .print-table-4{text-align: center;width: 300px;border-collapse: inherit;height: 129px !important;border: none;} .print-table-4 .tr_3{border-bottom: 1px solid;}  .print-table-4 .td_3 {border-right: 1px solid;} .print-table-4 .td_3_1 {width:66px;border-right: 1px solid;} .print-table-4 .td_3_2 {width:72px;border-right: 1px solid;} .print-table-5{width:100%;text-align:center;border-collapse:collapse;line-height:40px;font-size:14px} .dialysis-print-order .print-table-5 tr td_5{width:75px;} .dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;line-height:35px} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}@page {margin-left:30px;margin-right:40px;}';
1450
       const style13 ='@page {margin-top:5px;}@media print {.dialysis-print-order{width:960px;margin:0 auto} .dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:40px;font-size:14px} .dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:40px;font-size:14px} .print-table tbody tr td{border-collapse:collapse;} .list_table{border-collapse:collapse;height:40px;display: flex;justify-content: flex-start;} .list_table div{text-align: left;flex: 1;}  .list_table_1{height:40px;line-height:40px;text-align:left;border-collapse:collapse;} .list_table_1 div{height:40px;line-height:40px;} .dialysis-print-order .print-table-2{ width: 100%;text-align: left;border-collapse: collapse;line-height: 38px;font-size: 14px;} .dialysis-print-order .print-table-2 tbody tr{height:43px; padding-bottom:-12px;} .print-table-2 tbody tr td{padding-bottom:-12px;} .td_div1{display:flex;white-space: normal;} .print-table-3{text-align: center;width: 390px;border-collapse: inherit;height: 129px !important;border: none;} .print-table-3 .tr_3{border-bottom: 1px solid;} .print-table-3 .td_3 {border-right: 1px solid;} .print-table-3 .td_3_1 {width:66px;border-right: 1px solid;} .print-table-3 .td_3_2 {width:72px;border-right: 1px solid;} .print-table-4{text-align: center;width: 300px;border-collapse: inherit;height: 129px !important;border: none;} .print-table-4 .tr_3{border-bottom: 1px solid;}  .print-table-4 .td_3 {border-right: 1px solid;} .print-table-4 .td_3_1 {width:66px;border-right: 1px solid;} .print-table-4 .td_3_2 {width:72px;border-right: 1px solid;} .print-table-5{width:100%;text-align:center;border-collapse:collapse;line-height:40px;font-size:14px} .dialysis-print-order .print-table-5 tr td_5{width:75px;} .dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;line-height:35px} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}@page {margin-left:30px;margin-right:40px;}';
1451
 
1451
 
1735
           style: style,
1735
           style: style,
1736
           scanStyles: false,
1736
           scanStyles: false,
1737
         });
1737
         });
1738
-      } else if (this.org_template_info.template_id == 43) {
1738
+      } else if (
1739
+        this.org_template_info.template_id == 43
1740
+      ) {
1739
         printJS({
1741
         printJS({
1740
           printable: "dialysis-print-box-1",
1742
           printable: "dialysis-print-box-1",
1741
           type: "html",
1743
           type: "html",
1742
           style: style2,
1744
           style: style2,
1743
           scanStyles: false,
1745
           scanStyles: false,
1744
         });
1746
         });
1745
-      } else if (this.org_template_info.template_id == 44) {
1747
+      }else if (this.org_template_info.template_id == 44) {
1746
         printJS({
1748
         printJS({
1747
           printable: "dialysis-print-box-1",
1749
           printable: "dialysis-print-box-1",
1748
           type: "html",
1750
           type: "html",
1890
       const style =
1892
       const style =
1891
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1893
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1892
       const style2 =
1894
       const style2 =
1893
-        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
1895
+        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;} .print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
1894
 
1896
 
1895
       if (this.org_template_info.template_id == 1) {
1897
       if (this.org_template_info.template_id == 1) {
1896
         printJS({
1898
         printJS({

+ 2 - 1
src/xt_pages/dialysis/schedualPatient.vue View File

85
         <div v-for="zone_schedule in allPatient" :key="zone_schedule.zone_id" class="list clearfix">
85
         <div v-for="zone_schedule in allPatient" :key="zone_schedule.zone_id" class="list clearfix">
86
           <!-- <h3 style="width:40px;" class="title">{{zone_schedule.zone_name}}</h3> -->
86
           <!-- <h3 style="width:40px;" class="title">{{zone_schedule.zone_name}}</h3> -->
87
           <div v-if="zone_schedule.schedules.length > 0 && patientStateVal != 1" style="font-size:16px;font-weight: bold;color: #34495e;margin-right:10px;line-height:30px;">{{zone_schedule.zone_name}}</div>
87
           <div v-if="zone_schedule.schedules.length > 0 && patientStateVal != 1" style="font-size:16px;font-weight: bold;color: #34495e;margin-right:10px;line-height:30px;">{{zone_schedule.zone_name}}</div>
88
-          <patient-box :schedules="zone_schedule.schedules" :patientStateVal='patientStateVal' style="flex:1"></patient-box>
88
+          <patient-box :schedules="zone_schedule.schedules" :patientStateVal='patientStateVal' :selected_date="selected_date" style="flex:1"></patient-box>
89
         </div>
89
         </div>
90
         
90
         
91
         <div class="NoData" v-show="filtedSchedules.length == 0">
91
         <div class="NoData" v-show="filtedSchedules.length == 0">
299
       var patient_state_selected = this.$store.getters.patient_state_selected
299
       var patient_state_selected = this.$store.getters.patient_state_selected
300
       var treat_state_selected = this.$store.getters.treat_state_selected
300
       var treat_state_selected = this.$store.getters.treat_state_selected
301
       var selected_date = this.$store.getters.selected_date
301
       var selected_date = this.$store.getters.selected_date
302
+
302
       if (schedule_type_selected) {
303
       if (schedule_type_selected) {
303
         this.schedule_type_selected = schedule_type_selected.schedule_type_selected
304
         this.schedule_type_selected = schedule_type_selected.schedule_type_selected
304
       }
305
       }

+ 11 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderFiftySix.vue View File

1115
                       <span v-if="prescription.anticoagulant == 2">iu</span>
1115
                       <span v-if="prescription.anticoagulant == 2">iu</span>
1116
                       <span v-if="prescription.anticoagulant == 1">mg</span>
1116
                       <span v-if="prescription.anticoagulant == 1">mg</span>
1117
                     </div>
1117
                     </div>
1118
-                    
1119
                   </div>
1118
                   </div>
1120
                 </td>
1119
                 </td>
1121
               </tr>
1120
               </tr>
3268
               monitor.operate_time == this.dialysisOrder.end_time
3267
               monitor.operate_time == this.dialysisOrder.end_time
3269
             ) {
3268
             ) {
3270
               this.monitors[index].end = "【结束透析】";
3269
               this.monitors[index].end = "【结束透析】";
3271
-              
3270
+
3272
               tempmonitorflag = false;
3271
               tempmonitorflag = false;
3273
             }
3272
             }
3274
             if (tempmonitorflag == false && index == this.monitors.length - 1) {
3273
             if (tempmonitorflag == false && index == this.monitors.length - 1) {
3433
             }
3432
             }
3434
           }
3433
           }
3435
         }
3434
         }
3435
+
3436
         if (this.org_id == 10330 || this.org_id == 0 || this.org_id == 9675) {
3436
         if (this.org_id == 10330 || this.org_id == 0 || this.org_id == 9675) {
3437
-          this.doctor_advices = this.doctor_advices.filter(o => o.delivery_way.indexOf("注射") > -1)
3437
+          let newArr = [];
3438
+          this.doctor_advices.forEach((o) => {
3439
+            if (o.delivery_way && o.delivery_way != "") {
3440
+              if (o.delivery_way.indexOf("注射") > -1) {
3441
+                newArr.push(o);
3442
+              }
3443
+            }
3444
+          });
3445
+          this.doctor_advices = newArr;
3438
         }
3446
         }
3439
 
3447
 
3440
         this.totollength = this.doctor_advices.length + this.monitors.length;
3448
         this.totollength = this.doctor_advices.length + this.monitors.length;

File diff suppressed because it is too large
+ 1095 - 1708
src/xt_pages/dialysis/template/DialysisPrintOrderFiftyThree.vue


File diff suppressed because it is too large
+ 2094 - 2175
src/xt_pages/dialysis/template/DialysisPrintOrderFiftyfive.vue


+ 1 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFortyFour.vue View File

1395
             this.tableAdvice.push([]);
1395
             this.tableAdvice.push([]);
1396
           }
1396
           }
1397
         }
1397
         }
1398
+         
1398
         this.monitors = response.data.data.monitors
1399
         this.monitors = response.data.data.monitors
1399
         this.summary = response.data.data.summary
1400
         this.summary = response.data.data.summary
1400
         this.org_template_info = response.data.data.org_template_info
1401
         this.org_template_info = response.data.data.org_template_info

+ 15 - 14
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue View File

749
                         class="under_line"
749
                         class="under_line"
750
                         style="width: 100px; text-align: center"
750
                         style="width: 100px; text-align: center"
751
                       >
751
                       >
752
-                        {{
753
-                          prescription.dialyzer_perfusion_apparatus
754
-                            ? prescription.dialyzer_perfusion_apparatus
755
-                            : ""
756
-                        }}
757
-                        <span
758
-                          v-if="
759
-                            !prescription.dialysis_dialyszers &&
760
-                            !prescription.dialyzer_perfusion_apparatus
761
-                          "
762
-                          >/</span
763
-                        >
764
-                        <span v-if="prescription.dialysis_dialyszers">/</span>
765
                         {{
752
                         {{
766
                           prescription.dialysis_dialyszers
753
                           prescription.dialysis_dialyszers
767
                             ? prescription.dialysis_dialyszers
754
                             ? prescription.dialysis_dialyszers
768
-                            : ""
755
+                            : "/"
769
                         }}
756
                         }}
770
                       </div>
757
                       </div>
771
                     </div>
758
                     </div>
759
+
772
                     <div class="inline_block" style="padding-right: 15px">
760
                     <div class="inline_block" style="padding-right: 15px">
773
                       灌流器:
761
                       灌流器:
774
                       <div
762
                       <div
782
                         }}
770
                         }}
783
                       </div>
771
                       </div>
784
                     </div>
772
                     </div>
773
+                    <!-- <div class="inline_block" style="flex: 1">
774
+                      透析器/灌流器:
775
+                      <div
776
+                        class="under_line"
777
+                        style="width: 130px; text-align: center"
778
+                      >
779
+                        {{
780
+                          prescription.dialyzer_perfusion_apparatus
781
+                            ? prescription.dialyzer_perfusion_apparatus
782
+                            : "/"
783
+                        }}
784
+                      </div>
785
+                    </div> -->
785
 
786
 
786
                     <div class="inline_block" style="flex: 1">
787
                     <div class="inline_block" style="flex: 1">
787
                       穿刺方式:
788
                       穿刺方式:

File diff suppressed because it is too large
+ 2301 - 927
src/xt_pages/dialysis/template/DialysisPrintOrderFortyThree.vue


+ 37 - 33
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

774
                     class="row"
774
                     class="row"
775
                     style="padding: 2px 0; line-height: 23px; display: flex"
775
                     style="padding: 2px 0; line-height: 23px; display: flex"
776
                   >
776
                   >
777
-                    <div class="inline_block" style="flex: 1">
777
+                    <div class="inline_block" style="flex: 1" v-if="org_id!=10290&&org_id!=9675">
778
                       透析(滤)器:
778
                       透析(滤)器:
779
                       <div
779
                       <div
780
                         class="under_line"
780
                         class="under_line"
785
                             ? prescription.dialyzer_perfusion_apparatus
785
                             ? prescription.dialyzer_perfusion_apparatus
786
                             : ""
786
                             : ""
787
                         }}
787
                         }}
788
+                        <span v-if="prescription.dialysis_dialyszers&&prescription.dialysis_dialyszers!=''">/</span>
788
                         {{
789
                         {{
789
                           prescription.dialysis_dialyszers
790
                           prescription.dialysis_dialyszers
790
                             ? prescription.dialysis_dialyszers
791
                             ? prescription.dialysis_dialyszers
791
-                            : "/"
792
+                            : ""
792
                         }}
793
                         }}
793
                       </div>
794
                       </div>
794
                     </div>
795
                     </div>
795
-                    <div class="inline_block" style="flex: 1">
796
+                    <div class="inline_block" style="flex: 1" v-if="org_id!=10290&&org_id!=9675">
796
                       灌流器:
797
                       灌流器:
797
                       <div
798
                       <div
798
                         class="under_line"
799
                         class="under_line"
805
                         }}
806
                         }}
806
                       </div>
807
                       </div>
807
                     </div>
808
                     </div>
809
+                    <div class="inline_block" style="flex: 1" v-if="org_id==10290||org_id==9675">
810
+                      透析器/灌流器:
811
+                      <div
812
+                        class="under_line"
813
+                        style="width: 100px; text-align: center"
814
+                      >
815
+                        {{
816
+                          prescription.dialyzer_perfusion_apparatus
817
+                            ? prescription.dialyzer_perfusion_apparatus
818
+                            : ""
819
+                        }}
820
+                        <span v-if="prescription.dialysis_dialyszers&&prescription.dialysis_dialyszers!=''">/</span>
821
+                        {{
822
+                          prescription.dialysis_dialyszers
823
+                            ? prescription.dialysis_dialyszers
824
+                            : ""
825
+                        }}
826
+                      </div>
827
+                    </div>
808
                     <div
828
                     <div
809
                       class="inline_block"
829
                       class="inline_block"
810
                       style="flex: 1"
830
                       style="flex: 1"
1319
                           {{ monitor.temperature ? monitor.temperature : "" }}
1339
                           {{ monitor.temperature ? monitor.temperature : "" }}
1320
                         </td>
1340
                         </td>
1321
 
1341
 
1322
-                        <td
1323
-                          v-if="
1324
-                            org_id != 9538 &&
1325
-                            org_id != 10121 &&
1326
-                            org_id != 9675 &&
1327
-                            org_id != 0
1328
-                          "
1329
-                        >
1330
-                          {{ monitor.conductivity ? monitor.conductivity : "" }}
1331
-                        </td>
1332
-                        <td v-if="org_id == 9538">
1333
-                          {{
1334
-                            monitor.sodium_concentration
1335
-                              ? monitor.sodium_concentration
1336
-                              : ""
1337
-                          }}
1338
-                        </td>
1339
                         <td
1342
                         <td
1340
                           v-if="
1343
                           v-if="
1341
                             org_id == 10121 || org_id == 9675 || org_id == 0
1344
                             org_id == 10121 || org_id == 9675 || org_id == 0
1347
                               : ""
1350
                               : ""
1348
                           }}
1351
                           }}
1349
                         </td>
1352
                         </td>
1353
+
1354
+
1350
                         <td
1355
                         <td
1351
                           v-if="
1356
                           v-if="
1352
-                            (dialysisOrder &&
1353
-                              monitor.operate_time > dialysisOrder.end_time) ||
1354
-                            (dialysisOrder &&
1355
-                              monitor.operate_time < dialysisOrder.start_time)
1357
+                            org_id != 9538 &&
1358
+                            org_id != 10121 &&
1359
+                            org_id != 9675 &&
1360
+                            org_id != 0
1356
                           "
1361
                           "
1357
                         >
1362
                         >
1363
+                          {{ monitor.conductivity ? monitor.conductivity : "" }}
1364
+                        </td>
1365
+
1366
+                        <td v-if="org_id == 9538">
1358
                           {{
1367
                           {{
1359
-                            monitor.ultrafiltration_volume
1360
-                              ? monitor.ultrafiltration_volume
1368
+                            monitor.sodium_concentration
1369
+                              ? monitor.sodium_concentration
1361
                               : ""
1370
                               : ""
1362
                           }}
1371
                           }}
1363
                         </td>
1372
                         </td>
1373
+                        
1364
                         <td
1374
                         <td
1365
-                          v-if="
1366
-                            dialysisOrder &&
1367
-                            monitor.operate_time <= dialysisOrder.end_time &&
1368
-                            dialysisOrder &&
1369
-                            monitor.operate_time >= dialysisOrder.start_time
1370
-                          "
1371
                         >
1375
                         >
1372
                           {{
1376
                           {{
1373
                             monitor.ultrafiltration_volume
1377
                             monitor.ultrafiltration_volume
1374
                               ? monitor.ultrafiltration_volume
1378
                               ? monitor.ultrafiltration_volume
1375
-                              : "0"
1379
+                              : ""
1376
                           }}
1380
                           }}
1377
                         </td>
1381
                         </td>
1378
                         <!-- <td style="width:50px">
1382
                         <!-- <td style="width:50px">

+ 2 - 1
src/xt_pages/hospitalStation/components/callPrescription.vue View File

165
 <script>
165
 <script>
166
   import { uParseTime } from '@/utils/tools'
166
   import { uParseTime } from '@/utils/tools'
167
   import { getDictionaryDataConfig} from "@/utils/data";
167
   import { getDictionaryDataConfig} from "@/utils/data";
168
-
168
+  const moment = require('moment')
169
   import {
169
   import {
170
     getCallHisPrescription
170
     getCallHisPrescription
171
   } from '@/api/his/his'
171
   } from '@/api/his/his'
353
         this.srcPrescriptions = srcPrescriptions;
353
         this.srcPrescriptions = srcPrescriptions;
354
         this.start_time  = start_time;
354
         this.start_time  = start_time;
355
         this.end_time = end_time;
355
         this.end_time = end_time;
356
+       
356
         this.patient_id = id;
357
         this.patient_id = id;
357
         this.name = '处方调用' + '('+name +')';
358
         this.name = '处方调用' + '('+name +')';
358
         this.allPrescription = prescriptions;
359
         this.allPrescription = prescriptions;

+ 6 - 2
src/xt_pages/hospitalStation/components/deskPrescription.vue View File

237
           <span    :class="!is_medicine_status ? 'statusRed' : ''">{{is_medicine_status?'已发药':'未发药'}}</span>
237
           <span    :class="!is_medicine_status ? 'statusRed' : ''">{{is_medicine_status?'已发药':'未发药'}}</span>
238
 
238
 
239
           <span :class="order_status == '未收费' ? 'statusRed' : ''">{{order_status}}</span>
239
           <span :class="order_status == '未收费' ? 'statusRed' : ''">{{order_status}}</span>
240
+
240
         </div>
241
         </div>
241
       </div>
242
       </div>
242
       <div class='centerRight'>
243
       <div class='centerRight'>
1862
         this.order_status = ''
1863
         this.order_status = ''
1863
       }
1864
       }
1864
 
1865
 
1865
-     this.is_medicine_status = this.curPrescriptions.is_medicine_status
1866
+      this.is_medicine_status = this.curPrescriptions.is_medicine_status
1866
       if (this.curPrescriptions.order_status == 1) {
1867
       if (this.curPrescriptions.order_status == 1) {
1867
         this.order_status = '未收费'
1868
         this.order_status = '未收费'
1868
       }
1869
       }
2190
         }
2191
         }
2191
         let params = {
2192
         let params = {
2192
           end_time: this.record_date,
2193
           end_time: this.record_date,
2193
-          start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
2194
+          start_time:  moment().add(-7, 'd').format("YYYY-MM-DD"),
2194
           patient_id: this.patientInfo.id,
2195
           patient_id: this.patientInfo.id,
2195
           p_type: 1
2196
           p_type: 1
2196
         }
2197
         }
3129
 
3130
 
3130
           if (temp.length > 0) {
3131
           if (temp.length > 0) {
3131
             for (let b = 0; b < temp.length; b++) {
3132
             for (let b = 0; b < temp.length; b++) {
3133
+              if(temp[b].max_unit == temp[b].min_unit){
3134
+                temp[b].retail_price = temp[b].min_price
3135
+              }
3132
               let temp_index = b + 1
3136
               let temp_index = b + 1
3133
               let obj = {
3137
               let obj = {
3134
                 advice_id: 0,
3138
                 advice_id: 0,

+ 7 - 8
src/xt_pages/hospitalStation/invoiceTemplate/printTwo.vue View File

58
       </div>
58
       </div>
59
       <div style="display: flex; justify-content: space-between">
59
       <div style="display: flex; justify-content: space-between">
60
         <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
60
         <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
61
-        <div
62
-          v-if="gend == 1"
63
-          style="position: absolute; top: 110px; left: 100px"
64
-        >
65
-          √
66
-        </div>
67
-        <div v-else style="position: absolute; top: 110px; left: 140px">√</div>
61
+        <div v-if="gend == 1" style="position: absolute; top: 110px; left: 100px">√</div>
62
+        <div v-else-if="gend == ''" style="position: absolute; top: 110px; left: 100px">√</div>
63
+         <div v-else style="position: absolute; top: 110px; left: 140px">√</div>
68
 
64
 
69
         <div style="position: absolute; top: 110px; left: 260px">
65
         <div style="position: absolute; top: 110px; left: 260px">
70
           {{ balance_accounts_type != 2 ? list.order.fund_pay_sumamt : "0.00" }}
66
           {{ balance_accounts_type != 2 ? list.order.fund_pay_sumamt : "0.00" }}
234
                   .substring(0, 1) != '拾' &&
230
                   .substring(0, 1) != '拾' &&
235
                 zhongwen
231
                 zhongwen
236
                   .substring(this.zhongwen.indexOf('元') - 1)
232
                   .substring(this.zhongwen.indexOf('元') - 1)
237
-                  .substring(0, 1) != '佰'
233
+                  .substring(0, 1) != '佰' &&
234
+                  zhongwen
235
+                  .substring(this.zhongwen.indexOf('元') - 1)
236
+                  .substring(0, 1) != '仟'
238
               "
237
               "
239
             >
238
             >
240
               {{
239
               {{

+ 2 - 1
src/xt_pages/outpatientCharges/invoiceTemplate/printFour.vue View File

33
         </div>
33
         </div>
34
         <div style="display:flex;justify-content: space-between;">
34
         <div style="display:flex;justify-content: space-between;">
35
             <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
35
             <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
36
-            <div v-if="paramsObj.gend == 1" style="position: absolute;top:110px;left:100px;">√</div>
36
+            <div v-if="paramsObj.gend == 1 || paramsObj.gend == ''" style="position: absolute;top:110px;left:100px;">√</div>
37
+            <div v-if="paramsObj.gend == ''" style="position: absolute;top:110px;left:100px;">√</div>
37
             <div v-else style="position: absolute;top:110px;left:140px;">√</div>
38
             <div v-else style="position: absolute;top:110px;left:140px;">√</div>
38
             <div style="position: absolute;top:110px;left:260px;">{{ list.number.length <= 13 ? (totalPrice - list.psn_cash_money).toFixed(2) : '0.00' }}</div>
39
             <div style="position: absolute;top:110px;left:260px;">{{ list.number.length <= 13 ? (totalPrice - list.psn_cash_money).toFixed(2) : '0.00' }}</div>
39
             <div style="position: absolute;top:110px;left:420px;">{{ list.number.length <= 13 ? list.psn_cash_money.toFixed(2) : (totalPrice - list.psn_cash_money).toFixed(2) }}</div>
40
             <div style="position: absolute;top:110px;left:420px;">{{ list.number.length <= 13 ? list.psn_cash_money.toFixed(2) : (totalPrice - list.psn_cash_money).toFixed(2) }}</div>

+ 326 - 0
src/xt_pages/outpatientDoctorStation/batch_mode_template.vue View File

1
+<template>
2
+    <div class="main-contain">
3
+        <div class="app-container">
4
+          <div style="margin-bottom:10px">
5
+                透析模式:
6
+                <el-select v-model="value" placeholder="请选择">
7
+                <el-option
8
+                v-for="item in options"
9
+                :key="item.value"
10
+                :label="item.label"
11
+                :value="item.value">
12
+                </el-option>
13
+                </el-select>
14
+               新增类型:
15
+                <el-select v-model="value" placeholder="请选择">
16
+                <el-option
17
+                v-for="item in options"
18
+                :key="item.value"
19
+                :label="item.label"
20
+                :value="item.value">
21
+                </el-option>
22
+                </el-select>
23
+              是否选择所有患者:
24
+                <el-select v-model="value" placeholder="请选择">
25
+                <el-option
26
+                v-for="item in options"
27
+                :key="item.value"
28
+                :label="item.label"
29
+                :value="item.value">
30
+                </el-option>
31
+                </el-select>
32
+            </div>
33
+         <el-container>
34
+               
35
+               <div style="width:27%">
36
+               
37
+                  <el-row>
38
+                    <el-table
39
+                        ref="singleTable"
40
+                        :data="patientList"
41
+                        highlight-current-row
42
+                        border
43
+                        @current-change="handleCurrentChange"
44
+                        height="440"
45
+                        :row-style="{ color: '#303133' }"
46
+                        :header-cell-style="{
47
+                        backgroundColor: 'rgb(245, 247, 250)',
48
+                        color: '#606266'
49
+                        }"
50
+                    >
51
+                     <el-table-column align="center" type="selection" width="55">
52
+                       <template slot-scope="scope">
53
+                      
54
+                      </template>
55
+                     </el-table-column>
56
+                     <el-table-column prop="date" label="患者姓名" align="center">
57
+                      <template slot-scope="scope">
58
+                        {{scope.row.name}}
59
+                      </template>
60
+                    </el-table-column>
61
+                   
62
+
63
+                     </el-table>
64
+                  </el-row>
65
+               </div>
66
+              <el-main>
67
+            <el-tabs v-model="editableTabsValue" type="border-card" editable @edit="handleTabsEdit">
68
+                <el-tab-pane
69
+                    :key="item.name"
70
+                    v-for="(item, index) in editableTabs"
71
+                    :label="item.title"
72
+                    :name="item.name"
73
+                >
74
+                    {{item.content}}
75
+                </el-tab-pane>
76
+            </el-tabs>
77
+             </el-main>
78
+                
79
+          </el-container>
80
+        </el-container>
81
+      </el-container>
82
+      </div>
83
+    </div>
84
+
85
+</template>
86
+<script>
87
+
88
+export default {
89
+  data(){
90
+    return{
91
+     patientList:[
92
+      {id:1,name:"张三"}
93
+     ],
94
+     tableList:[],
95
+     editableTabsValue: '2',
96
+     editableTabs: [{
97
+        title: 'Tab 1',
98
+        name: '1',
99
+        content: 'Tab 1 content'
100
+    }, {
101
+        title: 'Tab 2',
102
+        name: '2',
103
+        content: 'Tab 2 content'
104
+    }],
105
+    tabIndex: 2,
106
+     options: [{
107
+          value: '选项1',
108
+          label: '黄金糕'
109
+        }, {
110
+          value: '选项2',
111
+          label: '双皮奶'
112
+        }, {
113
+          value: '选项3',
114
+          label: '蚵仔煎'
115
+        }, {
116
+          value: '选项4',
117
+          label: '龙须面'
118
+        }, {
119
+          value: '选项5',
120
+          label: '北京烤鸭'
121
+        }],
122
+     value: ''
123
+    }
124
+  },
125
+  methods:{
126
+    handleTabsEdit(targetName, action) {
127
+        if (action === 'add') {
128
+          let newTabName = ++this.tabIndex + '';
129
+          this.editableTabs.push({
130
+            title: 'New Tab',
131
+            name: newTabName,
132
+            content: 'New Tab content'
133
+          });
134
+          this.editableTabsValue = newTabName;
135
+        }
136
+        if (action === 'remove') {
137
+          let tabs = this.editableTabs;
138
+          let activeName = this.editableTabsValue;
139
+          if (activeName === targetName) {
140
+            tabs.forEach((tab, index) => {
141
+              if (tab.name === targetName) {
142
+                let nextTab = tabs[index + 1] || tabs[index - 1];
143
+                if (nextTab) {
144
+                  activeName = nextTab.name;
145
+                }
146
+              }
147
+            });
148
+          }
149
+          
150
+          this.editableTabsValue = activeName;
151
+          this.editableTabs = tabs.filter(tab => tab.name !== targetName);
152
+        }
153
+    },
154
+    handleCurrentChange(){
155
+
156
+    }
157
+  },
158
+  created(){
159
+
160
+  },
161
+  
162
+}
163
+</script>
164
+
165
+
166
+   
167
+<style lang="scss" scoped> 
168
+
169
+    .zone{
170
+      //  margin-left: 30px;
171
+      //  text-align: left;
172
+       width: 70px;
173
+       display: inline-block;
174
+       color:#606266;
175
+    }
176
+    .disinfect{
177
+      position: relative;
178
+      .newButton{
179
+        // position: absolute;
180
+        // right: 2%;
181
+        // top:4px;
182
+        // z-index: 9;
183
+        margin-bottom: 10px;
184
+    margin-left: 90%;
185
+      }
186
+    }
187
+    .disinfectOne{
188
+      position: relative;
189
+      .newButtonOne{
190
+        position: absolute;
191
+         right: 0;
192
+         top: -10;
193
+         z-index: 18;
194
+      }
195
+    }
196
+    .but{
197
+      width: 200px;
198
+      height: 50px;
199
+      // border: solid 1px red;
200
+      margin-left: 77%;
201
+    }
202
+    .clearn{
203
+      width: 460px;
204
+      height: 50px;
205
+      // border:solid 1px red;
206
+      margin-left:650px;
207
+    }
208
+
209
+  .zClass{
210
+    width: 200px;
211
+    height: 200px;
212
+    // border:solid 1px red;
213
+    margin-left: 450px;
214
+    margin-top: 200px;
215
+  }
216
+  .warn{
217
+    color: red;
218
+    font-size: 14px;
219
+    width: 100%;
220
+    display: inline-block;
221
+    margin-left: 96px;
222
+  }
223
+
224
+  .userbutton{
225
+       margin-bottom: 10px;
226
+    margin-left: 82%
227
+  }
228
+
229
+</style>
230
+<style lang="scss" >
231
+
232
+   .a{
233
+     margin-bottom: 10px;
234
+      margin-top: 6px;
235
+
236
+   }
237
+
238
+   .b{
239
+    .el-button{
240
+      margin-left: 90%;
241
+      margin-bottom: 10px;
242
+    }
243
+   }
244
+
245
+   .stoppage{
246
+     .el-form-item__label{
247
+       width:190px;
248
+     }
249
+   }
250
+   .st{
251
+     .el-form-item__label{
252
+       width:-10px;
253
+     }
254
+   }
255
+   .main{
256
+     position: relative;
257
+     .newButtonOne{
258
+       position:absolute;
259
+       right: 0;
260
+       z-index: 2;
261
+     }
262
+   }
263
+
264
+    .elbutton{
265
+      // border: solid 1px red;
266
+      height: 50px;
267
+      width: 400px;
268
+      margin-left: 650px;
269
+    }
270
+  // .el-form-item__label {
271
+  //   width: 130px;
272
+  //   font-size: 14px;
273
+  // }
274
+  .el-form-item__error {
275
+    margin-left: 130px;
276
+  }
277
+
278
+ .el-upload-list__item-name {
279
+    color: #606266;
280
+    display: block;
281
+    margin-right: 40px;
282
+    overflow: hidden;
283
+    padding-left: 4px;
284
+    text-overflow: ellipsis;
285
+    transition: color .3s;
286
+    white-space: nowrap;
287
+}
288
+.el-main{
289
+  padding-top: 0px;
290
+}
291
+.newMain{
292
+  .el-form-item__label{
293
+    width: 104px;
294
+  }
295
+}
296
+.newDisinfectOne{
297
+  .el-input--prefix .el-input__inner{
298
+    padding-left: 15px
299
+  }
300
+}
301
+.stoppage{
302
+  .el-form-item__label{
303
+    width: 18%;
304
+  }
305
+}
306
+.newItem{
307
+  .el-form-item__label{
308
+    width: 130px;
309
+  }
310
+}
311
+.formItem{
312
+  .el-form-item__label{
313
+    width: 104px;
314
+    line-height: 30px;
315
+  }
316
+}
317
+.newname{
318
+  .el-form-item__label{
319
+    width: 60px;
320
+  }
321
+}
322
+::-webkit-scrollbar{
323
+  height: 20px;
324
+}
325
+
326
+</style>

+ 10 - 4
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue View File

165
 <script>
165
 <script>
166
   import { uParseTime } from '@/utils/tools'
166
   import { uParseTime } from '@/utils/tools'
167
   import { getDictionaryDataConfig} from "@/utils/data";
167
   import { getDictionaryDataConfig} from "@/utils/data";
168
-
168
+  const moment = require('moment')
169
   import {
169
   import {
170
     getCallHisPrescription
170
     getCallHisPrescription
171
   } from '@/api/his/his'
171
   } from '@/api/his/his'
192
           p_type:2,
192
           p_type:2,
193
         };
193
         };
194
         this.GetCallHisPrescription(params)
194
         this.GetCallHisPrescription(params)
195
-      },changeEndTime(){
195
+      },
196
+      changeEndTime(){
196
         let params={
197
         let params={
197
           patient_id:this.patient_id,
198
           patient_id:this.patient_id,
198
           start_time: this.start_time,
199
           start_time: this.start_time,
203
         this.GetCallHisPrescription(params)
204
         this.GetCallHisPrescription(params)
204
       },
205
       },
205
       GetCallHisPrescription(params){
206
       GetCallHisPrescription(params){
207
+        console.log("param222222222",params)
206
         getCallHisPrescription(params).then(response => {
208
         getCallHisPrescription(params).then(response => {
207
           if (response.data.state == 1) {
209
           if (response.data.state == 1) {
208
             this.allPrescription = response.data.data.prescriptions;
210
             this.allPrescription = response.data.data.prescriptions;
371
           this.srcPrescriptions =  this.srcPrescriptions.concat(prescriptions);
373
           this.srcPrescriptions =  this.srcPrescriptions.concat(prescriptions);
372
           this.$emit('call', this.srcPrescriptions)
374
           this.$emit('call', this.srcPrescriptions)
373
         }
375
         }
374
-      },show(name,id,end_time, start_time,srcPrescriptions,prescriptions){
376
+      },
377
+      show(name,id,end_time, start_time,srcPrescriptions,prescriptions){
378
+
375
         this.srcPrescriptions = srcPrescriptions;
379
         this.srcPrescriptions = srcPrescriptions;
376
-        this.start_time  = start_time;
380
+        this.start_time  = start_time
377
         this.end_time = end_time;
381
         this.end_time = end_time;
382
+      
378
         this.patient_id = id;
383
         this.patient_id = id;
379
         this.name = '处方调用' + '('+name +')';
384
         this.name = '处方调用' + '('+name +')';
380
         this.allPrescription = prescriptions;
385
         this.allPrescription = prescriptions;
382
           this.allPrescription[i].check_group = []
387
           this.allPrescription[i].check_group = []
383
         }
388
         }
384
         this.isLastOrNextVisible = true
389
         this.isLastOrNextVisible = true
390
+
385
       },close(){
391
       },close(){
386
         this.isLastOrNextVisible = false
392
         this.isLastOrNextVisible = false
387
       },hide(){
393
       },hide(){

+ 16 - 10
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

1918
           this.curPrescriptions = {}
1918
           this.curPrescriptions = {}
1919
         }
1919
         }
1920
         this.is_medicine_status =  this.curPrescriptions.is_medicine_status
1920
         this.is_medicine_status =  this.curPrescriptions.is_medicine_status
1921
-
1922
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1921
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
1923
           this.curStatus = 1
1922
           this.curStatus = 1
1924
           this.customTabIndex = 1
1923
           this.customTabIndex = 1
2184
           }
2183
           }
2185
           let params = {
2184
           let params = {
2186
             end_time: this.record_date,
2185
             end_time: this.record_date,
2187
-            start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
2186
+            start_time:  moment().add(-7, 'd').format("YYYY-MM-DD"),
2188
             patient_id: this.patientInfo.id,
2187
             patient_id: this.patientInfo.id,
2189
             p_type: 2
2188
             p_type: 2
2190
           }
2189
           }
2655
       },
2654
       },
2656
       addTab(targetName) {
2655
       addTab(targetName) {
2657
 
2656
 
2657
+        console.log("this.prescriptions",this.prescriptions)
2658
         for(let i = 0; i < this.prescriptions.length; i++){
2658
         for(let i = 0; i < this.prescriptions.length; i++){
2659
           if (this.prescriptions[i].is_medicine_status) {
2659
           if (this.prescriptions[i].is_medicine_status) {
2660
             this.$message.error('处方中包含已发药处方,无法新增')
2660
             this.$message.error('处方中包含已发药处方,无法新增')
2663
         }
2663
         }
2664
 
2664
 
2665
 
2665
 
2666
-        for(let i = 0; i < this.prescriptions.length; i++){
2667
-          if (this.prescriptions[i].order_status == 2 || this.prescriptions[i].order_status == 4) {
2668
-            this.$message.error('处方中包含已收费处方或者包含已经上传的处方,无法新增')
2669
-            return
2670
-          }
2671
-        }
2666
+        // for(let i = 0; i < this.prescriptions.length; i++){
2667
+        //   if (this.prescriptions[i].order_status == 2 || this.prescriptions[i].order_status == 4) {
2668
+        //     this.$message.error('处方中包含已收费处方或者包含已经上传的处方,无法新增')
2669
+        //     return
2670
+        //   }
2671
+        // }
2672
 
2672
 
2673
 
2673
 
2674
 
2674
 
2752
           type: 'warning'
2752
           type: 'warning'
2753
         }).then(() => {
2753
         }).then(() => {
2754
           let id = 0
2754
           let id = 0
2755
+          console.log("this.prescriptions???",this.prescriptions)
2755
           for (let i = 0; i < this.prescriptions.length; i++) {
2756
           for (let i = 0; i < this.prescriptions.length; i++) {
2756
             if (this.prescriptions[i].name == targetName) {
2757
             if (this.prescriptions[i].name == targetName) {
2757
               id = this.prescriptions[i].id
2758
               id = this.prescriptions[i].id
2786
                 }
2787
                 }
2787
               }
2788
               }
2788
             }
2789
             }
2789
-            console.log("oo233232233232323",this.prescriptions)
2790
+            console.log("oo233ooooosdada",this.prescriptions)
2790
             if (this.prescriptions.length == 0) {
2791
             if (this.prescriptions.length == 0) {
2792
+              console.log("this.curPrescrip的tions前",this.curPrescriptions)
2791
               this.curPrescriptions = []
2793
               this.curPrescriptions = []
2792
               this.curStatus = 0
2794
               this.curStatus = 0
2795
+              console.log("this.curPrescrip的tions后",this.curPrescriptions)
2793
             }
2796
             }
2794
             this.$parent.getInitDataOne(this.prescriptions)
2797
             this.$parent.getInitDataOne(this.prescriptions)
2795
           } else {
2798
           } else {
3086
             var temp2 = this.deepClone(this.teamList)
3089
             var temp2 = this.deepClone(this.teamList)
3087
 
3090
 
3088
             var temp3 = this.deepClone(templateDrugs)
3091
             var temp3 = this.deepClone(templateDrugs)
3089
-
3092
+           console.log("我的23323232232323232323哈哈哈哈哈哈",temp)
3090
             if (temp3.length > 0) {
3093
             if (temp3.length > 0) {
3091
               for (let b = 0; b < temp3.length; b++) {
3094
               for (let b = 0; b < temp3.length; b++) {
3092
                 let obj = {
3095
                 let obj = {
3122
 
3125
 
3123
             if (temp.length > 0) {
3126
             if (temp.length > 0) {
3124
               for (let b = 0; b < temp.length; b++) {
3127
               for (let b = 0; b < temp.length; b++) {
3128
+                if(temp[b].max_unit == temp[b].min_unit){
3129
+                  temp[b].retail_price = temp[b].min_price
3130
+                }
3125
                 let temp_index = b + 1
3131
                 let temp_index = b + 1
3126
                 let obj = {
3132
                 let obj = {
3127
                   advice_id: 0,
3133
                   advice_id: 0,

+ 7 - 2
src/xt_pages/outpatientDoctorStation/modeTemplate.vue View File

2
     <div class="main-contain new-main-contain">
2
     <div class="main-contain new-main-contain">
3
         <div class="position">
3
         <div class="position">
4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-            <el-button type="primary" @click="add">新增</el-button>
6
-
5
+            <div style="float:right">
6
+              <el-button type="primary" @click="add">新增</el-button>
7
+              <!-- <el-button type="primary" @click="batchAdd">批量新增</el-button> -->
8
+            </div>
7
         </div>
9
         </div>
8
         <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
10
         <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
9
             <div class="mainLeft">
11
             <div class="mainLeft">
150
        jumpDetail(row) {
152
        jumpDetail(row) {
151
         this.$router.push('/hisTool/modeTemplateDetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name +"&modes="+this.mode_str)
153
         this.$router.push('/hisTool/modeTemplateDetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name +"&modes="+this.mode_str)
152
       },
154
       },
155
+      batchAdd(){
156
+        this.$router.push("/hisTool/batchTemplate")
157
+      }
153
     },
158
     },
154
     created() {
159
     created() {
155
       this.tablelist =  Object.values(this.$store.getters.treatment_mode)
160
       this.tablelist =  Object.values(this.$store.getters.treatment_mode)

+ 4 - 1
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

14
                         <el-form-item label="模版名称:" prop="name" label-position="right">
14
                         <el-form-item label="模版名称:" prop="name" label-position="right">
15
                             <el-input v-model="tempForm.name" placeholder=""></el-input>
15
                             <el-input v-model="tempForm.name" placeholder=""></el-input>
16
                         </el-form-item>
16
                         </el-form-item>
17
-
17
+<!--                      <el-button  @click="lili">调试</el-button>-->
18
                         <el-form-item label="透析模式: " prop="mode_id" label-position="right">
18
                         <el-form-item label="透析模式: " prop="mode_id" label-position="right">
19
                             <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
19
                             <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
20
                                        :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id == 0"
20
                                        :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id == 0"
397
       }
397
       }
398
     },
398
     },
399
     methods: {
399
     methods: {
400
+      lili(){
401
+        console.log("this.$store.getters.treatment_mode",this.$store.getters.treatment_mode)
402
+      },
400
       save() {
403
       save() {
401
         if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
404
         if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
402
           this.$message.error('请先开处方')
405
           this.$message.error('请先开处方')

+ 1 - 1
src/xt_pages/stock/detail/print.vue View File

54
                   <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span>
54
                   <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span>
55
                    <span  v-if="org_id == 10265 || org_id == 10215">{{getMySelfCount(item.good_id) }}</span>
55
                    <span  v-if="org_id == 10265 || org_id == 10215">{{getMySelfCount(item.good_id) }}</span>
56
                    <span v-if="org_id == 10210 || org_id == 9671 || org_id == 10188 || org_id == 10217 || org_id == 9956 || org_id == 10191">{{getWarehouseOut(item.good_id)}}</span>
56
                    <span v-if="org_id == 10210 || org_id == 9671 || org_id == 10188 || org_id == 10217 || org_id == 9956 || org_id == 10191">{{getWarehouseOut(item.good_id)}}</span>
57
-                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=10285&&org_id!=9583&&org_id!=10215&&org_id!=10210&&org_id!=9671 && org_id!=10188&& org_id!=10217&& org_id!=9956&& org_id!=10191">{{getStockCount(item.good_id) }}</span>
57
+                  <span v-if="org_id!=3907&&org_id!=10265 &&org_id!=9919&&org_id!=10285&&org_id!=9583&&org_id!=10215&&org_id!=10210&&org_id!=9671 && org_id!=10188&& org_id!=10217&& org_id!=9956&& org_id!=10191">{{getStockCount(item.good_id) }}</span>
58
                 </span>
58
                 </span>
59
 
59
 
60
                 <span v-if="type == 4"> {{ item.count }}</span>
60
                 <span v-if="type == 4"> {{ item.count }}</span>

+ 440 - 0
src/xt_pages/stock/drugs/components/drugPatientQuery.vue View File

1
+<template>
2
+    <div class="main-contain">
3
+        <div class="app-container">
4
+         <el-container>
5
+               <div style="width:27%">
6
+                <el-row>
7
+                   时间:
8
+                    <el-date-picker
9
+                      size="small"
10
+                      v-model="start_time"
11
+                      prefix-icon="el-icon-date"
12
+                      :editable="false"
13
+                      style="width:160px;"
14
+                      type="date"
15
+                      placeholder="选择日期时间"
16
+                      align="right"
17
+                      format="yyyy-MM-dd"
18
+                      value-format="yyyy-MM-dd"
19
+                      @change="startTimeChange"
20
+                    ></el-date-picker> 
21
+                      <span>-</span> 
22
+                      <el-date-picker
23
+                        size="small"
24
+                        v-model="end_time"
25
+                        prefix-icon="el-icon-date"
26
+                        :editable="false"
27
+                        style="width:160px;"
28
+                        type="date"
29
+                        placeholder="选择日期时间"
30
+                        align="right"
31
+                        format="yyyy-MM-dd"
32
+                        value-format="yyyy-MM-dd"
33
+                        @change="endTimeChange"
34
+                    ></el-date-picker>
35
+                </el-row>
36
+                <el-row></el-row>
37
+                 <el-row>
38
+                   <el-col :span="24">
39
+                      <el-input style="width:200px;margin-top:10px;margin-bottom:10px" placeholder="请输入患者姓名" v-model="keyword"></el-input>&nbsp;<el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
40
+                   </el-col>
41
+                  </el-row>
42
+
43
+                  <el-row>
44
+                      <el-table
45
+                          ref="singleTable"
46
+                          :data="patientList"
47
+                          highlight-current-row
48
+                           border
49
+                          @current-change="handleCurrentChange"
50
+                           height="440"
51
+                           :row-style="{ color: '#303133' }"
52
+                          :header-cell-style="{
53
+                            backgroundColor: 'rgb(245, 247, 250)',
54
+                            color: '#606266'
55
+                          }"
56
+                        >
57
+                     <el-table-column
58
+                       prop="date"
59
+                       label="序号"
60
+                      align="center"
61
+                      >
62
+                      <template slot-scope="scope">
63
+                        {{scope.$index + 1}}
64
+                      </template>
65
+                    </el-table-column>
66
+                     <el-table-column
67
+                       prop="name"
68
+                      label="姓名"
69
+                      align="center">
70
+                      <template slot-scope="scope">
71
+                        {{scope.row.name}}
72
+                      </template>
73
+                     </el-table-column>
74
+
75
+                     </el-table>
76
+                  </el-row>
77
+               </div>
78
+
79
+                 <el-main>
80
+                  <div class="main newMain">
81
+                      
82
+                        
83
+                  <el-tabs>
84
+
85
+                   <el-tab-pane label="患者使用列表">
86
+                   
87
+                     <el-table
88
+                          :data="tableList"
89
+                          highlight-current-row
90
+                           border
91
+                           height="440"
92
+                           :row-style="{ color: '#303133' }"
93
+                          :header-cell-style="{
94
+                            backgroundColor: 'rgb(245, 247, 250)',
95
+                            color: '#606266'
96
+                          }"
97
+                        >
98
+                     <el-table-column
99
+                       prop="date"
100
+                       label="名称"
101
+                      align="center"
102
+                      >
103
+                      <template slot-scope="scope">
104
+                        {{scope.row.drug.drug_name}}
105
+                      </template>
106
+                    </el-table-column>
107
+                     <el-table-column
108
+                       prop="name"
109
+                      label="生产厂家"
110
+                      align="center">
111
+                      <template slot-scope="scope">
112
+                        {{getManufacturName(scope.row.manufacturer)}}
113
+                      </template>
114
+                     </el-table-column>
115
+                      <el-table-column
116
+                       prop="name"
117
+                      label="规格&单位"
118
+                      align="center">
119
+                      <template slot-scope="scope">
120
+                        {{scope.row.drug.dose}}{{scope.row.drug.dose_unit}} * {{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
121
+                      </template>
122
+                     </el-table-column>
123
+                      <el-table-column
124
+                       prop="name"
125
+                      label="数量"
126
+                      align="center">
127
+                      <template slot-scope="scope">
128
+                        {{scope.row.count}}
129
+                      </template>
130
+                     </el-table-column>
131
+
132
+                     </el-table>
133
+                      <el-pagination
134
+                        @size-change="handleSizeChange"
135
+                        @current-change="handleCurrentChange"
136
+                        :page-sizes="[10, 50, 100,200,500,1000]"
137
+                        :page-size="10"
138
+                        background
139
+                        align="right"
140
+                        style="margin-top:20px;"
141
+                        layout="total, sizes, prev, pager, next, jumper"
142
+                        :total="total"
143
+                        >
144
+                      </el-pagination>
145
+                    </el-tab-pane>
146
+                   </el-tabs>
147
+                </div>
148
+             </el-main>
149
+          </el-container>
150
+        </el-container>
151
+      </el-container>
152
+      </div>
153
+    </div>
154
+
155
+</template>
156
+<script>
157
+import { getGoodPatientList,getDrugWarehouseOutDetailByPatientId } from "@/api/drug/drug"
158
+export default {
159
+  data(){
160
+    return{
161
+      zoneList:[],
162
+      zone_id:0,
163
+      tableData:[],
164
+      DeviceTypeType:[],
165
+      device_type:"",
166
+      forms:{},
167
+      start_time:"",
168
+      end_time:"",
169
+      patientList:[],
170
+      tableList:[],
171
+      keyword:"",
172
+      manufacturerList:[],
173
+      patient_id:0,
174
+      patient:{},
175
+      limit:10,
176
+      page:1,
177
+      total:0,
178
+    }
179
+  },
180
+  methods:{
181
+    handleSizeChange(val) {
182
+      this.limit = val;
183
+      this.getDrugWarehouseOutDetailByPatientId()
184
+    },
185
+    handleCurrentChange(val) {
186
+      this.page = val;
187
+      this.getDrugWarehouseOutDetailByPatientId()
188
+    },
189
+    startTimeChange(){
190
+      this.handleCurrentChange(this.patient)
191
+    },
192
+    endTimeChange(){
193
+      this.handleCurrentChange(this.patient)
194
+    },
195
+    getlist(){
196
+        var params = {
197
+          keyword:this.keyword,
198
+        }
199
+      getGoodPatientList(params).then(response=>{
200
+        if(response.data.state == 1){
201
+          var list = response.data.data.list
202
+          this.patientList = list
203
+          this.$refs.singleTable.setCurrentRow(this.patientList[0]);
204
+          this.handleCurrentChange(this.patientList[0])
205
+        }
206
+      })
207
+    },
208
+   onSearch(){
209
+     this.getlist()
210
+   },
211
+   handleCurrentChange(val){
212
+       this.patient = val
213
+       var params = {
214
+         patient_id:val.id,
215
+         start_time:this.start_time,
216
+         end_time:this.end_time,
217
+         limit:this.limit,
218
+         page:this.page,
219
+       }
220
+     getDrugWarehouseOutDetailByPatientId(params).then(response=>{
221
+        if(response.data.state == 1){
222
+          var list = response.data.data.list
223
+          this.manufacturerList = response.data.data.manufacturerList
224
+          this.tableList = list
225
+          this.total = response.data.data.total
226
+        }
227
+     })
228
+   },
229
+   getDrugWarehouseOutDetailByPatientId(){
230
+      var params = {
231
+         patient_id:this.patient,
232
+         start_time:this.start_time,
233
+         end_time:this.end_time,
234
+         limit:this.limit,
235
+         page:this.page,
236
+       }
237
+     getDrugWarehouseOutDetailByPatientId(params).then(response=>{
238
+        if(response.data.state == 1){
239
+          var list = response.data.data.list
240
+          this.manufacturerList = response.data.data.manufacturerList
241
+          this.tableList = list
242
+        }
243
+     })
244
+   },
245
+   getManufacturName(id){
246
+     var manufacturer_name = ""
247
+     for(let i=0;i<this.manufacturerList.length;i++){
248
+        if(id == this.manufacturerList[i].id){
249
+          manufacturer_name = this.manufacturerList[i].manufacturer_name
250
+        } 
251
+     }
252
+     return manufacturer_name
253
+   }
254
+  },
255
+  created(){
256
+    var nowDate = new Date();
257
+    var nowYear = nowDate.getFullYear();
258
+    var nowMonth = nowDate.getMonth() + 1;
259
+    var nowDay = nowDate.getDate();
260
+    this.end_time =
261
+      nowYear +
262
+      "-" +
263
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
264
+      "-" +
265
+      (nowDay < 10 ? "0" + nowDay : nowDay);
266
+    nowDate.setMonth(nowDate.getMonth() - 1);
267
+    nowYear = nowDate.getFullYear();
268
+    nowMonth = nowDate.getMonth() + 1;
269
+    nowDay = nowDate.getDate();
270
+    this.start_time =
271
+      nowYear +
272
+      "-" +
273
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
274
+      "-" +
275
+      (nowDay < 10 ? "0" + nowDay : nowDay);
276
+     this.getlist()
277
+  },
278
+  
279
+}
280
+</script>
281
+
282
+
283
+   
284
+<style lang="scss" scoped>
285
+    .zone{
286
+      //  margin-left: 30px;
287
+      //  text-align: left;
288
+       width: 70px;
289
+       display: inline-block;
290
+       color:#606266;
291
+    }
292
+    .disinfect{
293
+      position: relative;
294
+      .newButton{
295
+        // position: absolute;
296
+        // right: 2%;
297
+        // top:4px;
298
+        // z-index: 9;
299
+        margin-bottom: 10px;
300
+    margin-left: 90%;
301
+      }
302
+    }
303
+    .disinfectOne{
304
+      position: relative;
305
+      .newButtonOne{
306
+        position: absolute;
307
+         right: 0;
308
+         top: -10;
309
+         z-index: 18;
310
+      }
311
+    }
312
+    .but{
313
+      width: 200px;
314
+      height: 50px;
315
+      // border: solid 1px red;
316
+      margin-left: 77%;
317
+    }
318
+    .clearn{
319
+      width: 460px;
320
+      height: 50px;
321
+      // border:solid 1px red;
322
+      margin-left:650px;
323
+    }
324
+
325
+  .zClass{
326
+    width: 200px;
327
+    height: 200px;
328
+    // border:solid 1px red;
329
+    margin-left: 450px;
330
+    margin-top: 200px;
331
+  }
332
+  .warn{
333
+    color: red;
334
+    font-size: 14px;
335
+    width: 100%;
336
+    display: inline-block;
337
+    margin-left: 96px;
338
+  }
339
+
340
+  .userbutton{
341
+       margin-bottom: 10px;
342
+    margin-left: 82%
343
+  }
344
+
345
+</style>
346
+<style lang="scss">
347
+   .a{
348
+     margin-bottom: 10px;
349
+      margin-top: 6px;
350
+
351
+   }
352
+
353
+   .b{
354
+    .el-button{
355
+      margin-left: 90%;
356
+      margin-bottom: 10px;
357
+    }
358
+   }
359
+
360
+   .stoppage{
361
+     .el-form-item__label{
362
+       width:190px;
363
+     }
364
+   }
365
+   .st{
366
+     .el-form-item__label{
367
+       width:-10px;
368
+     }
369
+   }
370
+   .main{
371
+     position: relative;
372
+     .newButtonOne{
373
+       position:absolute;
374
+       right: 0;
375
+       z-index: 2;
376
+     }
377
+   }
378
+
379
+    .elbutton{
380
+      // border: solid 1px red;
381
+      height: 50px;
382
+      width: 400px;
383
+      margin-left: 650px;
384
+    }
385
+  // .el-form-item__label {
386
+  //   width: 130px;
387
+  //   font-size: 14px;
388
+  // }
389
+  .el-form-item__error {
390
+    margin-left: 130px;
391
+  }
392
+
393
+ .el-upload-list__item-name {
394
+    color: #606266;
395
+    display: block;
396
+    margin-right: 40px;
397
+    overflow: hidden;
398
+    padding-left: 4px;
399
+    text-overflow: ellipsis;
400
+    transition: color .3s;
401
+    white-space: nowrap;
402
+}
403
+.el-main{
404
+  padding-top: 0px;
405
+}
406
+.newMain{
407
+  .el-form-item__label{
408
+    width: 104px;
409
+  }
410
+}
411
+.newDisinfectOne{
412
+  .el-input--prefix .el-input__inner{
413
+    padding-left: 15px
414
+  }
415
+}
416
+.stoppage{
417
+  .el-form-item__label{
418
+    width: 18%;
419
+  }
420
+}
421
+.newItem{
422
+  .el-form-item__label{
423
+    width: 130px;
424
+  }
425
+}
426
+.formItem{
427
+  .el-form-item__label{
428
+    width: 104px;
429
+    line-height: 30px;
430
+  }
431
+}
432
+.newname{
433
+  .el-form-item__label{
434
+    width: 60px;
435
+  }
436
+}
437
+::-webkit-scrollbar{
438
+  height: 20px;
439
+}
440
+</style>

+ 0 - 0
src/xt_pages/stock/drugs/components/drugQuery.vue View File


+ 532 - 0
src/xt_pages/stock/drugs/components/expiryDateDrugQuery.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+     <div class="app-container ">
4
+        <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
5
+         <div>
6
+          <span>有效期:</span>
7
+          <el-select v-model="expiry_type" style="width:200px;margin-right:10px;" placeholder="请选择"
8
+            filterable
9
+            @change="changeExpriyList">
10
+              <el-option
11
+                v-for="item in expriyList"
12
+                :key="item.id"
13
+                :label="item.name"
14
+                :value="item.id">
15
+              </el-option>
16
+          </el-select>
17
+          <span>仓库名称:</span>
18
+          <el-select v-model="storehouse_id" style="width:200px;margin-right:10px;" placeholder="请选择"
19
+          filterable
20
+           @change="changeStorehouseName">
21
+            <el-option
22
+              v-for="item in houseList"
23
+              :key="item.id"
24
+              :label="item.storehouse_name"
25
+              :value="item.id">
26
+            </el-option>
27
+          </el-select>
28
+          <el-input v-model="keyword" style="width:200px" placeholder="请输入药品名称或生产厂商" ></el-input>
29
+          <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
30
+         </div>
31
+        </div>
32
+           <el-table
33
+            :row-style="{ color: '#303133' }"
34
+            :header-cell-style="{
35
+              backgroundColor: 'rgb(245, 247, 250)',
36
+              color: '#606266'
37
+            }"
38
+            :data="tableList"
39
+            :class="signAndWeighBoxPatients"
40
+            border
41
+          >
42
+            <el-table-column label="药品类型" align="center">
43
+              <template slot-scope="scope">
44
+                 {{getDrugTypeName(scope.row.XtBaseDrug.drug_type)}}
45
+              </template>
46
+            </el-table-column>
47
+            <el-table-column label="药品名称" align="center">
48
+              <template slot-scope="scope">
49
+                 {{scope.row.XtBaseDrug.drug_name}}
50
+              </template>
51
+            </el-table-column>
52
+            <el-table-column label="规格&单位" align="center">
53
+                <template slot-scope="scope">
54
+                   {{scope.row.XtBaseDrug.dose}}{{scope.row.XtBaseDrug.dose_unit}}*{{scope.row.XtBaseDrug.min_number}}{{scope.row.XtBaseDrug.min_unit}}/{{scope.row.XtBaseDrug.max_unit}}
55
+                </template>
56
+            </el-table-column>
57
+            <el-table-column label="生产厂商" align="center">
58
+              <template slot-scope="scope">
59
+                 {{getManufacturName(scope.row.manufacturer)}}
60
+              </template>
61
+            </el-table-column>
62
+            <el-table-column label="进货价" align="center">
63
+              <template slot-scope="scope">
64
+                 {{scope.row.price}}
65
+              </template>
66
+            </el-table-column>
67
+            <el-table-column label="库存" align="center">
68
+              <template slot-scope="scope">
69
+                 {{scope.row.stock_max_number}}{{scope.row.XtBaseDrug.max_unit}}{{scope.row.stock_min_number}}{{scope.row.XtBaseDrug.min_unit}}
70
+              </template>
71
+            </el-table-column>
72
+        
73
+            <el-table-column label="批号" align="center">
74
+              <template slot-scope="scope">
75
+                 {{scope.row.batch_number}}
76
+               </template>
77
+            </el-table-column>
78
+          
79
+            <el-table-column label="有效期" align="center">
80
+              <template slot-scope="scope">
81
+                {{getTime(scope.row.expiry_date)}}
82
+             </template>
83
+            </el-table-column>
84
+
85
+            <el-table-column label="剩余天数" align="center">
86
+              <template slot-scope="scope">
87
+                {{getDaysBetween(getTime(scope.row.expiry_date),getTime(nowtime))}}
88
+              </template>
89
+            </el-table-column>
90
+          </el-table>
91
+           <el-pagination
92
+            @size-change="handleSizeChange"
93
+            @current-change="handleCurrentChange"
94
+            :page-sizes="[10, 50, 100,200,500,1000]"
95
+            :page-size="10"
96
+            background
97
+            align="right"
98
+            style="margin-top:20px;"
99
+            layout="total, sizes, prev, pager, next, jumper"
100
+            :total="total"
101
+          >
102
+            </el-pagination>
103
+     </div>
104
+
105
+
106
+
107
+   
108
+
109
+  </div>
110
+</template>
111
+<script>
112
+import { getStorehouseList,getDrugExpiryDateQuery } from "@/api/drug/drug"
113
+import {
114
+  getStockDrugCount
115
+} from "@/api/stock";
116
+import { uParseTime } from '@/utils/tools'
117
+import moment from 'moment';
118
+export default {
119
+
120
+  data(){
121
+    return{
122
+     tableList:[],
123
+     goodList:[
124
+      {id:1,name:"全部耗材"},
125
+      {id:2,name:"库存预警"},
126
+     ],
127
+     houseList:[],
128
+     storehouse_id:0,
129
+     good_type:1,
130
+     multipleSelection: [],
131
+     signAndWeighBoxPatients: "sign-and-weigh-box-patients",
132
+     manufacturerList:[],
133
+     limit:10,
134
+     page:1,
135
+     total:0,
136
+     limitone:10,
137
+     pageone:1,
138
+     totalone:0,
139
+     keyword:"",
140
+     goodTypeList:[],
141
+     start_time:"",
142
+     end_time:"",
143
+     countList:[],
144
+     outCountList:[],
145
+     autoCountList:[],
146
+     cancelCountList:[],
147
+     org_id:this.$store.getters.xt_user.org_id,
148
+     dialogVisible:false,
149
+     start_first_time:"",
150
+     end_first_time:"",
151
+     tableData:[],
152
+     good_id:0,
153
+     patientList:[],
154
+     good_name:"",
155
+     specification_name:"",
156
+     expiry_type:0,
157
+     expriyList:[
158
+      {id:0,name:"全部"},
159
+      {id:1,name:"已过期"},
160
+      {id:2,name:"30天内过期"},
161
+      {id:3,name:"90天内过期"},
162
+      {id:4,name:"180天内过期"},
163
+      {id:5,name:"1年内过期"},
164
+     ],
165
+     nowtime:0,
166
+     start_time:"",
167
+     drugTypeList:[],
168
+    }
169
+  
170
+  },
171
+  methods:{
172
+    changeStorehouseName(){
173
+      this.getlist()
174
+    },
175
+    changeGoodName(){
176
+
177
+    },
178
+    getStorehouseList(){
179
+      getStorehouseList().then(response=>{
180
+         if(response.data.state == 1){
181
+           var houseList = response.data.data.list
182
+           var obj = {id:0,storehouse_name:"全部"}
183
+           this.houseList.push(obj)
184
+           for(let i=0;i<houseList.length;i++){
185
+             this.houseList.push(houseList[i])
186
+           }
187
+           this.manufacturerList = response.data.data.manufacturerList
188
+           this.goodTypeList = response.data.data.goodTypeList
189
+           this.patientList = response.data.data.patientList
190
+         }
191
+      })
192
+    },
193
+    getlist(){
194
+        var params = {
195
+          storehouse_id:this.storehouse_id,
196
+          expiry_type:this.expiry_type,
197
+          keyword:this.keyword,
198
+          page:this.page,
199
+          limit:this.limit,
200
+          start_time:this.start_time,
201
+        }
202
+      getDrugExpiryDateQuery(params).then(response=>{
203
+         if(response.data.state == 1){
204
+            var list = response.data.data.list
205
+            this.tableList = list
206
+            var manufacturerList = response.data.data.manufacturerList
207
+            this.manufacturerList = manufacturerList
208
+            this.total = response.data.data.total
209
+            this.nowtime = response.data.data.nowtime
210
+            this.drugTypeList =  response.data.data.drugTypeList
211
+         }
212
+      })
213
+    },
214
+    getManufacturName(id){
215
+      var manufacturer_name = ""
216
+      for(let i=0;i<this.manufacturerList.length;i++){
217
+        if(id == this.manufacturerList[i].id){
218
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
219
+        }
220
+      }
221
+      return manufacturer_name
222
+    },
223
+    handleSizeChange(val) {
224
+      this.limit = val;
225
+      this.getlist()
226
+    },
227
+    handleCurrentChange(val) {
228
+      this.page = val;
229
+      this.getlist()
230
+    },
231
+    handleSizeChangeOne(val) {
232
+      this.limitone = val;
233
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
234
+    },
235
+    handleCurrentChangeOne(val) {
236
+      this.pageone = val;
237
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
238
+    },
239
+   seach(){
240
+    this.getlist()
241
+   },
242
+   getDrugTypeName(id){
243
+     var name = ""
244
+     for(let i=0;i<this.drugTypeList.length;i++){
245
+       if(id == this.drugTypeList[i].value){
246
+         name = this.drugTypeList[i].name
247
+       }
248
+     }
249
+     return name
250
+   },
251
+   getHouseName(id){
252
+     var storehouse_name = ""
253
+     for(let i=0;i<this.houseList.length;i++){
254
+       if(id == this.houseList[i].id){
255
+         storehouse_name = this.houseList[i].storehouse_name
256
+       }
257
+     }
258
+     return storehouse_name
259
+   },
260
+   getWareInfoCount(val,storehouse_id){
261
+     var count = 0
262
+     if(val.length > 0){
263
+       for(let i=0;i<val.length;i++){
264
+         if(val[i].storehouse_id == storehouse_id){
265
+             count +=val[i].warehousing_count
266
+         }
267
+       }
268
+     }
269
+     if(count > 0){
270
+       return count
271
+     }else{
272
+       return ""
273
+     }
274
+   },
275
+   getStockDrugCount(){
276
+        var params ={
277
+           keywords: this.keywords,
278
+           start_time:this.start_time,
279
+           end_time:this.end_time,
280
+        }
281
+      getStockDrugCount(params).then(response=>{
282
+         if(response.data.state == 1){
283
+           var outlist = response.data.data.outList
284
+           this.outCountList = outlist
285
+           var autoCount = response.data.data.autoCount
286
+           this.autoCountList = autoCount
287
+           var totalCount = response.data.data.totalCount
288
+           this.cancelCountList = totalCount
289
+         }
290
+      })
291
+    },
292
+    getWareInfoCountOne(val,storehouse_id){
293
+     var count = 0
294
+     if(val.length > 0){
295
+       for(let i=0;i<val.length;i++){
296
+         if(val[i].storehouse_id == storehouse_id){
297
+             count +=val[i].stock_count
298
+         }
299
+       }
300
+     }
301
+     if(count > 0){
302
+       return count
303
+     }else{
304
+       return ""
305
+     }
306
+   },
307
+   getOutCount(id){
308
+      var count = 0
309
+      for(let i=0;i<this.outCountList.length;i++){
310
+         if(id == this.outCountList[i].good_id){
311
+           count = this.outCountList[i].count
312
+         }
313
+      }
314
+     return count
315
+   },
316
+   getAutoCount(id){
317
+     var count= 0
318
+     for(let i=0;i<this.autoCountList.length;i++){
319
+       if(id == this.autoCountList[i].good_id){
320
+         count = this.autoCountList[i].count
321
+       }
322
+     }
323
+     return count
324
+   },
325
+   getCancelCount(id){
326
+     var count = 0
327
+     for(let i=0;i<this.cancelCountList.length;i++){
328
+       if(id == this.cancelCountList[i].good_id){
329
+          count = this.cancelCountList[i].count
330
+       }
331
+     }
332
+     return count
333
+   },
334
+   getCancelCountInfo(cancel_stock_info,storehouse_id){
335
+     var count = 0 
336
+     if(cancel_stock_info.length >0){
337
+        for(let i=0;i<cancel_stock_info.length;i++){
338
+          if(storehouse_id ==  cancel_stock_info[i].storehouse_id){
339
+              count += cancel_stock_info[i].count
340
+          }
341
+        }
342
+     }
343
+     return count
344
+   },
345
+   getWareOutInfoCount(warehouse_out_info,storehouse_id){
346
+     var count = 0
347
+     if(warehouse_out_info.length > 0){
348
+       for(let i=0;i<warehouse_out_info.length;i++){
349
+         if(storehouse_id == warehouse_out_info[i].storehouse_id){
350
+            count +=warehouse_out_info[i].count
351
+         }
352
+       }
353
+     }
354
+     return count
355
+   },
356
+   getInCount(id){
357
+      var count= 0
358
+     for(let i=0;i<this.countList.length;i++){
359
+      if(id == this.countList[i].good_id){
360
+          count = this.countList[i].count
361
+      }
362
+     }
363
+     return count
364
+    },
365
+    getOutCount(id){
366
+      var count = 0
367
+      for(let i=0;i<this.outCountList.length;i++){
368
+         if(id == this.outCountList[i].good_id){
369
+           count = this.outCountList[i].count
370
+         }
371
+      }
372
+     return count
373
+   },
374
+   getAutoCount(id){
375
+     var count= 0
376
+     for(let i=0;i<this.autoCountList.length;i++){
377
+       if(id == this.autoCountList[i].good_id){
378
+         count = this.autoCountList[i].count
379
+       }
380
+     }
381
+     return count
382
+   },
383
+   getCancelCount(id){
384
+     var count = 0
385
+     for(let i=0;i<this.cancelCountList.length;i++){
386
+       if(id == this.cancelCountList[i].good_id){
387
+          count = this.cancelCountList[i].count
388
+       }
389
+     }
390
+     return count
391
+   },
392
+   getStockCount(id){
393
+     var stock_count = 0
394
+     for(let i=0;i<this.countList.length;i++){
395
+       if(id == this.countList[i].good_id){
396
+         stock_count = this.countList[i].stock_count
397
+       }
398
+     }
399
+     return stock_count
400
+   },
401
+   getWareInfo(arr){
402
+     var total = 0
403
+     if(arr.length > 0){
404
+       for(let i=0;i<arr.length;i++){
405
+         total += parseInt(arr[i].warehousing_count)
406
+       }
407
+     }else{
408
+       total = ""
409
+     }
410
+     return total
411
+   },
412
+   getOverplus(arr){
413
+     var total = 0
414
+     if(arr.length > 0){
415
+      for(let i=0;i<arr.length;i++){
416
+        total += arr[i].stock_count
417
+      }
418
+     }else{
419
+       total = ""
420
+     }
421
+     return total
422
+   },
423
+   getCancelInfo(arr){
424
+     var total = 0
425
+     if(arr.length > 0){
426
+      for(let i=0;i<arr.length;i++){
427
+        total += arr[i].count
428
+      }
429
+     }else{
430
+       total = ""
431
+     }
432
+     return total
433
+   },
434
+   getOverFlushInfo(arr){
435
+     var total = 0
436
+     if(arr.length >0){
437
+      for(let i=0;i<arr.length;i++){
438
+        total += arr[i].stock_count
439
+      }
440
+     }
441
+     return total
442
+   },
443
+   startFirstTimeChange(){
444
+    
445
+   },
446
+   endEndTimeChange(){
447
+
448
+   },
449
+  getTime(val) {
450
+    if(val < 0){
451
+      return ""
452
+    }
453
+   if(val == ""){
454
+     return ""
455
+   }else {
456
+    return uParseTime(val, '{y}-{m}-{d}')
457
+   }
458
+   },
459
+  getName(id){
460
+    var name = ""
461
+    for(let i=0;i<this.patientList.length;i++){
462
+      if(id == this.patientList[i].id){
463
+        name = this.patientList[i].name
464
+      }
465
+    }
466
+    return name
467
+  },
468
+  getDaysBetween(dateString1, dateString2) {
469
+    let startDate = Date.parse(dateString1);
470
+    let endDate = Date.parse(dateString2);
471
+    return (startDate - endDate ) / (1 * 24 * 60 * 60 * 1000);
472
+  },
473
+  changeExpriyList(val){
474
+   
475
+    if(val ==0){
476
+     this.start_time = ""
477
+     this.getlist()
478
+    }
479
+    //已过期
480
+    if(val == 1){
481
+      this.getlist()
482
+    }
483
+    //30天内过期
484
+    if(val == 2){
485
+      var time = this.addDate(this.getTime(this.nowtime),30)
486
+      this.start_time = time
487
+      this.getlist()
488
+    }
489
+    //90天内过期
490
+    if(val == 3){
491
+       var time = this.addDate(this.getTime(this.nowtime),90)
492
+      this.start_time = time
493
+      this.getlist()
494
+    }
495
+    //180天内过期
496
+    if(val == 4){
497
+       var time = this.addDate(this.getTime(this.nowtime),180)
498
+       this.start_time = time
499
+    }
500
+    //1年以后
501
+    if(val == 5){
502
+       var time = this.addDate(this.getTime(this.nowtime),365)
503
+       this.start_time = time
504
+       this.getlist()
505
+    }
506
+  
507
+  },
508
+  addDate(date, days) {
509
+    var date = new Date(date);
510
+    date.setDate(date.getDate() + days);
511
+    var year = date.getFullYear();
512
+    var month = date.getMonth() + 1;
513
+    var day = date.getDate();
514
+    var mm = "'" + month + "'";
515
+    var dd = "'" + day + "'";
516
+    if(mm.length == 3) {
517
+      month = "0" + month;
518
+    }
519
+    if(dd.length == 3) {
520
+      day = "0" + day;
521
+    }
522
+    var time = year + "-" + month + "-" + day
523
+    return time;
524
+  },
525
+  },
526
+  created(){
527
+    this.getStorehouseList()
528
+    this.getlist()
529
+  }
530
+}
531
+</script>
532
+

+ 0 - 0
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue View File


+ 4 - 2
src/xt_pages/stock/drugs/drugDamaged.vue View File

163
                   <span v-if="scope.row.type == 1">到期退货</span>
163
                   <span v-if="scope.row.type == 1">到期退货</span>
164
                   <span v-if="scope.row.type == 2">异常退货</span>
164
                   <span v-if="scope.row.type == 2">异常退货</span>
165
                   <span v-if="scope.row.type == 3">退货</span>
165
                   <span v-if="scope.row.type == 3">退货</span>
166
-                  <span v-if="scope.row.type == 4">人为损坏</span>
166
+                  <span v-if="scope.row.type == 4">损坏</span>
167
                   <span v-if="scope.row.type == 5">不计入报损分析</span>
167
                   <span v-if="scope.row.type == 5">不计入报损分析</span>
168
+                  <span v-if="scope.row.type == 7">有效期到期</span>
168
                 </template>
169
                 </template>
169
               </el-table-column>
170
               </el-table-column>
170
             </el-table>
171
             </el-table>
261
               {id:1,name:"到期退货"},
262
               {id:1,name:"到期退货"},
262
               {id:2,name:"异常退货"},
263
               {id:2,name:"异常退货"},
263
               {id:3,name:"退货"},
264
               {id:3,name:"退货"},
264
-              {id:4,name:"人为损坏"},
265
+              {id:4,name:"损坏"},
265
               {id:5,name:"不计入报损分析"},
266
               {id:5,name:"不计入报损分析"},
267
+              {id:7,name:"有效期到期"}
266
             ],
268
             ],
267
             goodList:[],
269
             goodList:[],
268
             drug_name:"",
270
             drug_name:"",

+ 135 - 0
src/xt_pages/stock/drugs/drugNewQuery.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+     
6
+    </div>
7
+     <div class="app-container ">
8
+        <el-tabs v-model="activeName" @tab-click="handleClick">
9
+            <el-tab-pane label="库存查询" name="first">
10
+              <DrugQuery></DrugQuery>
11
+            </el-tab-pane>
12
+            <el-tab-pane label="进销存查询" name="second">
13
+               <PurchaseDrugQuery></PurchaseDrugQuery>
14
+           </el-tab-pane>
15
+            <el-tab-pane label="有效期查询" name="third">
16
+                <ExpiryDateDrugQuery></ExpiryDateDrugQuery>
17
+            </el-tab-pane>
18
+            <el-tab-pane label="患者查询" name="fourth">
19
+                <DrugPatientQuery></DrugPatientQuery>
20
+            </el-tab-pane>
21
+        </el-tabs>
22
+     </div>
23
+  </div>
24
+</template>
25
+
26
+<script>
27
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
28
+import DrugQuery from "@/xt_pages/stock/drugs/components/drugQuery"
29
+import ExpiryDateDrugQuery from "@/xt_pages/stock/drugs/components/expiryDateDrugQuery"
30
+import PurchaseDrugQuery from "@/xt_pages/stock/drugs/components/purchaseDrugQuery"
31
+import DrugPatientQuery from "@/xt_pages/stock/drugs/components/drugPatientQuery"
32
+export default {
33
+  name: "stockNewQuery",
34
+  
35
+  components: {
36
+    BreadCrumb,
37
+    DrugQuery,
38
+    ExpiryDateDrugQuery,
39
+    PurchaseDrugQuery,
40
+    DrugPatientQuery
41
+  },
42
+  data() {
43
+    return {
44
+      crumbs: [
45
+        { path: false, name: "库存管理" },
46
+        { path: "/stock/query", name: "库存查询" }
47
+      ],
48
+      multipleSelection: [],
49
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
50
+      activeName: 'first'
51
+    };
52
+  },
53
+  methods:{
54
+    handleClick(){
55
+        
56
+    }
57
+  }
58
+};
59
+</script>
60
+
61
+<style rel="stylesheet/css" lang="scss" scoped>
62
+.information {
63
+  border: 1px #dcdfe6 solid;
64
+  padding: 30px 20px 30px 20px;
65
+
66
+  .border {
67
+    border-bottom: 1px #dcdfe6 solid;
68
+    margin: 0px 0 20px 0;
69
+  }
70
+}
71
+
72
+.title {
73
+  background: #409eff;
74
+  height: 44px;
75
+  line-height: 44px;
76
+  padding: 0 0 0 10px;
77
+  color: #fff;
78
+  margin: 0 0 10px 0;
79
+}
80
+
81
+.edit_separater {
82
+  border-top: 1px solid rgb(233, 233, 233);
83
+  margin-top: 15px;
84
+  margin-bottom: 15px;
85
+}
86
+</style>
87
+
88
+<style>
89
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
90
+  font-size: 12px;
91
+}
92
+
93
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
94
+  background: #6fb5fa;
95
+}
96
+
97
+.count {
98
+  color: #bd2c00;
99
+}
100
+.el-table td,
101
+.el-table th.is-leaf,
102
+.el-table--border,
103
+.el-table--group {
104
+  border-color: #d0d3da;
105
+}
106
+.el-table--border::after,
107
+.el-table--group::after,
108
+.el-table::before {
109
+  background-color: #d0d3da;
110
+}
111
+
112
+/* 合并表格线样式 */
113
+
114
+.spanClass .cell {
115
+  padding: 0 !important;
116
+}
117
+
118
+.spanClass .cell tr {
119
+  display: inline-block;
120
+  width: 100%;
121
+  /* height: 44px; */
122
+}
123
+
124
+.spanClass .cell tr td {
125
+  padding: 10px 0;
126
+  border-bottom: 1px solid #ebeef5;
127
+  display: block;
128
+  width: 100%;
129
+  min-height: 44px;
130
+}
131
+.spanClass .cell tr:last-of-type td{
132
+  border-bottom: none;
133
+}
134
+
135
+</style>

+ 2 - 1
src/xt_pages/stock/drugs/inventory.vue View File

214
               {id:1,name:"到期退货"},
214
               {id:1,name:"到期退货"},
215
               {id:2,name:"异常退货"},
215
               {id:2,name:"异常退货"},
216
               {id:3,name:"退货"},
216
               {id:3,name:"退货"},
217
-              {id:4,name:"人为损坏"},
217
+              {id:4,name:"损坏"},
218
               {id:5,name:"不计入报损分析"},
218
               {id:5,name:"不计入报损分析"},
219
+              {id:7,name:"有效期到期"},
219
             ],
220
             ],
220
             activeNames: [0,1,2,3,4,5,6,7,8,9,10],
221
             activeNames: [0,1,2,3,4,5,6,7,8,9,10],
221
             showTable:false,
222
             showTable:false,

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

1262
       var min_str = "";
1262
       var min_str = "";
1263
       var total = 0;
1263
       var total = 0;
1264
       var newarr = arr;
1264
       var newarr = arr;
1265
-      console.log("这是什sfsdfsf么!!!!!",storehouse_id)
1265
+      
1266
       if (newarr.length > 0) {
1266
       if (newarr.length > 0) {
1267
         for (let i = 0; i < newarr.length; i++) {
1267
         for (let i = 0; i < newarr.length; i++) {
1268
           if (newarr[i].storehouse_id == storehouse_id) {
1268
           if (newarr[i].storehouse_id == storehouse_id) {
1285
           min_str = (total % min_number) + min_unit;
1285
           min_str = (total % min_number) + min_unit;
1286
         }
1286
         }
1287
       }
1287
       }
1288
-      console.log("这是什么!!!!!",max_str + min_str)
1288
+      
1289
       return max_str + min_str;
1289
       return max_str + min_str;
1290
     },
1290
     },
1291
     getOutFlushNight(
1291
     getOutFlushNight(

+ 2 - 1
src/xt_pages/stock/inventory.vue View File

210
           {id:1,name:"到期退货"},
210
           {id:1,name:"到期退货"},
211
           {id:2,name:"异常退货"},
211
           {id:2,name:"异常退货"},
212
           {id:3,name:"退货"},
212
           {id:3,name:"退货"},
213
-          {id:4,name:"人为损坏"},
213
+          {id:4,name:"损坏"},
214
           {id:5,name:"不计入报损分析"},
214
           {id:5,name:"不计入报损分析"},
215
+          {id:7,name:"有效期到期"},
215
          ],
216
          ],
216
          activeNames: [0,1,2,3,4,5,6,7,8,9,10],
217
          activeNames: [0,1,2,3,4,5,6,7,8,9,10],
217
          showTable:false,
218
          showTable:false,

+ 2 - 1
src/xt_pages/stock/inventoryDetails.vue View File

83
                 <span v-if="scope.row.inventory_type ==1">到期退货</span>
83
                 <span v-if="scope.row.inventory_type ==1">到期退货</span>
84
                 <span v-if="scope.row.inventory_type ==2">异常退货</span>
84
                 <span v-if="scope.row.inventory_type ==2">异常退货</span>
85
                 <span v-if="scope.row.inventory_type ==3">退货</span>
85
                 <span v-if="scope.row.inventory_type ==3">退货</span>
86
-                <span v-if="scope.row.inventory_type ==4">人为损坏</span>
86
+                <span v-if="scope.row.inventory_type ==4">损坏</span>
87
                 <span v-if="scope.row.inventory_type ==5">不计入报损分析</span>
87
                 <span v-if="scope.row.inventory_type ==5">不计入报损分析</span>
88
+                <span v-if="scope.row.inventory_type ==7">有效期到期</span>
88
                </template>
89
                </template>
89
             </el-table-column>
90
             </el-table-column>
90
           
91
           

+ 548 - 2
src/xt_pages/stock/query/expiryDateQuery.vue View File

1
 <template>
1
 <template>
2
   <div class="main-contain">
2
   <div class="main-contain">
3
      <div class="app-container ">
3
      <div class="app-container ">
4
-       有效期 库存查询喔喔喔
4
+        <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
5
+         <div>
6
+          <span>有效期:</span>
7
+          <el-select v-model="expiry_type" style="width:200px;margin-right:10px;" placeholder="请选择"
8
+            filterable
9
+            @change="changeExpriyList">
10
+              <el-option
11
+                v-for="item in expriyList"
12
+                :key="item.id"
13
+                :label="item.name"
14
+                :value="item.id">
15
+              </el-option>
16
+          </el-select>
17
+          <span>仓库名称:</span>
18
+          <el-select v-model="storehouse_id" style="width:200px;margin-right:10px;" placeholder="请选择"
19
+          filterable
20
+           @change="changeStorehouseName">
21
+            <el-option
22
+              v-for="item in houseList"
23
+              :key="item.id"
24
+              :label="item.storehouse_name"
25
+              :value="item.id">
26
+            </el-option>
27
+          </el-select>
28
+          <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
29
+          <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
30
+         </div>
31
+        </div>
32
+           <el-table
33
+            :row-style="{ color: '#303133' }"
34
+            :header-cell-style="{
35
+              backgroundColor: 'rgb(245, 247, 250)',
36
+              color: '#606266'
37
+            }"
38
+            :data="tableList"
39
+            :class="signAndWeighBoxPatients"
40
+            border
41
+          >
42
+            <el-table-column label="耗材类型" align="center">
43
+              <template slot-scope="scope">
44
+                 {{getGoodTypeName(scope.row.GoodInfo.good_type_id)}}
45
+              </template>
46
+            </el-table-column>
47
+            <el-table-column label="耗材名称" align="center">
48
+              <template slot-scope="scope">
49
+                 {{scope.row.GoodInfo.good_name}}
50
+              </template>
51
+            </el-table-column>
52
+            <el-table-column label="规格&单位" align="center">
53
+                <template slot-scope="scope">
54
+                   {{scope.row.GoodInfo.specification_name}}
55
+                </template>
56
+            </el-table-column>
57
+            <el-table-column label="生产厂商" align="center">
58
+              <template slot-scope="scope">
59
+                 {{getManufacturName(scope.row.manufacturer)}}
60
+              </template>
61
+            </el-table-column>
62
+            <el-table-column label="进货价" align="center">
63
+              <template slot-scope="scope">
64
+                 {{scope.row.price}}
65
+              </template>
66
+            </el-table-column>
67
+            <el-table-column label="库存" align="center">
68
+              <template slot-scope="scope">
69
+                 {{scope.row.stock_count}}
70
+              </template>
71
+            </el-table-column>
72
+        
73
+            <el-table-column label="批号" align="center">
74
+              <template slot-scope="scope">
75
+                 {{scope.row.number}}
76
+               </template>
77
+            </el-table-column>
78
+          
79
+            <el-table-column label="有效期" align="center">
80
+              <template slot-scope="scope">
81
+                {{getTime(scope.row.expiry_date)}}
82
+             </template>
83
+            </el-table-column>
84
+
85
+            <el-table-column label="剩余天数" align="center">
86
+              <template slot-scope="scope">
87
+                {{getDaysBetween(getTime(scope.row.expiry_date),getTime(nowtime))}}
88
+              </template>
89
+            </el-table-column>
90
+          </el-table>
91
+           <el-pagination
92
+            @size-change="handleSizeChange"
93
+            @current-change="handleCurrentChange"
94
+            :page-sizes="[10, 50, 100,200,500,1000]"
95
+            :page-size="10"
96
+            background
97
+            align="right"
98
+            style="margin-top:20px;"
99
+            layout="total, sizes, prev, pager, next, jumper"
100
+            :total="total"
101
+          >
102
+            </el-pagination>
5
      </div>
103
      </div>
104
+
105
+
106
+
107
+   
108
+
6
   </div>
109
   </div>
7
-</template>
110
+</template>
111
+<script>
112
+import { getStorehouseList,getGoodExpiryDateQuery,getGoodWarehouseOutInfoById } from "@/api/drug/drug"
113
+import {
114
+  getStockDrugCount
115
+} from "@/api/stock";
116
+import { uParseTime } from '@/utils/tools'
117
+import moment from 'moment';
118
+export default {
119
+
120
+  data(){
121
+    return{
122
+     tableList:[],
123
+     goodList:[
124
+      {id:1,name:"全部耗材"},
125
+      {id:2,name:"库存预警"},
126
+     ],
127
+     houseList:[],
128
+     storehouse_id:0,
129
+     good_type:1,
130
+     multipleSelection: [],
131
+     signAndWeighBoxPatients: "sign-and-weigh-box-patients",
132
+     manufacturerList:[],
133
+     limit:10,
134
+     page:1,
135
+     total:0,
136
+     limitone:10,
137
+     pageone:1,
138
+     totalone:0,
139
+     keyword:"",
140
+     goodTypeList:[],
141
+     start_time:"",
142
+     end_time:"",
143
+     countList:[],
144
+     outCountList:[],
145
+     autoCountList:[],
146
+     cancelCountList:[],
147
+     org_id:this.$store.getters.xt_user.org_id,
148
+     dialogVisible:false,
149
+     start_first_time:"",
150
+     end_first_time:"",
151
+     tableData:[],
152
+     good_id:0,
153
+     patientList:[],
154
+     good_name:"",
155
+     specification_name:"",
156
+     expiry_type:0,
157
+     expriyList:[
158
+      {id:0,name:"全部"},
159
+      {id:1,name:"已过期"},
160
+      {id:2,name:"30天内过期"},
161
+      {id:3,name:"90天内过期"},
162
+      {id:4,name:"180天内过期"},
163
+      {id:5,name:"1年内过期"},
164
+     ],
165
+     nowtime:0,
166
+     start_time:"",
167
+    }
168
+  
169
+  },
170
+  methods:{
171
+    changeStorehouseName(){
172
+      this.getlist()
173
+    },
174
+    changeGoodName(){
175
+
176
+    },
177
+    getStorehouseList(){
178
+      getStorehouseList().then(response=>{
179
+         if(response.data.state == 1){
180
+           var houseList = response.data.data.list
181
+           var obj = {id:0,storehouse_name:"全部"}
182
+           this.houseList.push(obj)
183
+           for(let i=0;i<houseList.length;i++){
184
+             this.houseList.push(houseList[i])
185
+           }
186
+           this.manufacturerList = response.data.data.manufacturerList
187
+           this.goodTypeList = response.data.data.goodTypeList
188
+           this.patientList = response.data.data.patientList
189
+         }
190
+      })
191
+    },
192
+    getlist(){
193
+        var params = {
194
+          storehouse_id:this.storehouse_id,
195
+          expiry_type:this.expiry_type,
196
+          keyword:this.keyword,
197
+          page:this.page,
198
+          limit:this.limit,
199
+          start_time:this.start_time,
200
+        }
201
+      getGoodExpiryDateQuery(params).then(response=>{
202
+         if(response.data.state == 1){
203
+            var list = response.data.data.list
204
+            this.tableList = list
205
+            var manufacturerList = response.data.data.manufacturerList
206
+            this.manufacturerList = manufacturerList
207
+            this.total = response.data.data.total
208
+            this.nowtime = response.data.data.nowtime
209
+         }
210
+      })
211
+    },
212
+    getManufacturName(id){
213
+      var manufacturer_name = ""
214
+      for(let i=0;i<this.manufacturerList.length;i++){
215
+        if(id == this.manufacturerList[i].id){
216
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
217
+        }
218
+      }
219
+      return manufacturer_name
220
+    },
221
+    handleSizeChange(val) {
222
+      this.limit = val;
223
+      this.getlist()
224
+    },
225
+    handleCurrentChange(val) {
226
+      this.page = val;
227
+      this.getlist()
228
+    },
229
+    handleSizeChangeOne(val) {
230
+      this.limitone = val;
231
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
232
+    },
233
+    handleCurrentChangeOne(val) {
234
+      this.pageone = val;
235
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
236
+    },
237
+   seach(){
238
+    this.getlist()
239
+   },
240
+   getGoodTypeName(id){
241
+     var type_name = ""
242
+     for(let i=0;i<this.goodTypeList.length;i++){
243
+       if(id == this.goodTypeList[i].id){
244
+         type_name = this.goodTypeList[i].type_name
245
+       }
246
+     }
247
+     return type_name
248
+   },
249
+   getHouseName(id){
250
+     var storehouse_name = ""
251
+     for(let i=0;i<this.houseList.length;i++){
252
+       if(id == this.houseList[i].id){
253
+         storehouse_name = this.houseList[i].storehouse_name
254
+       }
255
+     }
256
+     return storehouse_name
257
+   },
258
+   getWareInfoCount(val,storehouse_id){
259
+     var count = 0
260
+     if(val.length > 0){
261
+       for(let i=0;i<val.length;i++){
262
+         if(val[i].storehouse_id == storehouse_id){
263
+             count +=val[i].warehousing_count
264
+         }
265
+       }
266
+     }
267
+     if(count > 0){
268
+       return count
269
+     }else{
270
+       return ""
271
+     }
272
+   },
273
+   getStockDrugCount(){
274
+        var params ={
275
+           keywords: this.keywords,
276
+           start_time:this.start_time,
277
+           end_time:this.end_time,
278
+        }
279
+      getStockDrugCount(params).then(response=>{
280
+         if(response.data.state == 1){
281
+           var outlist = response.data.data.outList
282
+           this.outCountList = outlist
283
+           var autoCount = response.data.data.autoCount
284
+           this.autoCountList = autoCount
285
+           var totalCount = response.data.data.totalCount
286
+           this.cancelCountList = totalCount
287
+         }
288
+      })
289
+    },
290
+    getWareInfoCountOne(val,storehouse_id){
291
+     var count = 0
292
+     if(val.length > 0){
293
+       for(let i=0;i<val.length;i++){
294
+         if(val[i].storehouse_id == storehouse_id){
295
+             count +=val[i].stock_count
296
+         }
297
+       }
298
+     }
299
+     if(count > 0){
300
+       return count
301
+     }else{
302
+       return ""
303
+     }
304
+   },
305
+   getOutCount(id){
306
+      var count = 0
307
+      for(let i=0;i<this.outCountList.length;i++){
308
+         if(id == this.outCountList[i].good_id){
309
+           count = this.outCountList[i].count
310
+         }
311
+      }
312
+     return count
313
+   },
314
+   getAutoCount(id){
315
+     var count= 0
316
+     for(let i=0;i<this.autoCountList.length;i++){
317
+       if(id == this.autoCountList[i].good_id){
318
+         count = this.autoCountList[i].count
319
+       }
320
+     }
321
+     return count
322
+   },
323
+   getCancelCount(id){
324
+     var count = 0
325
+     for(let i=0;i<this.cancelCountList.length;i++){
326
+       if(id == this.cancelCountList[i].good_id){
327
+          count = this.cancelCountList[i].count
328
+       }
329
+     }
330
+     return count
331
+   },
332
+   getCancelCountInfo(cancel_stock_info,storehouse_id){
333
+     var count = 0 
334
+     if(cancel_stock_info.length >0){
335
+        for(let i=0;i<cancel_stock_info.length;i++){
336
+          if(storehouse_id ==  cancel_stock_info[i].storehouse_id){
337
+              count += cancel_stock_info[i].count
338
+          }
339
+        }
340
+     }
341
+     return count
342
+   },
343
+   getWareOutInfoCount(warehouse_out_info,storehouse_id){
344
+     var count = 0
345
+     if(warehouse_out_info.length > 0){
346
+       for(let i=0;i<warehouse_out_info.length;i++){
347
+         if(storehouse_id == warehouse_out_info[i].storehouse_id){
348
+            count +=warehouse_out_info[i].count
349
+         }
350
+       }
351
+     }
352
+     return count
353
+   },
354
+   getInCount(id){
355
+      var count= 0
356
+     for(let i=0;i<this.countList.length;i++){
357
+      if(id == this.countList[i].good_id){
358
+          count = this.countList[i].count
359
+      }
360
+     }
361
+     return count
362
+    },
363
+    getOutCount(id){
364
+      var count = 0
365
+      for(let i=0;i<this.outCountList.length;i++){
366
+         if(id == this.outCountList[i].good_id){
367
+           count = this.outCountList[i].count
368
+         }
369
+      }
370
+     return count
371
+   },
372
+   getAutoCount(id){
373
+     var count= 0
374
+     for(let i=0;i<this.autoCountList.length;i++){
375
+       if(id == this.autoCountList[i].good_id){
376
+         count = this.autoCountList[i].count
377
+       }
378
+     }
379
+     return count
380
+   },
381
+   getCancelCount(id){
382
+     var count = 0
383
+     for(let i=0;i<this.cancelCountList.length;i++){
384
+       if(id == this.cancelCountList[i].good_id){
385
+          count = this.cancelCountList[i].count
386
+       }
387
+     }
388
+     return count
389
+   },
390
+   getStockCount(id){
391
+     var stock_count = 0
392
+     for(let i=0;i<this.countList.length;i++){
393
+       if(id == this.countList[i].good_id){
394
+         stock_count = this.countList[i].stock_count
395
+       }
396
+     }
397
+     return stock_count
398
+   },
399
+   getWareInfo(arr){
400
+     var total = 0
401
+     if(arr.length > 0){
402
+       for(let i=0;i<arr.length;i++){
403
+         total += parseInt(arr[i].warehousing_count)
404
+       }
405
+     }else{
406
+       total = ""
407
+     }
408
+     return total
409
+   },
410
+   getOverplus(arr){
411
+     var total = 0
412
+     if(arr.length > 0){
413
+      for(let i=0;i<arr.length;i++){
414
+        total += arr[i].stock_count
415
+      }
416
+     }else{
417
+       total = ""
418
+     }
419
+     return total
420
+   },
421
+   getCancelInfo(arr){
422
+     var total = 0
423
+     if(arr.length > 0){
424
+      for(let i=0;i<arr.length;i++){
425
+        total += arr[i].count
426
+      }
427
+     }else{
428
+       total = ""
429
+     }
430
+     return total
431
+   },
432
+   getOverFlushInfo(arr){
433
+     var total = 0
434
+     if(arr.length >0){
435
+      for(let i=0;i<arr.length;i++){
436
+        total += arr[i].stock_count
437
+      }
438
+     }
439
+     return total
440
+   },
441
+   toDialogClick(id,good_name,specification_name){
442
+    this.good_id = id
443
+    this.good_name = good_name
444
+    this.specification_name = specification_name
445
+     var params = {
446
+       good_id:id,
447
+       limit:this.limitone,
448
+       page:this.pageone,
449
+       start_first_time:this.start_first_time,
450
+       end_first_time:this.end_first_time,
451
+     }
452
+     getGoodWarehouseOutInfoById(params).then(response=>{
453
+       if(response.data.state == 1){
454
+         var list = response.data.data.list
455
+         console.log("list23233233232w",list)
456
+         this.tableList = list
457
+         this.tableData = list
458
+         this.totalone = response.data.data.total
459
+         this.dialogVisible = true
460
+       }
461
+     })
462
+   
463
+   },
464
+   startFirstTimeChange(){
465
+    
466
+   },
467
+   endEndTimeChange(){
468
+
469
+   },
470
+  getTime(val) {
471
+    if(val < 0){
472
+      return ""
473
+    }
474
+   if(val == ""){
475
+     return ""
476
+   }else {
477
+    return uParseTime(val, '{y}-{m}-{d}')
478
+   }
479
+   },
480
+  getName(id){
481
+    var name = ""
482
+    for(let i=0;i<this.patientList.length;i++){
483
+      if(id == this.patientList[i].id){
484
+        name = this.patientList[i].name
485
+      }
486
+    }
487
+    return name
488
+  },
489
+  getDaysBetween(dateString1, dateString2) {
490
+    let startDate = Date.parse(dateString1);
491
+    let endDate = Date.parse(dateString2);
492
+    return (startDate - endDate ) / (1 * 24 * 60 * 60 * 1000);
493
+  },
494
+  changeExpriyList(val){
495
+   
496
+    if(val ==0){
497
+     this.start_time = ""
498
+     this.getlist()
499
+    }
500
+    //已过期
501
+    if(val == 1){
502
+      this.getlist()
503
+    }
504
+    //30天内过期
505
+    if(val == 2){
506
+      var time = this.addDate(this.getTime(this.nowtime),30)
507
+      this.start_time = time
508
+      this.getlist()
509
+    }
510
+    //90天内过期
511
+    if(val == 3){
512
+       var time = this.addDate(this.getTime(this.nowtime),90)
513
+      this.start_time = time
514
+      this.getlist()
515
+    }
516
+    //180天内过期
517
+    if(val == 4){
518
+       var time = this.addDate(this.getTime(this.nowtime),180)
519
+       this.start_time = time
520
+    }
521
+    //1年以后
522
+    if(val == 5){
523
+       var time = this.addDate(this.getTime(this.nowtime),365)
524
+       this.start_time = time
525
+       this.getlist()
526
+    }
527
+  
528
+  },
529
+  addDate(date, days) {
530
+    var date = new Date(date);
531
+    date.setDate(date.getDate() + days);
532
+    var year = date.getFullYear();
533
+    var month = date.getMonth() + 1;
534
+    var day = date.getDate();
535
+    var mm = "'" + month + "'";
536
+    var dd = "'" + day + "'";
537
+    if(mm.length == 3) {
538
+      month = "0" + month;
539
+    }
540
+    if(dd.length == 3) {
541
+      day = "0" + day;
542
+    }
543
+    var time = year + "-" + month + "-" + day
544
+    return time;
545
+  },
546
+  },
547
+  created(){
548
+    this.getStorehouseList()
549
+    this.getlist()
550
+  }
551
+}
552
+</script>
553
+

+ 547 - 27
src/xt_pages/stock/query/goodNewQuery.vue View File

15
             </el-option>
15
             </el-option>
16
           </el-select>
16
           </el-select>
17
           <span>库存预警:</span>
17
           <span>库存预警:</span>
18
-          <el-select v-model="good_id" style="width:250px;margin-right:10px;" placeholder="请选择"
18
+          <el-select v-model="good_type" style="width:250px;margin-right:10px;" placeholder="请选择"
19
           filterable
19
           filterable
20
            @change="changeGoodName">
20
            @change="changeGoodName">
21
             <el-option
21
             <el-option
22
               v-for="item in goodList"
22
               v-for="item in goodList"
23
               :key="item.id"
23
               :key="item.id"
24
-              :label="item.good_name"
24
+              :label="item.name"
25
               :value="item.id">
25
               :value="item.id">
26
             </el-option>
26
             </el-option>
27
           </el-select>
27
           </el-select>
28
+          <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
29
+          <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
28
          </div>
30
          </div>
29
         </div>
31
         </div>
30
 
32
 
40
           >
42
           >
41
             <el-table-column label="耗材类型" align="center">
43
             <el-table-column label="耗材类型" align="center">
42
               <template slot-scope="scope">
44
               <template slot-scope="scope">
43
-                
44
-            </template>
45
+                {{getGoodTypeName(scope.row.good_type_id)}}
46
+              </template>
45
             </el-table-column>
47
             </el-table-column>
46
             <el-table-column label="耗材名称" align="center">
48
             <el-table-column label="耗材名称" align="center">
47
               <template slot-scope="scope">
49
               <template slot-scope="scope">
48
-               
50
+                 {{scope.row.good_name}}
49
               </template>
51
               </template>
50
             </el-table-column>
52
             </el-table-column>
51
             <el-table-column label="规格&单位" align="center">
53
             <el-table-column label="规格&单位" align="center">
52
                 <template slot-scope="scope">
54
                 <template slot-scope="scope">
53
-                  
55
+                  {{scope.row.specification_name}}
54
                 </template>
56
                 </template>
55
             </el-table-column>
57
             </el-table-column>
56
             <el-table-column label="生产厂商" align="center">
58
             <el-table-column label="生产厂商" align="center">
57
-                <template slot-scope="scope">
58
-                 
59
-                </template>
59
+              <template slot-scope="scope">
60
+                  {{getManufacturName(scope.row.manufacturer)}}
61
+              </template>
60
             </el-table-column>
62
             </el-table-column>
61
             <el-table-column label="国家编码" align="center">
63
             <el-table-column label="国家编码" align="center">
62
               <template slot-scope="scope">
64
               <template slot-scope="scope">
63
-               
65
+                {{scope.row.social_security_directory_code}}
64
               </template>
66
               </template>
65
             </el-table-column>
67
             </el-table-column>
66
             <el-table-column label="仓库名称" align="center">
68
             <el-table-column label="仓库名称" align="center">
67
               <template slot-scope="scope">
69
               <template slot-scope="scope">
68
-             
70
+                <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
71
+                  <td style="border-right: none; border-inline-end: none;text-align: center" >
72
+                    {{getHouseName(item.storehouse_id)}}
73
+                  </td>
74
+                </tr>
69
               </template>
75
               </template>
70
             </el-table-column>
76
             </el-table-column>
71
         
77
         
72
-    
73
             <el-table-column label="入库量" align="center">
78
             <el-table-column label="入库量" align="center">
74
               <template slot-scope="scope">
79
               <template slot-scope="scope">
75
-                
76
-              </template>
80
+                <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
81
+                  <td style="border-right: none; border-inline-end: none;text-align: center">
82
+                  {{getWareInfoCount(scope.row.xt_warehouse_info,item.storehouse_id)}}&nbsp;
83
+                  </td>
84
+                </tr>
85
+               </template>
77
             </el-table-column>
86
             </el-table-column>
78
-
87
+          
79
             <el-table-column label="出库量" align="center">
88
             <el-table-column label="出库量" align="center">
80
               <template slot-scope="scope">
89
               <template slot-scope="scope">
81
-                
82
-              </template>
90
+                <span v-if="org_id == 3907 || org_id == 9583">{{ getAutoCount(scope.row.id) + getOutCount(scope.row.id) }}</span>
91
+                <span v-if="org_id!=3907 && org_id!=9583">
92
+                  <tr style="background: none" v-for="(item,index) in scope.row.warehouse_out_info" :key="index">
93
+                    <td style="border-right: none; border-inline-end: none;text-align: center">
94
+                      <span style="color:#0099FF" @click="toDialogClick(scope.row.id,scope.row.good_name,scope.row.specification_name)"> {{getWareOutInfoCount(scope.row.warehouse_out_info,item.storehouse_id)}}</span>&nbsp;
95
+                    </td>
96
+                  </tr>
97
+              </span>
98
+             </template>
83
             </el-table-column>
99
             </el-table-column>
84
 
100
 
85
             <el-table-column label="退库数量" align="center">
101
             <el-table-column label="退库数量" align="center">
86
               <template slot-scope="scope">
102
               <template slot-scope="scope">
87
-                
103
+                  <tr style="background: none" v-for="(item,index) in scope.row.cancel_stock_info" :key="index">
104
+                    <td style="border-right: none; border-inline-end: none;text-align: center">
105
+                      {{getCancelCountInfo(scope.row.cancel_stock_info,item.storehouse_id)}}&nbsp; 
106
+                    </td>
107
+                  </tr>
108
+
88
               </template>
109
               </template>
89
             </el-table-column>
110
             </el-table-column>
90
 
111
 
91
              <el-table-column label="实际出库" align="center">
112
              <el-table-column label="实际出库" align="center">
92
               <template slot-scope="scope">
113
               <template slot-scope="scope">
93
-                
94
-              </template>
114
+                <span v-if="org_id == 3907 || org_id == 9583">{{ getAutoCount(scope.row.id) + getOutCount(scope.row.id) }}</span>
115
+                <span v-if="org_id!=3907 && org_id!=9583">
116
+                  <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
117
+                    <td style="border-right: none; border-inline-end: none;text-align: center">
118
+                    {{getWareInfoCount(scope.row.xt_warehouse_info,item.storehouse_id) - getWareInfoCountOne(scope.row.xt_warehouse_info,item.storehouse_id)}}&nbsp;
119
+                    </td>
120
+                  </tr>
121
+               </span>
122
+             </template>
95
             </el-table-column>
123
             </el-table-column>
96
 
124
 
97
             <el-table-column label="剩余库存" align="center">
125
             <el-table-column label="剩余库存" align="center">
98
               <template slot-scope="scope">
126
               <template slot-scope="scope">
99
-                
127
+                <span v-if="org_id == 3907 || org_id == 9583">
128
+                  {{
129
+                    getWareInfo(scope.row.xt_warehouse_info) -
130
+                    getAutoCount(scope.row.id) -
131
+                    getOutCount(scope.row.id) +
132
+                    getCancelCount(scope.row.id)
133
+                    }}
134
+                </span>
135
+                <span v-if="org_id!=3907 && org_id!=9583">
136
+                  <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
137
+                    <td style="border-right: none; border-inline-end: none;text-align: center">
138
+                    {{getWareInfoCountOne(scope.row.xt_warehouse_info,item.storehouse_id)}}&nbsp;&nbsp;
139
+                    </td>
140
+                  </tr>
141
+                </span>
100
               </template>
142
               </template>
101
             </el-table-column>
143
             </el-table-column>
102
 
144
 
103
             <el-table-column label="总库存量" align="center">
145
             <el-table-column label="总库存量" align="center">
104
               <template slot-scope="scope">
146
               <template slot-scope="scope">
105
-                
106
-              </template>
147
+                <span v-if="org_id == 3907 || org_id == 9583">
148
+                    {{
149
+                    getWareInfo(scope.row.xt_warehouse_info) -
150
+                    getAutoCount(scope.row.id) -
151
+                    getOutCount(scope.row.id) +
152
+                    getCancelCount(scope.row.id)
153
+                    }}
154
+                </span>
155
+                <span v-if="org_id != 3907 && org_id != 9583">
156
+                    {{getOverFlushInfo(scope.row.xt_warehouse_info)}}
157
+                </span>
158
+               </template>
107
             </el-table-column>
159
             </el-table-column>
108
            
160
            
109
-            <el-table-column label="操作" align="center">
161
+            <el-table-column label="操作" align="center" width="200px">
110
              
162
              
111
               <template slot-scope="scope">
163
               <template slot-scope="scope">
112
                 <el-button
164
                 <el-button
123
                 </el-button>
175
                 </el-button>
124
                </template>
176
                </template>
125
             </el-table-column>
177
             </el-table-column>
126
-
127
           </el-table>
178
           </el-table>
179
+           <el-pagination
180
+            @size-change="handleSizeChange"
181
+            @current-change="handleCurrentChange"
182
+            :page-sizes="[10, 50, 100,200,500,1000]"
183
+            :page-size="10"
184
+            background
185
+            align="right"
186
+            style="margin-top:20px;"
187
+            layout="total, sizes, prev, pager, next, jumper"
188
+            :total="total"
189
+          >
190
+            </el-pagination>
128
      </div>
191
      </div>
129
 
192
 
193
+
194
+
195
+    <el-dialog
196
+      title="出库详情"
197
+      :visible.sync="dialogVisible"
198
+      width="70%">
199
+      <span>
200
+        耗材名称:{{good_name}}
201
+        规格&单位:{{specification_name}}
202
+        查询日期:
203
+          <el-date-picker
204
+            size="small"
205
+            v-model="start_first_time"
206
+            prefix-icon="el-icon-date"
207
+            :editable="false"
208
+            style="width: 150px;"
209
+            type="date"
210
+            placeholder="选择日期时间"
211
+            align="right"
212
+            format="yyyy-MM-dd"
213
+            value-format="yyyy-MM-dd"
214
+            @change="startFirstTimeChange"
215
+           ></el-date-picker> 
216
+            <span>-</span> 
217
+            <el-date-picker
218
+              size="small"
219
+              v-model="end_first_time"
220
+              prefix-icon="el-icon-date"
221
+              :editable="false"
222
+              style="width: 150px;"
223
+              type="date"
224
+              placeholder="选择日期时间"
225
+              align="right"
226
+              format="yyyy-MM-dd"
227
+              value-format="yyyy-MM-dd"
228
+              @change="endEndTimeChange"
229
+          ></el-date-picker>
230
+      </span>
231
+      <el-divider></el-divider>
232
+       <el-table
233
+          :row-style="{ color: '#303133' }"
234
+          :header-cell-style="{
235
+            backgroundColor: 'rgb(245, 247, 250)',
236
+            color: '#606266'
237
+          }"
238
+          :data="tableData"
239
+          :class="signAndWeighBoxPatients"
240
+          border
241
+          >
242
+          <el-table-column label="单据编号" align="center">
243
+            <template slot-scope="scope">
244
+              {{scope.row.warehouse_out_order_number}}
245
+            </template>
246
+          </el-table-column>
247
+          <el-table-column label="操作时间" align="center">
248
+            <template slot-scope="scope">
249
+              {{getTime(scope.row.ctime)}}
250
+            </template>
251
+          </el-table-column>
252
+          <el-table-column label="出库数量" align="center">
253
+              <template slot-scope="scope">
254
+                {{scope.row.count}}
255
+              </template>
256
+          </el-table-column>
257
+          <el-table-column label="库存数量" align="center">
258
+            <template slot-scope="scope">
259
+               
260
+            </template>
261
+          </el-table-column>
262
+          <el-table-column label="使用人" align="center">
263
+            <template slot-scope="scope">
264
+              {{getName(scope.row.patient_id)}}
265
+            </template>
266
+          </el-table-column>
267
+          <el-table-column label="备注" align="center">
268
+            <template slot-scope="scope">
269
+              {{scope.row.remark}}
270
+            </template>
271
+          </el-table-column>
272
+       </el-table>
273
+       <el-pagination
274
+            @size-change="handleSizeChangeOne"
275
+            @current-change="handleCurrentChangeOne"
276
+            :page-sizes="[10, 50, 100,200,500,1000]"
277
+            :page-size="10"
278
+            background
279
+            align="right"
280
+            style="margin-top:20px;"
281
+            layout="total, sizes, prev, pager, next, jumper"
282
+            :total="totalone"
283
+          >
284
+            </el-pagination>
285
+      <span slot="footer" class="dialog-footer">
286
+        <el-button @click="dialogVisible = false">取 消</el-button>
287
+        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
288
+      </span>
289
+    </el-dialog>
290
+
130
   </div>
291
   </div>
131
 </template>
292
 </template>
132
 <script>
293
 <script>
294
+import { getStorehouseList,getGoodNewQuery,getGoodWarehouseOutInfoById } from "@/api/drug/drug"
295
+import {
296
+  getStockDrugCount
297
+} from "@/api/stock";
298
+import { uParseTime } from '@/utils/tools'
133
 export default {
299
 export default {
134
 
300
 
135
   data(){
301
   data(){
136
     return{
302
     return{
137
      tableList:[],
303
      tableList:[],
138
-     goodList:[],
304
+     goodList:[
305
+      {id:1,name:"全部耗材"},
306
+      {id:2,name:"库存预警"},
307
+     ],
139
      houseList:[],
308
      houseList:[],
140
      storehouse_id:0,
309
      storehouse_id:0,
141
-     good_id:0,
310
+     good_type:1,
142
      multipleSelection: [],
311
      multipleSelection: [],
143
      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
312
      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
144
      manufacturerList:[],
313
      manufacturerList:[],
314
+     limit:10,
315
+     page:1,
316
+     total:0,
317
+     limitone:10,
318
+     pageone:1,
319
+     totalone:0,
320
+     keyword:"",
321
+     goodTypeList:[],
322
+     start_time:"",
323
+     end_time:"",
324
+     countList:[],
325
+     outCountList:[],
326
+     autoCountList:[],
327
+     cancelCountList:[],
328
+     org_id:this.$store.getters.xt_user.org_id,
329
+     dialogVisible:false,
330
+     start_first_time:"",
331
+     end_first_time:"",
332
+     tableData:[],
333
+     good_id:0,
334
+     patientList:[],
335
+     good_name:"",
336
+     specification_name:""
145
     }
337
     }
146
   
338
   
147
   },
339
   },
167
       this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
359
       this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
168
     },
360
     },
169
     toClickOne(val){
361
     toClickOne(val){
362
+    
170
       var manufacturer_name = ""
363
       var manufacturer_name = ""
364
+      var specification_name = ""
171
       for(let i=0;i<this.manufacturerList.length;i++){
365
       for(let i=0;i<this.manufacturerList.length;i++){
172
           if(val.manufacturer == this.manufacturerList[i].id){
366
           if(val.manufacturer == this.manufacturerList[i].id){
173
             manufacturer_name = this.manufacturerList[i].manufacturer_name
367
             manufacturer_name = this.manufacturerList[i].manufacturer_name
179
       // window.sessionStorage.setItem('end_time',this.end_time)
373
       // window.sessionStorage.setItem('end_time',this.end_time)
180
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
374
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
181
     },
375
     },
376
+
377
+    getStorehouseList(){
378
+      getStorehouseList().then(response=>{
379
+         if(response.data.state == 1){
380
+           var houseList = response.data.data.list
381
+           var obj = {id:0,storehouse_name:"全部"}
382
+           this.houseList.push(obj)
383
+           for(let i=0;i<houseList.length;i++){
384
+             this.houseList.push(houseList[i])
385
+           }
386
+           this.manufacturerList = response.data.data.manufacturerList
387
+           this.goodTypeList = response.data.data.goodTypeList
388
+           this.patientList = response.data.data.patientList
389
+         }
390
+      })
391
+    },
392
+    getlist(){
393
+        var params = {
394
+          storehouse_id:this.storehouse_id,
395
+          good_type:this.good_type,
396
+          keyword:this.keyword,
397
+          page:this.page,
398
+          limit:this.limit,
399
+          start_time:this.start_time,
400
+          end_time:this.end_time,
401
+        }
402
+      getGoodNewQuery(params).then(response=>{
403
+         if(response.data.state == 1){
404
+            var list = response.data.data.list
405
+            console.log("list2332233232323232w",list)
406
+            
407
+            if(list.length > 0){
408
+              var arr = []
409
+              for(let i=0;i<list.length;i++){
410
+                if(list[i].xt_warehouse_info.length > 0){
411
+                  arr.push(list[i])
412
+                }
413
+              }
414
+              this.tableList = arr
415
+            }
416
+            this.total = response.data.data.total
417
+           
418
+         }
419
+      })
420
+    },
421
+    getManufacturName(id){
422
+      var manufacturer_name = ""
423
+      for(let i=0;i<this.manufacturerList.length;i++){
424
+        if(id == this.manufacturerList[i].id){
425
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
426
+        }
427
+      }
428
+      return manufacturer_name
429
+    },
430
+    handleSizeChange(val) {
431
+      this.limit = val;
432
+      this.getlist()
433
+    },
434
+    handleCurrentChange(val) {
435
+      this.page = val;
436
+      this.getlist()
437
+    },
438
+    handleSizeChangeOne(val) {
439
+      this.limitone = val;
440
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
441
+    },
442
+    handleCurrentChangeOne(val) {
443
+      this.pageone = val;
444
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
445
+    },
446
+   seach(){
447
+    this.getlist()
448
+   },
449
+   getGoodTypeName(id){
450
+     var type_name = ""
451
+     for(let i=0;i<this.goodTypeList.length;i++){
452
+       if(id == this.goodTypeList[i].id){
453
+         type_name = this.goodTypeList[i].type_name
454
+       }
455
+     }
456
+     return type_name
457
+   },
458
+   getHouseName(id){
459
+     var storehouse_name = ""
460
+     for(let i=0;i<this.houseList.length;i++){
461
+       if(id == this.houseList[i].id){
462
+         storehouse_name = this.houseList[i].storehouse_name
463
+       }
464
+     }
465
+     return storehouse_name
466
+   },
467
+   getWareInfoCount(val,storehouse_id){
468
+     var count = 0
469
+     if(val.length > 0){
470
+       for(let i=0;i<val.length;i++){
471
+         if(val[i].storehouse_id == storehouse_id){
472
+             count +=val[i].warehousing_count
473
+         }
474
+       }
475
+     }
476
+     if(count > 0){
477
+       return count
478
+     }else{
479
+       return ""
480
+     }
481
+   },
482
+   getStockDrugCount(){
483
+        var params ={
484
+           keywords: this.keywords,
485
+           start_time:this.start_time,
486
+           end_time:this.end_time,
487
+        }
488
+      getStockDrugCount(params).then(response=>{
489
+         if(response.data.state == 1){
490
+           var outlist = response.data.data.outList
491
+           this.outCountList = outlist
492
+           var autoCount = response.data.data.autoCount
493
+           this.autoCountList = autoCount
494
+           var totalCount = response.data.data.totalCount
495
+           this.cancelCountList = totalCount
496
+         }
497
+      })
498
+    },
499
+    getWareInfoCountOne(val,storehouse_id){
500
+     var count = 0
501
+     if(val.length > 0){
502
+       for(let i=0;i<val.length;i++){
503
+         if(val[i].storehouse_id == storehouse_id){
504
+             count +=val[i].stock_count
505
+         }
506
+       }
507
+     }
508
+     if(count > 0){
509
+       return count
510
+     }else{
511
+       return ""
512
+     }
513
+   },
514
+   getOutCount(id){
515
+      var count = 0
516
+      for(let i=0;i<this.outCountList.length;i++){
517
+         if(id == this.outCountList[i].good_id){
518
+           count = this.outCountList[i].count
519
+         }
520
+      }
521
+     return count
522
+   },
523
+   getAutoCount(id){
524
+     var count= 0
525
+     for(let i=0;i<this.autoCountList.length;i++){
526
+       if(id == this.autoCountList[i].good_id){
527
+         count = this.autoCountList[i].count
528
+       }
529
+     }
530
+     return count
531
+   },
532
+   getCancelCount(id){
533
+     var count = 0
534
+     for(let i=0;i<this.cancelCountList.length;i++){
535
+       if(id == this.cancelCountList[i].good_id){
536
+          count = this.cancelCountList[i].count
537
+       }
538
+     }
539
+     return count
540
+   },
541
+   getCancelCountInfo(cancel_stock_info,storehouse_id){
542
+     var count = 0 
543
+     if(cancel_stock_info.length >0){
544
+        for(let i=0;i<cancel_stock_info.length;i++){
545
+          if(storehouse_id ==  cancel_stock_info[i].storehouse_id){
546
+              count += cancel_stock_info[i].count
547
+          }
548
+        }
549
+     }
550
+     return count
551
+   },
552
+   getWareOutInfoCount(warehouse_out_info,storehouse_id){
553
+     var count = 0
554
+     if(warehouse_out_info.length > 0){
555
+       for(let i=0;i<warehouse_out_info.length;i++){
556
+         if(storehouse_id == warehouse_out_info[i].storehouse_id){
557
+            count +=warehouse_out_info[i].count
558
+         }
559
+       }
560
+     }
561
+     return count
562
+   },
563
+   getInCount(id){
564
+      var count= 0
565
+     for(let i=0;i<this.countList.length;i++){
566
+      if(id == this.countList[i].good_id){
567
+          count = this.countList[i].count
568
+      }
569
+     }
570
+     return count
571
+    },
572
+    getOutCount(id){
573
+      var count = 0
574
+      for(let i=0;i<this.outCountList.length;i++){
575
+         if(id == this.outCountList[i].good_id){
576
+           count = this.outCountList[i].count
577
+         }
578
+      }
579
+     return count
580
+   },
581
+   getAutoCount(id){
582
+     var count= 0
583
+     for(let i=0;i<this.autoCountList.length;i++){
584
+       if(id == this.autoCountList[i].good_id){
585
+         count = this.autoCountList[i].count
586
+       }
587
+     }
588
+     return count
589
+   },
590
+   getCancelCount(id){
591
+     var count = 0
592
+     for(let i=0;i<this.cancelCountList.length;i++){
593
+       if(id == this.cancelCountList[i].good_id){
594
+          count = this.cancelCountList[i].count
595
+       }
596
+     }
597
+     return count
598
+   },
599
+   getStockCount(id){
600
+     var stock_count = 0
601
+     for(let i=0;i<this.countList.length;i++){
602
+       if(id == this.countList[i].good_id){
603
+         stock_count = this.countList[i].stock_count
604
+       }
605
+     }
606
+     return stock_count
607
+   },
608
+   getWareInfo(arr){
609
+     var total = 0
610
+     if(arr.length > 0){
611
+       for(let i=0;i<arr.length;i++){
612
+         total += parseInt(arr[i].warehousing_count)
613
+       }
614
+     }else{
615
+       total = ""
616
+     }
617
+     return total
618
+   },
619
+   getOverplus(arr){
620
+     var total = 0
621
+     if(arr.length > 0){
622
+      for(let i=0;i<arr.length;i++){
623
+        total += arr[i].stock_count
624
+      }
625
+     }else{
626
+       total = ""
627
+     }
628
+     return total
629
+   },
630
+   getCancelInfo(arr){
631
+     var total = 0
632
+     if(arr.length > 0){
633
+      for(let i=0;i<arr.length;i++){
634
+        total += arr[i].count
635
+      }
636
+     }else{
637
+       total = ""
638
+     }
639
+     return total
640
+   },
641
+   getOverFlushInfo(arr){
642
+     var total = 0
643
+     if(arr.length >0){
644
+      for(let i=0;i<arr.length;i++){
645
+        total += arr[i].stock_count
646
+      }
647
+     }
648
+     return total
649
+   },
650
+   toDialogClick(id,good_name,specification_name){
651
+    this.good_id = id
652
+    this.good_name = good_name
653
+    this.specification_name = specification_name
654
+     var params = {
655
+       good_id:id,
656
+       limit:this.limitone,
657
+       page:this.pageone,
658
+       start_first_time:this.start_first_time,
659
+       end_first_time:this.end_first_time,
660
+     }
661
+     getGoodWarehouseOutInfoById(params).then(response=>{
662
+       if(response.data.state == 1){
663
+         var list = response.data.data.list
664
+         console.log("list23233233232w",list)
665
+         this.tableData = list
666
+         this.totalone = response.data.data.total
667
+         this.dialogVisible = true
668
+       }
669
+     })
670
+   
671
+   },
672
+   startFirstTimeChange(){
673
+    
674
+   },
675
+   endEndTimeChange(){
676
+
677
+   },
678
+  getTime(val) {
679
+    if(val < 0){
680
+      return ""
681
+    }
682
+   if(val == ""){
683
+     return ""
684
+   }else {
685
+    return uParseTime(val, '{y}-{m}-{d}')
686
+   }
687
+   },
688
+  getName(id){
689
+    var name = ""
690
+    for(let i=0;i<this.patientList.length;i++){
691
+      if(id == this.patientList[i].id){
692
+        name = this.patientList[i].name
693
+      }
694
+    }
695
+    return name
696
+  }
697
+  },
698
+  created(){
699
+    this.getStorehouseList()
700
+    this.getlist()
701
+    this.getStockDrugCount()
182
   }
702
   }
183
 }
703
 }
184
 </script>
704
 </script>

+ 438 - 6
src/xt_pages/stock/query/patientQuery.vue View File

1
 <template>
1
 <template>
2
-  <div class="main-contain">
3
-     <div class="app-container ">
4
-       患者查询 库存查询喔喔喔
5
-     </div>
6
-  </div>
7
-</template>
2
+    <div class="main-contain">
3
+        <div class="app-container">
4
+         <el-container>
5
+               <div style="width:27%">
6
+                <el-row>
7
+                   时间:
8
+                    <el-date-picker
9
+                      size="small"
10
+                      v-model="start_time"
11
+                      prefix-icon="el-icon-date"
12
+                      :editable="false"
13
+                      style="width:160px;"
14
+                      type="date"
15
+                      placeholder="选择日期时间"
16
+                      align="right"
17
+                      format="yyyy-MM-dd"
18
+                      value-format="yyyy-MM-dd"
19
+                      @change="startTimeChange"
20
+                    ></el-date-picker> 
21
+                      <span>-</span> 
22
+                      <el-date-picker
23
+                        size="small"
24
+                        v-model="end_time"
25
+                        prefix-icon="el-icon-date"
26
+                        :editable="false"
27
+                        style="width:160px;"
28
+                        type="date"
29
+                        placeholder="选择日期时间"
30
+                        align="right"
31
+                        format="yyyy-MM-dd"
32
+                        value-format="yyyy-MM-dd"
33
+                        @change="endTimeChange"
34
+                    ></el-date-picker>
35
+                </el-row>
36
+                <el-row></el-row>
37
+                 <el-row>
38
+                   <el-col :span="24">
39
+                      <el-input style="width:200px;margin-top:10px;margin-bottom:10px" placeholder="请输入患者姓名" v-model="keyword"></el-input>&nbsp;<el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
40
+                   </el-col>
41
+                  </el-row>
42
+
43
+                  <el-row>
44
+                      <el-table
45
+                          ref="singleTable"
46
+                          :data="patientList"
47
+                          highlight-current-row
48
+                           border
49
+                          @current-change="handleCurrentChange"
50
+                           height="440"
51
+                           :row-style="{ color: '#303133' }"
52
+                          :header-cell-style="{
53
+                            backgroundColor: 'rgb(245, 247, 250)',
54
+                            color: '#606266'
55
+                          }"
56
+                        >
57
+                     <el-table-column
58
+                       prop="date"
59
+                       label="序号"
60
+                      align="center"
61
+                      >
62
+                      <template slot-scope="scope">
63
+                        {{scope.$index + 1}}
64
+                      </template>
65
+                    </el-table-column>
66
+                     <el-table-column
67
+                       prop="name"
68
+                      label="姓名"
69
+                      align="center">
70
+                      <template slot-scope="scope">
71
+                        {{scope.row.name}}
72
+                      </template>
73
+                     </el-table-column>
74
+
75
+                     </el-table>
76
+                  </el-row>
77
+               </div>
78
+
79
+                 <el-main>
80
+                  <div class="main newMain">
81
+                      
82
+                        
83
+                  <el-tabs>
84
+
85
+                   <el-tab-pane label="患者使用列表">
86
+                   
87
+                     <el-table
88
+                          :data="tableList"
89
+                          highlight-current-row
90
+                           border
91
+                           height="440"
92
+                           :row-style="{ color: '#303133' }"
93
+                          :header-cell-style="{
94
+                            backgroundColor: 'rgb(245, 247, 250)',
95
+                            color: '#606266'
96
+                          }"
97
+                        >
98
+                     <el-table-column
99
+                       prop="date"
100
+                       label="名称"
101
+                      align="center"
102
+                      >
103
+                      <template slot-scope="scope">
104
+                        {{scope.row.GoodInfo.good_name}}
105
+                      </template>
106
+                    </el-table-column>
107
+                     <el-table-column
108
+                       prop="name"
109
+                      label="生产厂家"
110
+                      align="center">
111
+                      <template slot-scope="scope">
112
+                        {{getManufacturName(scope.row.manufacturer)}}
113
+                      </template>
114
+                     </el-table-column>
115
+                      <el-table-column
116
+                       prop="name"
117
+                      label="规格&单位"
118
+                      align="center">
119
+                      <template slot-scope="scope">
120
+                        {{scope.row.GoodInfo.specification_name}}
121
+                      </template>
122
+                     </el-table-column>
123
+                      <el-table-column
124
+                       prop="name"
125
+                      label="数量"
126
+                      align="center">
127
+                      <template slot-scope="scope">
128
+                        {{scope.row.count}}
129
+                      </template>
130
+                     </el-table-column>
131
+
132
+                     </el-table>
133
+                      <el-pagination
134
+                        @size-change="handleSizeChange"
135
+                        @current-change="handleCurrentChange"
136
+                        :page-sizes="[10, 50, 100,200,500,1000]"
137
+                        :page-size="10"
138
+                        background
139
+                        align="right"
140
+                        style="margin-top:20px;"
141
+                        layout="total, sizes, prev, pager, next, jumper"
142
+                        :total="total"
143
+                        >
144
+                      </el-pagination>
145
+                    </el-tab-pane>
146
+                   </el-tabs>
147
+                </div>
148
+             </el-main>
149
+          </el-container>
150
+        </el-container>
151
+      </el-container>
152
+      </div>
153
+    </div>
154
+
155
+</template>
156
+<script>
157
+import { getGoodPatientList,getWarehouseOutDetailByPatientId } from "@/api/drug/drug"
158
+export default {
159
+  data(){
160
+    return{
161
+      zoneList:[],
162
+      zone_id:0,
163
+      tableData:[],
164
+      DeviceTypeType:[],
165
+      device_type:"",
166
+      forms:{},
167
+      start_time:"",
168
+      end_time:"",
169
+      patientList:[],
170
+      tableList:[],
171
+      keyword:"",
172
+      manufacturerList:[],
173
+      patient_id:0,
174
+      patient:{},
175
+      limit:10,
176
+      page:1,
177
+      total:0,
178
+    }
179
+  },
180
+  methods:{
181
+   handleSizeChange(val) {
182
+      this.limit = val;
183
+      this.getWarehouseOutDetailByPatientId()
184
+    },
185
+    handleCurrentChange(val) {
186
+      this.page = val;
187
+      this.getWarehouseOutDetailByPatientId()
188
+    },
189
+    startTimeChange(){
190
+      this.handleCurrentChange(this.patient)
191
+    },
192
+    endTimeChange(){
193
+      this.handleCurrentChange(this.patient)
194
+    },
195
+    getlist(){
196
+        var params = {
197
+          keyword:this.keyword,
198
+        }
199
+      getGoodPatientList(params).then(response=>{
200
+        if(response.data.state == 1){
201
+          var list = response.data.data.list
202
+          this.patientList = list
203
+          this.$refs.singleTable.setCurrentRow(this.patientList[0]);
204
+          this.handleCurrentChange(this.patientList[0])
205
+        }
206
+      })
207
+    },
208
+   onSearch(){
209
+     this.getlist()
210
+   },
211
+   handleCurrentChange(val){
212
+       this.patient = val
213
+       var params = {
214
+         patient_id:val.id,
215
+         start_time:this.start_time,
216
+         end_time:this.end_time,
217
+         limit:this.limit,
218
+         page:this.page
219
+       }
220
+     getWarehouseOutDetailByPatientId(params).then(response=>{
221
+        if(response.data.state == 1){
222
+          var list = response.data.data.list
223
+          this.total = response.data.data.total
224
+          this.manufacturerList = response.data.data.manufacturerList
225
+          this.tableList = list
226
+        }
227
+     })
228
+   },
229
+   getWarehouseOutDetailByPatientId(){
230
+     var params = {
231
+        patient_id:this.patient,
232
+        start_time:this.start_time,
233
+        end_time:this.end_time,
234
+      }
235
+    getWarehouseOutDetailByPatientId().then(response=>{
236
+       if(response.data.state == 1){
237
+        var list = response.data.data.list
238
+        this.total = response.data.data.total
239
+        this.manufacturerList = response.data.data.manufacturerList
240
+        this.tableList = list
241
+       }
242
+    })
243
+   },
244
+   getManufacturName(id){
245
+     var manufacturer_name = ""
246
+     for(let i=0;i<this.manufacturerList.length;i++){
247
+        if(id == this.manufacturerList[i].id){
248
+          manufacturer_name = this.manufacturerList[i].manufacturer_name
249
+        } 
250
+     }
251
+     return manufacturer_name
252
+   }
253
+  },
254
+  created(){
255
+    var nowDate = new Date();
256
+    var nowYear = nowDate.getFullYear();
257
+    var nowMonth = nowDate.getMonth() + 1;
258
+    var nowDay = nowDate.getDate();
259
+    this.end_time =
260
+      nowYear +
261
+      "-" +
262
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
263
+      "-" +
264
+      (nowDay < 10 ? "0" + nowDay : nowDay);
265
+    nowDate.setMonth(nowDate.getMonth() - 1);
266
+    nowYear = nowDate.getFullYear();
267
+    nowMonth = nowDate.getMonth() + 1;
268
+    nowDay = nowDate.getDate();
269
+    this.start_time =
270
+      nowYear +
271
+      "-" +
272
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
273
+      "-" +
274
+      (nowDay < 10 ? "0" + nowDay : nowDay);
275
+     this.getlist()
276
+  },
277
+  
278
+}
279
+</script>
280
+
281
+
282
+   
283
+<style lang="scss" scoped>
284
+    .zone{
285
+      //  margin-left: 30px;
286
+      //  text-align: left;
287
+       width: 70px;
288
+       display: inline-block;
289
+       color:#606266;
290
+    }
291
+    .disinfect{
292
+      position: relative;
293
+      .newButton{
294
+        // position: absolute;
295
+        // right: 2%;
296
+        // top:4px;
297
+        // z-index: 9;
298
+        margin-bottom: 10px;
299
+    margin-left: 90%;
300
+      }
301
+    }
302
+    .disinfectOne{
303
+      position: relative;
304
+      .newButtonOne{
305
+        position: absolute;
306
+         right: 0;
307
+         top: -10;
308
+         z-index: 18;
309
+      }
310
+    }
311
+    .but{
312
+      width: 200px;
313
+      height: 50px;
314
+      // border: solid 1px red;
315
+      margin-left: 77%;
316
+    }
317
+    .clearn{
318
+      width: 460px;
319
+      height: 50px;
320
+      // border:solid 1px red;
321
+      margin-left:650px;
322
+    }
323
+
324
+  .zClass{
325
+    width: 200px;
326
+    height: 200px;
327
+    // border:solid 1px red;
328
+    margin-left: 450px;
329
+    margin-top: 200px;
330
+  }
331
+  .warn{
332
+    color: red;
333
+    font-size: 14px;
334
+    width: 100%;
335
+    display: inline-block;
336
+    margin-left: 96px;
337
+  }
338
+
339
+  .userbutton{
340
+       margin-bottom: 10px;
341
+    margin-left: 82%
342
+  }
343
+
344
+</style>
345
+<style lang="scss">
346
+   .a{
347
+     margin-bottom: 10px;
348
+      margin-top: 6px;
349
+
350
+   }
351
+
352
+   .b{
353
+    .el-button{
354
+      margin-left: 90%;
355
+      margin-bottom: 10px;
356
+    }
357
+   }
358
+
359
+   .stoppage{
360
+     .el-form-item__label{
361
+       width:190px;
362
+     }
363
+   }
364
+   .st{
365
+     .el-form-item__label{
366
+       width:-10px;
367
+     }
368
+   }
369
+   .main{
370
+     position: relative;
371
+     .newButtonOne{
372
+       position:absolute;
373
+       right: 0;
374
+       z-index: 2;
375
+     }
376
+   }
377
+
378
+    .elbutton{
379
+      // border: solid 1px red;
380
+      height: 50px;
381
+      width: 400px;
382
+      margin-left: 650px;
383
+    }
384
+  // .el-form-item__label {
385
+  //   width: 130px;
386
+  //   font-size: 14px;
387
+  // }
388
+  .el-form-item__error {
389
+    margin-left: 130px;
390
+  }
391
+
392
+ .el-upload-list__item-name {
393
+    color: #606266;
394
+    display: block;
395
+    margin-right: 40px;
396
+    overflow: hidden;
397
+    padding-left: 4px;
398
+    text-overflow: ellipsis;
399
+    transition: color .3s;
400
+    white-space: nowrap;
401
+}
402
+.el-main{
403
+  padding-top: 0px;
404
+}
405
+.newMain{
406
+  .el-form-item__label{
407
+    width: 104px;
408
+  }
409
+}
410
+.newDisinfectOne{
411
+  .el-input--prefix .el-input__inner{
412
+    padding-left: 15px
413
+  }
414
+}
415
+.stoppage{
416
+  .el-form-item__label{
417
+    width: 18%;
418
+  }
419
+}
420
+.newItem{
421
+  .el-form-item__label{
422
+    width: 130px;
423
+  }
424
+}
425
+.formItem{
426
+  .el-form-item__label{
427
+    width: 104px;
428
+    line-height: 30px;
429
+  }
430
+}
431
+.newname{
432
+  .el-form-item__label{
433
+    width: 60px;
434
+  }
435
+}
436
+::-webkit-scrollbar{
437
+  height: 20px;
438
+}
439
+</style>

+ 548 - 2
src/xt_pages/stock/query/purchaseStockQuery.vue View File

1
 <template>
1
 <template>
2
   <div class="main-contain">
2
   <div class="main-contain">
3
      <div class="app-container ">
3
      <div class="app-container ">
4
-        进销存 库存查询喔喔喔
4
+        <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
5
+         <div>
6
+          <span>操作时间:</span>
7
+          <el-date-picker
8
+            size="small"
9
+            v-model="start_time"
10
+            prefix-icon="el-icon-date"
11
+            :editable="false"
12
+            style="width: 150px;"
13
+            type="date"
14
+            placeholder="选择日期时间"
15
+            align="right"
16
+            format="yyyy-MM-dd"
17
+            value-format="yyyy-MM-dd"
18
+            @change="startTimeChange"
19
+           ></el-date-picker> 
20
+            <span>-</span> 
21
+            <el-date-picker
22
+              size="small"
23
+              v-model="end_time"
24
+              prefix-icon="el-icon-date"
25
+              :editable="false"
26
+              style="width: 150px;"
27
+              type="date"
28
+              placeholder="选择日期时间"
29
+              align="right"
30
+              format="yyyy-MM-dd"
31
+              value-format="yyyy-MM-dd"
32
+              @change="endTimeChange"
33
+          ></el-date-picker>  
34
+          <span>耗材类型:</span>
35
+          <el-select v-model="good_type" style="width:200px;margin-right:10px;" placeholder="请选择"
36
+          filterable
37
+           @change="changeGoodTypeName">
38
+            <el-option
39
+              v-for="item in goodTypeList"
40
+              :key="item.id"
41
+              :label="item.type_name"
42
+              :value="item.id">
43
+            </el-option>
44
+          </el-select>
45
+          <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
46
+          <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
47
+         </div>
48
+        </div>
49
+
50
+           <el-table
51
+            :row-style="{ color: '#303133' }"
52
+            :header-cell-style="{
53
+              backgroundColor: 'rgb(245, 247, 250)',
54
+              color: '#606266'
55
+            }"
56
+            :data="tableList"
57
+            :class="signAndWeighBoxPatients"
58
+            border
59
+          >
60
+            <el-table-column label="耗材类型" align="center">
61
+              <template slot-scope="scope">
62
+                 {{getGoodTypeName(scope.row.good_type_id)}}
63
+              </template>
64
+            </el-table-column>
65
+            <el-table-column label="耗材名称" align="center">
66
+              <template slot-scope="scope">
67
+                {{scope.row.good_name}}
68
+              </template>
69
+            </el-table-column>
70
+            <el-table-column label="规格&单位" align="center">
71
+                <template slot-scope="scope">
72
+                  {{scope.row.specification_name}}
73
+                </template>
74
+            </el-table-column>
75
+            <el-table-column label="生产厂商" align="center">
76
+              <template slot-scope="scope">
77
+                 {{getManufacturName(scope.row.manufacturer)}}
78
+              </template>
79
+            </el-table-column>
80
+            <el-table-column label="期初结余" align="center">
81
+               
82
+                 <el-table-column prop="stockIn" label="数量" width="100">
83
+                   
84
+                 </el-table-column>
85
+              
86
+                <el-table-column prop="buy_price" label="进货金额" width="100">
87
+                   
88
+                </el-table-column>
89
+                <el-table-column prop="stockMoney" label="销售金额" width="100">
90
+                 
91
+                </el-table-column>
92
+             
93
+            </el-table-column>
94
+            <el-table-column label="本期增加" align="center">
95
+             
96
+                <el-table-column prop="stockAdd" label="数量" width="100">
97
+                
98
+                </el-table-column>
99
+             
100
+                <el-table-column prop="buy_price" label="进货金额" width="100">
101
+                  
102
+                </el-table-column>
103
+                <el-table-column  prop="addStockMoney" label="销售金额"  width="100">
104
+                </el-table-column>
105
+              
106
+            </el-table-column>
107
+         
108
+            <el-table-column label="本期减少" align="center">
109
+               <el-table-column prop="outStock" label="数量" width="100">
110
+                </el-table-column>
111
+                <el-table-column  prop="buy_price"  label="进货金额" width="100">
112
+                </el-table-column>
113
+                <el-table-column prop="stockOutMoney" label="销售金额" width="100">
114
+                </el-table-column>
115
+            </el-table-column>
116
+          
117
+            <el-table-column label="期末结余" align="center">
118
+              <el-table-column prop="overStock" label="数量" width="100">
119
+              </el-table-column>
120
+              <el-table-column prop="buy_price" label="进货金额" width="100">
121
+              </el-table-column>
122
+              <el-table-column prop="oveMoney" label="销售金额" width="100">
123
+              </el-table-column>
124
+            </el-table-column>
125
+
126
+          
127
+          </el-table>
128
+           <el-pagination
129
+            @size-change="handleSizeChange"
130
+            @current-change="handleCurrentChange"
131
+            :page-sizes="[10, 50, 100,200,500,1000]"
132
+            :page-size="10"
133
+            background
134
+            align="right"
135
+            style="margin-top:20px;"
136
+            layout="total, sizes, prev, pager, next, jumper"
137
+            :total="total"
138
+          >
139
+            </el-pagination>
5
      </div>
140
      </div>
141
+
142
+
143
+
144
+  
145
+
6
   </div>
146
   </div>
7
-</template>
147
+</template>
148
+<script>
149
+import { getStorehouseList,getPurchaseStockQuery } from "@/api/drug/drug"
150
+import {
151
+  getStockDrugCount
152
+} from "@/api/stock";
153
+import { uParseTime } from '@/utils/tools'
154
+export default {
155
+
156
+  data(){
157
+    return{
158
+     tableList:[],
159
+     goodList:[
160
+      {id:1,name:"全部耗材"},
161
+      {id:2,name:"库存预警"},
162
+     ],
163
+     houseList:[],
164
+     storehouse_id:0,
165
+     good_type:0,
166
+     multipleSelection: [],
167
+     signAndWeighBoxPatients: "sign-and-weigh-box-patients",
168
+     manufacturerList:[],
169
+     limit:10,
170
+     page:1,
171
+     total:0,
172
+     keyword:"",
173
+     goodTypeList:[],
174
+     start_time:"",
175
+     end_time:"",
176
+     countList:[],
177
+     outCountList:[],
178
+     autoCountList:[],
179
+     cancelCountList:[],
180
+     org_id:this.$store.getters.xt_user.org_id,
181
+     dialogVisible:false,
182
+     start_first_time:"",
183
+     end_first_time:"",
184
+     tableData:[],
185
+     good_id:0,
186
+     patientList:[],
187
+     good_name:"",
188
+     specification_name:""
189
+    }
190
+  
191
+  },
192
+  methods:{
193
+    changeStorehouseName(){
194
+
195
+    },
196
+    changeGoodTypeName(){
197
+      this.getlist()
198
+    },
199
+    getStorehouseList(){
200
+      getStorehouseList().then(response=>{
201
+         if(response.data.state == 1){
202
+           var houseList = response.data.data.list
203
+           var obj = {id:0,storehouse_name:"全部"}
204
+           this.houseList.push(obj)
205
+           for(let i=0;i<houseList.length;i++){
206
+             this.houseList.push(houseList[i])
207
+           }
208
+           this.manufacturerList = response.data.data.manufacturerList
209
+           var obj = {id:0,type_name:"全部"}
210
+           this.goodTypeList.push(obj)
211
+           var goodTypeList = response.data.data.goodTypeList
212
+           for(let i=0;i<goodTypeList.length;i++){
213
+             this.goodTypeList.push(goodTypeList[i])
214
+            }
215
+           this.patientList = response.data.data.patientList
216
+         }
217
+      })
218
+    },
219
+    getlist(){
220
+        var params = {
221
+          good_type:this.good_type,
222
+          keyword:this.keyword,
223
+          page:this.page,
224
+          limit:this.limit,
225
+          start_time:this.start_time,
226
+          end_time:this.end_time,
227
+        }
228
+      getPurchaseStockQuery(params).then(response=>{
229
+         if(response.data.state == 1){
230
+            var list = response.data.data.list
231
+            for(let i=0;i<list.length;i++){
232
+               list[i].stockIn = this.getWarehouseInfo(list[i].warehouse_info)
233
+               list[i].stockMoney = (this.getWarehouseInfo(list[i].warehouse_info) * list[i].buy_price).toFixed(2)
234
+               list[i].stockAdd = this.getWarehouseInfoOne(list[i].warehouse_info)
235
+               list[i].addStockMoney = (this.getWarehouseInfoOne(list[i].warehouse_info) *list[i].buy_price).toFixed(2)
236
+
237
+               list[i].outStock = this.getWarehouseOut(list[i].warehouse_out_info)
238
+               list[i].stockOutMoney = (this.getWarehouseOut(list[i].warehouse_out_info)*list[i].buy_price).toFixed(2)
239
+
240
+               list[i].overStock = this.getWarehouseInfo(list[i].warehouse_info)
241
+               list[i].oveMoney = (this.getWarehouseInfo(list[i].warehouse_info)*list[i].buy_price).toFixed(2)
242
+            }
243
+            this.tableList = list
244
+            this.total = response.data.data.total
245
+
246
+           this.manufacturerList = response.data.data.manufacturerList
247
+           
248
+         }
249
+      })
250
+    },
251
+    getManufacturName(id){
252
+      var manufacturer_name = ""
253
+      for(let i=0;i<this.manufacturerList.length;i++){
254
+        if(id == this.manufacturerList[i].id){
255
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
256
+        }
257
+      }
258
+      return manufacturer_name
259
+    },
260
+    handleSizeChange(val) {
261
+      this.limit = val;
262
+      this.getlist()
263
+    },
264
+    handleCurrentChange(val) {
265
+      this.page = val;
266
+      this.getlist()
267
+    },
268
+    handleSizeChangeOne(val) {
269
+      this.limitone = val;
270
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
271
+    },
272
+    handleCurrentChangeOne(val) {
273
+      this.pageone = val;
274
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
275
+    },
276
+   seach(){
277
+    this.getlist()
278
+   },
279
+   getGoodTypeName(id){
280
+     var type_name = ""
281
+     for(let i=0;i<this.goodTypeList.length;i++){
282
+       if(id == this.goodTypeList[i].id){
283
+         type_name = this.goodTypeList[i].type_name
284
+       }
285
+     }
286
+     return type_name
287
+   },
288
+   getHouseName(id){
289
+     var storehouse_name = ""
290
+     for(let i=0;i<this.houseList.length;i++){
291
+       if(id == this.houseList[i].id){
292
+         storehouse_name = this.houseList[i].storehouse_name
293
+       }
294
+     }
295
+     return storehouse_name
296
+   },
297
+   getWareInfoCount(val,storehouse_id){
298
+     var count = 0
299
+     if(val.length > 0){
300
+       for(let i=0;i<val.length;i++){
301
+         if(val[i].storehouse_id == storehouse_id){
302
+             count +=val[i].warehousing_count
303
+         }
304
+       }
305
+     }
306
+     if(count > 0){
307
+       return count
308
+     }else{
309
+       return ""
310
+     }
311
+   },
312
+   getStockDrugCount(){
313
+        var params ={
314
+           keywords: this.keywords,
315
+           start_time:this.start_time,
316
+           end_time:this.end_time,
317
+        }
318
+      getStockDrugCount(params).then(response=>{
319
+         if(response.data.state == 1){
320
+           var outlist = response.data.data.outList
321
+           this.outCountList = outlist
322
+           var autoCount = response.data.data.autoCount
323
+           this.autoCountList = autoCount
324
+           var totalCount = response.data.data.totalCount
325
+           this.cancelCountList = totalCount
326
+         }
327
+      })
328
+    },
329
+    getWareInfoCountOne(val,storehouse_id){
330
+     var count = 0
331
+     if(val.length > 0){
332
+       for(let i=0;i<val.length;i++){
333
+         if(val[i].storehouse_id == storehouse_id){
334
+             count +=val[i].stock_count
335
+         }
336
+       }
337
+     }
338
+     if(count > 0){
339
+       return count
340
+     }else{
341
+       return ""
342
+     }
343
+   },
344
+   getOutCount(id){
345
+      var count = 0
346
+      for(let i=0;i<this.outCountList.length;i++){
347
+         if(id == this.outCountList[i].good_id){
348
+           count = this.outCountList[i].count
349
+         }
350
+      }
351
+     return count
352
+   },
353
+   getAutoCount(id){
354
+     var count= 0
355
+     for(let i=0;i<this.autoCountList.length;i++){
356
+       if(id == this.autoCountList[i].good_id){
357
+         count = this.autoCountList[i].count
358
+       }
359
+     }
360
+     return count
361
+   },
362
+   getCancelCount(id){
363
+     var count = 0
364
+     for(let i=0;i<this.cancelCountList.length;i++){
365
+       if(id == this.cancelCountList[i].good_id){
366
+          count = this.cancelCountList[i].count
367
+       }
368
+     }
369
+     return count
370
+   },
371
+   getCancelCountInfo(cancel_stock_info,storehouse_id){
372
+     var count = 0 
373
+     if(cancel_stock_info.length >0){
374
+        for(let i=0;i<cancel_stock_info.length;i++){
375
+          if(storehouse_id ==  cancel_stock_info[i].storehouse_id){
376
+              count += cancel_stock_info[i].count
377
+          }
378
+        }
379
+     }
380
+     return count
381
+   },
382
+   getWareOutInfoCount(warehouse_out_info,storehouse_id){
383
+     var count = 0
384
+     if(warehouse_out_info.length > 0){
385
+       for(let i=0;i<warehouse_out_info.length;i++){
386
+         if(storehouse_id == warehouse_out_info[i].storehouse_id){
387
+            count +=warehouse_out_info[i].count
388
+         }
389
+       }
390
+     }
391
+     return count
392
+   },
393
+   getInCount(id){
394
+      var count= 0
395
+     for(let i=0;i<this.countList.length;i++){
396
+      if(id == this.countList[i].good_id){
397
+          count = this.countList[i].count
398
+      }
399
+     }
400
+     return count
401
+    },
402
+    getOutCount(id){
403
+      var count = 0
404
+      for(let i=0;i<this.outCountList.length;i++){
405
+         if(id == this.outCountList[i].good_id){
406
+           count = this.outCountList[i].count
407
+         }
408
+      }
409
+     return count
410
+   },
411
+   getAutoCount(id){
412
+     var count= 0
413
+     for(let i=0;i<this.autoCountList.length;i++){
414
+       if(id == this.autoCountList[i].good_id){
415
+         count = this.autoCountList[i].count
416
+       }
417
+     }
418
+     return count
419
+   },
420
+   getCancelCount(id){
421
+     var count = 0
422
+     for(let i=0;i<this.cancelCountList.length;i++){
423
+       if(id == this.cancelCountList[i].good_id){
424
+          count = this.cancelCountList[i].count
425
+       }
426
+     }
427
+     return count
428
+   },
429
+   getStockCount(id){
430
+     var stock_count = 0
431
+     for(let i=0;i<this.countList.length;i++){
432
+       if(id == this.countList[i].good_id){
433
+         stock_count = this.countList[i].stock_count
434
+       }
435
+     }
436
+     return stock_count
437
+   },
438
+   getWareInfo(arr){
439
+     var total = 0
440
+     if(arr.length > 0){
441
+       for(let i=0;i<arr.length;i++){
442
+         total += parseInt(arr[i].warehousing_count)
443
+       }
444
+     }else{
445
+       total = ""
446
+     }
447
+     return total
448
+   },
449
+   getOverplus(arr){
450
+     var total = 0
451
+     if(arr.length > 0){
452
+      for(let i=0;i<arr.length;i++){
453
+        total += arr[i].stock_count
454
+      }
455
+     }else{
456
+       total = ""
457
+     }
458
+     return total
459
+   },
460
+   getCancelInfo(arr){
461
+     var total = 0
462
+     if(arr.length > 0){
463
+      for(let i=0;i<arr.length;i++){
464
+        total += arr[i].count
465
+      }
466
+     }else{
467
+       total = ""
468
+     }
469
+     return total
470
+   },
471
+   getOverFlushInfo(arr){
472
+     var total = 0
473
+     if(arr.length >0){
474
+      for(let i=0;i<arr.length;i++){
475
+        total += arr[i].stock_count
476
+      }
477
+     }
478
+     return total
479
+   },
480
+  
481
+   startFirstTimeChange(){
482
+     this.getlist()
483
+   },
484
+   endEndTimeChange(){
485
+     this.getlist()
486
+   },
487
+  getTime(val) {
488
+    if(val < 0){
489
+      return ""
490
+    }
491
+   if(val == ""){
492
+     return ""
493
+   }else {
494
+    return uParseTime(val, '{y}-{m}-{d}')
495
+   }
496
+   },
497
+  getName(id){
498
+    var name = ""
499
+    for(let i=0;i<this.patientList.length;i++){
500
+      if(id == this.patientList[i].id){
501
+        name = this.patientList[i].name
502
+      }
503
+    }
504
+    return name
505
+  },
506
+  endTimeChange(){
507
+
508
+  },
509
+  startTimeChange(){
510
+
511
+  },
512
+  getWarehouseInfo(val){
513
+    var count =0 
514
+    for(let i=0;i<val.length;i++){
515
+      count +=val[i].stock_count
516
+    }
517
+    if(count > 0 ){
518
+      return count
519
+    }else{
520
+      return count
521
+    }
522
+  },
523
+  getWarehouseInfoOne(val){
524
+    var count =0 
525
+    for(let i=0;i<val.length;i++){
526
+      count +=val[i].warehousing_count
527
+    }
528
+    if(count > 0 ){
529
+      return count
530
+    }else{
531
+      return count
532
+    }
533
+  },
534
+  getWarehouseOut(val){
535
+    var count = 0
536
+    for(let i=0;i<val.length;i++){
537
+      count +=val[i].count
538
+    }
539
+    if(count >0){
540
+     return count
541
+    }else{
542
+      return count
543
+    }
544
+  }
545
+  },
546
+  created(){
547
+    this.getStorehouseList()
548
+    this.getlist()
549
+    this.getStockDrugCount()
550
+  }
551
+}
552
+</script>
553
+

+ 7 - 1
src/xt_pages/stock/stockBatchNumber.vue View File

38
               value-format="yyyy-MM-dd"
38
               value-format="yyyy-MM-dd"
39
               @change="endTimeChange"
39
               @change="endTimeChange"
40
           ></el-date-picker>
40
           ></el-date-picker>
41
-  
41
+          
42
+          
42
       </div>
43
       </div>
43
       
44
       
44
        <el-table
45
        <el-table
92
              <span v-if="scope.row.packing_price > 0"> {{scope.row.packing_price}}</span>
93
              <span v-if="scope.row.packing_price > 0"> {{scope.row.packing_price}}</span>
93
            </template>
94
            </template>
94
         </el-table-column>
95
         </el-table-column>
96
+        <!-- <el-table-column prop="drug_name" label="该批次剩余库存" align="center">
97
+           <template slot-scope="scope">
98
+             <span> {{scope.row.stock_count}}</span>
99
+           </template>
100
+        </el-table-column> -->
95
         <el-table-column prop="drug_name" label="备注" align="center">
101
         <el-table-column prop="drug_name" label="备注" align="center">
96
            <template slot-scope="scope">
102
            <template slot-scope="scope">
97
              <span>{{scope.row.remark}}</span>
103
              <span>{{scope.row.remark}}</span>

+ 4 - 2
src/xt_pages/stock/stockDamaged.vue View File

366
                   <span v-if="scope.row.inventory_type == 1">到期退货</span> 
366
                   <span v-if="scope.row.inventory_type == 1">到期退货</span> 
367
                   <span v-if="scope.row.inventory_type == 2">异常退货</span> 
367
                   <span v-if="scope.row.inventory_type == 2">异常退货</span> 
368
                   <span v-if="scope.row.inventory_type == 3">退货</span> 
368
                   <span v-if="scope.row.inventory_type == 3">退货</span> 
369
-                  <span v-if="scope.row.inventory_type == 4">人为损坏</span> 
369
+                  <span v-if="scope.row.inventory_type == 4">损坏</span> 
370
                   <span v-if="scope.row.inventory_type == 5">不计入报损分析</span> 
370
                   <span v-if="scope.row.inventory_type == 5">不计入报损分析</span> 
371
+                  <span v-if="scope.row.inventory_type == 7">有效期到期</span> 
371
                 </template>
372
                 </template>
372
               </el-table-column>
373
               </el-table-column>
373
             </el-table>
374
             </el-table>
451
               {id:1,name:"到期退货"},
452
               {id:1,name:"到期退货"},
452
               {id:2,name:"异常退货"},
453
               {id:2,name:"异常退货"},
453
               {id:3,name:"退货"},
454
               {id:3,name:"退货"},
454
-              {id:4,name:"人为损坏"},
455
+              {id:4,name:"损坏"},
455
               {id:5,name:"不计入报损分析"},
456
               {id:5,name:"不计入报损分析"},
457
+              {id:7,name:"有效期到期"},
456
             ],
458
             ],
457
             goodList:[],
459
             goodList:[],
458
             good_name:"",
460
             good_name:"",

+ 0 - 1
src/xt_pages/stock/stockQuery.vue View File

141
         </el-table-column>
141
         </el-table-column>
142
        <el-table-column label="入库数量" align="center">
142
        <el-table-column label="入库数量" align="center">
143
          <template slot-scope="scope">
143
          <template slot-scope="scope">
144
-
145
             <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
144
             <tr style="background: none" v-for="(item,index) in scope.row.warehouse_info" :key="index">
146
               <td style="border-right: none; border-inline-end: none;text-align: center">
145
               <td style="border-right: none; border-inline-end: none;text-align: center">
147
                {{getWareInfoCount(scope.row.xt_warehouse_info,item.storehouse_id)}}&nbsp;
146
                {{getWareInfoCount(scope.row.xt_warehouse_info,item.storehouse_id)}}&nbsp;

+ 60 - 10
src/xt_pages/user/components/EditGroupAdvice.vue View File

196
                   >
196
                   >
197
                 </template>
197
                 </template>
198
               </el-table-column>
198
               </el-table-column>
199
+
200
+              <el-table-column
201
+                label="推送截止日期"
202
+                min-width="80"
203
+                property="execution_frequency"
204
+                align="center"
205
+              >
206
+               <template slot-scope="scope">
207
+                 {{scope.row.push_start_time}}
208
+                </template>
209
+              </el-table-column>
199
             </el-table>
210
             </el-table>
200
           </el-col>
211
           </el-col>
201
         </el-row>
212
         </el-row>
559
               </el-checkbox-group>
570
               </el-checkbox-group>
560
             </el-form-item>
571
             </el-form-item>
561
           </el-col>
572
           </el-col>
573
+
574
+          <el-col :span="24">
575
+             <el-form-item label="推送截止日期:">
576
+                 <el-date-picker
577
+                   v-model="nameForm.push_start_time"
578
+                   type="date"
579
+                   format="yyyy-MM-dd"
580
+                   value-format="yyyy-MM-dd"
581
+                  :picker-options="pickerOptionsOne"
582
+                  placeholder="推送截止日期">
583
+                 </el-date-picker>
584
+              </el-form-item>
585
+          </el-col>
562
         </el-row>
586
         </el-row>
563
       </el-form>
587
       </el-form>
564
       <div slot="footer" class="dialog-footer">
588
       <div slot="footer" class="dialog-footer">
586
   StopDoctorAdvice
610
   StopDoctorAdvice
587
 } from "@/api/advice";
611
 } from "@/api/advice";
588
 import { getSelfMedicalList,getDrugDescByDrugName } from "@/api/drug/drug"
612
 import { getSelfMedicalList,getDrugDescByDrugName } from "@/api/drug/drug"
613
+import { uParseTime } from "@/utils/tools";
589
 export default {
614
 export default {
590
   name: "EditGroupAdvice",
615
   name: "EditGroupAdvice",
591
   data() {
616
   data() {
592
     return {
617
     return {
618
+      pickerOptionsOne: {
619
+      // 限制收货时间不让选择今天以前的
620
+      disabledDate(time) {
621
+        return time.getTime() < Date.now() - 8.64e7;
622
+      },
623
+      },
593
       weeks: [],
624
       weeks: [],
594
       editRowKey: 0,
625
       editRowKey: 0,
595
       templateFormVisible: false,
626
       templateFormVisible: false,
632
         way:0,
663
         way:0,
633
         drug_id:0,
664
         drug_id:0,
634
         src_type:"",
665
         src_type:"",
635
-        drug_name_id:0
666
+        drug_name_id:0,
667
+        push_start_time:"",
636
       },
668
       },
637
 
669
 
638
       drugOptions: [],
670
       drugOptions: [],
898
                 groupno: _this.groupForm.groupno,
930
                 groupno: _this.groupForm.groupno,
899
                 frequency_type: _this.nameForm.frequency_type,
931
                 frequency_type: _this.nameForm.frequency_type,
900
                 day_count: _this.nameForm.day_count.toString(),
932
                 day_count: _this.nameForm.day_count.toString(),
901
-                week_days: this.weeks
902
-                  .filter(function(s) {
933
+                week_days: this.weeks.filter(function(s) {
903
                     return s && s.trim();
934
                     return s && s.trim();
904
-                  })
905
-                  .join(",")
935
+                  }).join(","),
936
+                push_start_time: _this.nameForm.push_start_time,
937
+                
906
               };
938
               };
907
             } else {
939
             } else {
908
               submitForm = {
940
               submitForm = {
931
                 frequency_type: 0,
963
                 frequency_type: 0,
932
                 day_count: "0",
964
                 day_count: "0",
933
                 week_days: "",
965
                 week_days: "",
966
+                push_start_time:_this.nameForm.push_start_time
934
 
967
 
935
               };
968
               };
936
             }
969
             }
991
                     _this.adviceTableData[index].frequency_type = advice.frequency_type;
1024
                     _this.adviceTableData[index].frequency_type = advice.frequency_type;
992
                     _this.adviceTableData[index].day_count = advice.day_count;
1025
                     _this.adviceTableData[index].day_count = advice.day_count;
993
                     _this.adviceTableData[index].week_day = advice.week_day;
1026
                     _this.adviceTableData[index].week_day = advice.week_day;
994
-                    _this.adviceTableData[index].way = advice.way,
995
-                    _this.adviceTableData[index].drug_id = advice.drug_id,
1027
+                    _this.adviceTableData[index].way = advice.way
1028
+                    _this.adviceTableData[index].drug_id = advice.drug_id
996
                     _this.adviceTableData[index].drug_name_id = advice.drug_name_id
1029
                     _this.adviceTableData[index].drug_name_id = advice.drug_name_id
1030
+                    _this.adviceTableData[index].push_start_time = advice.push_start_time
997
                     break;
1031
                     break;
998
                   }
1032
                   }
999
                 }
1033
                 }
1024
                           _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way
1058
                           _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way
1025
                           _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id
1059
                           _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id
1026
                           _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id
1060
                           _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id
1061
+                          _this.groupForm.adviceNames[index].children[j].push_start_time = _this.nameForm.push_start_time
1027
                           _this.$set(
1062
                           _this.$set(
1028
                             _this.groupForm.adviceNames[index].children,
1063
                             _this.groupForm.adviceNames[index].children,
1029
                             j,
1064
                             j,
1053
                       _this.groupForm.adviceNames[index].way = _this.nameForm.way
1088
                       _this.groupForm.adviceNames[index].way = _this.nameForm.way
1054
                       _this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count;
1089
                       _this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count;
1055
                       _this.groupForm.adviceNames[index].week_day = _this.weeks.join(",");
1090
                       _this.groupForm.adviceNames[index].week_day = _this.weeks.join(",");
1091
+                       _this.groupForm.adviceNames[index].push_start_time = _this.nameForm.push_start_time;
1056
                       console.log(_this.weeks);
1092
                       console.log(_this.weeks);
1057
                       _this.$set(
1093
                       _this.$set(
1058
                         _this.groupForm.adviceNames,
1094
                         _this.groupForm.adviceNames,
1091
                 remark: _this.groupForm.remark,
1127
                 remark: _this.groupForm.remark,
1092
                 parent_id: _this.groupSelectRow.id,
1128
                 parent_id: _this.groupSelectRow.id,
1093
                 groupno: _this.groupForm.groupno,
1129
                 groupno: _this.groupForm.groupno,
1094
-
1130
+                push_start_time:_this.groupForm.push_start_time
1095
               };
1131
               };
1096
 
1132
 
1097
               let mode = "";
1133
               let mode = "";
1204
                     drug_id:_this.nameForm.drug_id,
1240
                     drug_id:_this.nameForm.drug_id,
1205
                     way:_this.nameForm.way,
1241
                     way:_this.nameForm.way,
1206
                     drug_name_id:_this.nameForm.drug_name_id,
1242
                     drug_name_id:_this.nameForm.drug_name_id,
1243
+                    push_start_time:_this.nameForm.push_start_time,
1207
                     isEdit: 0,
1244
                     isEdit: 0,
1208
                     id: 0,
1245
                     id: 0,
1209
                     children: [],
1246
                     children: [],
1403
         index: 0,
1440
         index: 0,
1404
         children: [],
1441
         children: [],
1405
         parent_row: this.groupSelectRow.row_key,
1442
         parent_row: this.groupSelectRow.row_key,
1406
-        id: 0
1443
+        id: 0,
1444
+        push_start_time:"",
1407
       };
1445
       };
1408
       this.isChild = true;
1446
       this.isChild = true;
1409
       this.nameFormVisible = true;
1447
       this.nameFormVisible = true;
1445
           frequency_type: this.groupSelectRow.frequency_type,
1483
           frequency_type: this.groupSelectRow.frequency_type,
1446
           drug_id:0,
1484
           drug_id:0,
1447
           drug_name_id:0,
1485
           drug_name_id:0,
1486
+          push_start_time:this.groupSelectRow.push_start_time,
1448
           way:0,
1487
           way:0,
1449
         };
1488
         };
1450
 
1489
 
1476
           parent_row: 0,
1515
           parent_row: 0,
1477
           day_count: "",
1516
           day_count: "",
1478
           week_days: "",
1517
           week_days: "",
1479
-          frequency_type: 0
1518
+          frequency_type: 0,
1519
+          push_start_time:"",
1480
         };
1520
         };
1481
         this.nameFormTitle = "新增医嘱内容";
1521
         this.nameFormTitle = "新增医嘱内容";
1482
       }
1522
       }
2485
 
2525
 
2486
         cb(results);
2526
         cb(results);
2487
       },
2527
       },
2528
+      getTime(val) {
2529
+         if(val < 0){
2530
+           return ""
2531
+         }
2532
+         if(val == ""){
2533
+          return ""
2534
+         }else {
2535
+          return uParseTime(val, '{y}-{m}-{d}')
2536
+         }
2537
+      },
2488
   },
2538
   },
2489
   watch: {
2539
   watch: {
2490
     rowKey: function() {
2540
     rowKey: function() {

+ 37 - 8
src/xt_pages/user/components/PatientDetail.vue View File

346
               </el-form-item>
346
               </el-form-item>
347
             </el-col>
347
             </el-col>
348
 
348
 
349
+            <el-col :span="24">
350
+                <el-form-item label="诊疗计划 : " prop="diagnose">
351
+                  <el-input
352
+                    type="textarea"
353
+                    :rows="3"
354
+                    v-model="form.treatment_plan"
355
+                    resize="none"
356
+                    placeholder
357
+                    readonly
358
+                  ></el-input>
359
+                </el-form-item>
360
+             </el-col>
361
+
349
             <el-col :span="8">
362
             <el-col :span="8">
350
               <el-form-item label="民族 : " prop="nation">
363
               <el-form-item label="民族 : " prop="nation">
351
                 <el-input
364
                 <el-input
867
                     </div>
880
                     </div>
868
                   </td>
881
                   </td>
869
                   <td valign="top">
882
                   <td valign="top">
870
-                    <div class="td_proj_title">备用电话</div>
883
+                    <div class="td_proj_title">家属电话</div>
871
                   </td>
884
                   </td>
872
                   <td valign="top">
885
                   <td valign="top">
873
                     <div class="td_proj_content td_align_left">
886
                     <div class="td_proj_content td_align_left">
903
                     ></div>
916
                     ></div>
904
                   </td>
917
                   </td>
905
                 </tr>
918
                 </tr>
919
+                
906
                 <tr>
920
                 <tr>
907
                   <td>
921
                   <td>
908
                     <div class="td_proj_title">既<br />往<br />史</div>
922
                     <div class="td_proj_title">既<br />往<br />史</div>
914
                     ></div>
928
                     ></div>
915
                   </td>
929
                   </td>
916
                 </tr>
930
                 </tr>
931
+                <tr>
932
+                  <td>
933
+                    <div class="td_proj_title">传<br />染<br />病</div>
934
+                  </td>
935
+                  <td colspan="7">
936
+                    <div class="td_proj_content td_align_left">
937
+                      {{ patientPrint.contagions }}
938
+                    </div>
939
+                  </td>
940
+                </tr>
941
+              
917
                 <tr>
942
                 <tr>
918
                   <td colspan="8"><div class="td_proj_title">体格检查</div></td>
943
                   <td colspan="8"><div class="td_proj_title">体格检查</div></td>
919
                 </tr>
944
                 </tr>
942
                     ></div>
967
                     ></div>
943
                   </td>
968
                   </td>
944
                 </tr>
969
                 </tr>
970
+             
945
                 <tr>
971
                 <tr>
946
                   <td>
972
                   <td>
947
-                    <div class="td_proj_title">传<br />染<br />病</div>
973
+                    <div class="td_proj_title">诊<br />断</div>
948
                   </td>
974
                   </td>
949
                   <td colspan="7">
975
                   <td colspan="7">
950
-                    <div class="td_proj_content td_align_left">
951
-                      {{ patientPrint.contagions }}
952
-                    </div>
976
+                    <div
977
+                      class="td_proj_content td_align_left"
978
+                      v-html="patientPrint.diagnose"
979
+                    ></div>
953
                   </td>
980
                   </td>
954
                 </tr>
981
                 </tr>
955
                 <tr>
982
                 <tr>
956
                   <td>
983
                   <td>
957
-                    <div class="td_proj_title">诊<br /></div>
984
+                    <div class="td_proj_title">诊<br />疗<br />计<br />划</div>
958
                   </td>
985
                   </td>
959
                   <td colspan="7">
986
                   <td colspan="7">
960
                     <div
987
                     <div
961
                       class="td_proj_content td_align_left"
988
                       class="td_proj_content td_align_left"
962
-                      v-html="patientPrint.diagnose"
989
+                      v-html="patientPrint.treatment_plan"
963
                     ></div>
990
                     ></div>
964
                   </td>
991
                   </td>
965
                 </tr>
992
                 </tr>
1096
   sch_remark:"",
1123
   sch_remark:"",
1097
   org_id:0,
1124
   org_id:0,
1098
   troble_shoot:"",
1125
   troble_shoot:"",
1099
-  zb_patient_id:""
1126
+  zb_patient_id:"",
1127
+  treatment_plan:"",
1100
 };
1128
 };
1101
 
1129
 
1102
 export default {
1130
 export default {
1288
             // this.form.record_date = patietInfo.is_infectious
1316
             // this.form.record_date = patietInfo.is_infectious
1289
             this.form.response_result = patietInfo.response_result;
1317
             this.form.response_result = patietInfo.response_result;
1290
             this.form.remind_cycle = patietInfo.remind_cycle;
1318
             this.form.remind_cycle = patietInfo.remind_cycle;
1319
+            this.form.treatment_plan = patietInfo.treatment_plan
1291
             if(patietInfo.is_infectious == 1){
1320
             if(patietInfo.is_infectious == 1){
1292
                this.form.remind_cycle = 0
1321
                this.form.remind_cycle = 0
1293
 
1322
 

+ 14 - 1
src/xt_pages/user/components/PatientForm.vue View File

413
                 </el-form-item>
413
                 </el-form-item>
414
               </el-col>
414
               </el-col>
415
 
415
 
416
+              <el-col :span="24">
417
+                <el-form-item label="诊疗计划 : " prop="diagnose">
418
+                  <el-input
419
+                    type="textarea"
420
+                    :rows="3"
421
+                    v-model="form.treatment_plan"
422
+                    resize="none"
423
+                    placeholder
424
+                  ></el-input>
425
+                </el-form-item>
426
+              </el-col>
427
+
416
               <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
428
               <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
417
                 <el-form-item label="民族 : " prop="nation">
429
                 <el-form-item label="民族 : " prop="nation">
418
                   <el-input v-model="form.nation" maxlength="30"></el-input>
430
                   <el-input v-model="form.nation" maxlength="30"></el-input>
1155
   sbp: "",
1167
   sbp: "",
1156
   dbp: "",
1168
   dbp: "",
1157
   showOne:true,
1169
   showOne:true,
1170
+  treatment_plan:"",
1158
 };
1171
 };
1159
 
1172
 
1160
 export default {
1173
 export default {
1665
             this.form.work = patietInfo.work_unit;
1678
             this.form.work = patietInfo.work_unit;
1666
             this.form.unit_address = patietInfo.unit_address;
1679
             this.form.unit_address = patietInfo.unit_address;
1667
             this.form.user_sys_before_count = patietInfo.user_sys_before_count;
1680
             this.form.user_sys_before_count = patietInfo.user_sys_before_count;
1668
-
1681
+            this.form.treatment_plan = patietInfo.treatment_plan
1669
             if (patietInfo.profession > 0) {
1682
             if (patietInfo.profession > 0) {
1670
               this.form.profession = patietInfo.profession;
1683
               this.form.profession = patietInfo.profession;
1671
             }
1684
             }

+ 108 - 36
src/xt_pages/user/doctorAdvice.vue View File

426
           </template>
426
           </template>
427
         </el-table-column>
427
         </el-table-column>
428
 
428
 
429
+        <el-table-column
430
+          label="推送截止日期"
431
+          width="180"
432
+          align="center"
433
+        >
434
+          <template slot-scope="scope">
435
+            <span v-if="scope.row.push_start_time >0">{{scope.row.push_start_time | parseTime("{y}-{m}-{d}")}}</span>
436
+          </template>
437
+        </el-table-column>
438
+
429
         <!-- <template v-if="adviceType==3">
439
         <!-- <template v-if="adviceType==3">
430
                     <el-table-column key="advice_doctor_3" label="开嘱医生" min-width="80"  property="advice_doctor" align="center">
440
                     <el-table-column key="advice_doctor_3" label="开嘱医生" min-width="80"  property="advice_doctor" align="center">
431
                         <template slot-scope="scope">
441
                         <template slot-scope="scope">
760
                     >
770
                     >
761
                   </template>
771
                   </template>
762
                 </el-table-column>
772
                 </el-table-column>
773
+                <el-table-column 
774
+                 label="推送截止日期"
775
+                  min-width="80"
776
+                  align="center"
777
+                >
778
+                <template slot-scope="scope">
779
+                   {{scope.row.push_start_time}}
780
+                </template>
781
+                
782
+                </el-table-column>
763
               </el-table>
783
               </el-table>
764
             </el-col>
784
             </el-col>
765
           </el-row>
785
           </el-row>
967
           ref="nameForm"
987
           ref="nameForm"
968
           :rules="nameRules"
988
           :rules="nameRules"
969
           :model="nameForm"
989
           :model="nameForm"
970
-          label-width="90px"
990
+          label-width="120px"
971
         >
991
         >
972
           <el-row>
992
           <el-row>
973
             <el-col :span="10">
993
             <el-col :span="10">
1130
               </el-form-item>
1150
               </el-form-item>
1131
             </el-col>
1151
             </el-col>
1132
 
1152
 
1153
+           
1154
+
1133
             <el-col :span="12" v-if="nameForm.frequency_type == 2">
1155
             <el-col :span="12" v-if="nameForm.frequency_type == 2">
1134
               <el-form-item prop="day_count">
1156
               <el-form-item prop="day_count">
1135
                 <el-input
1157
                 <el-input
1153
                 </el-checkbox-group>
1175
                 </el-checkbox-group>
1154
               </el-form-item>
1176
               </el-form-item>
1155
             </el-col>
1177
             </el-col>
1178
+
1179
+            <el-col :span="24">
1180
+               <el-form-item label="推送截止日期:">
1181
+                 <el-date-picker
1182
+                   v-model="nameForm.push_start_time"
1183
+                   type="date"
1184
+                   format="yyyy-MM-dd"
1185
+                   value-format="yyyy-MM-dd"
1186
+                  :picker-options="pickerOptionsOne"
1187
+                  placeholder="推送截止日期">
1188
+                 </el-date-picker>
1189
+              </el-form-item>
1190
+            </el-col>
1156
           </el-row>
1191
           </el-row>
1157
         </el-form>
1192
         </el-form>
1158
         <div slot="footer" class="dialog-footer">
1193
         <div slot="footer" class="dialog-footer">
1196
           ref="adviceForm"
1231
           ref="adviceForm"
1197
           :rules="adviceRules"
1232
           :rules="adviceRules"
1198
           :model="adviceForm"
1233
           :model="adviceForm"
1199
-          label-width="90px"
1234
+          label-width="120px"
1200
         >
1235
         >
1201
           <el-row>
1236
           <el-row>
1202
             <el-col :span="12">
1237
             <el-col :span="12">
1396
                 </el-select>
1431
                 </el-select>
1397
               </el-form-item>
1432
               </el-form-item>
1398
             </el-col>
1433
             </el-col>
1434
+
1435
+             <el-col :span="24">
1436
+               <el-form-item label="推送截止日期:">
1437
+                 <el-date-picker
1438
+                   v-model="adviceForm.push_start_time"
1439
+                   type="date"
1440
+                   format="yyyy-MM-dd"
1441
+                   value-format="yyyy-MM-dd"
1442
+                  :picker-options="pickerOptionsOne"
1443
+                  placeholder="推送截止日期">
1444
+                 </el-date-picker>
1445
+              </el-form-item>
1446
+            </el-col>
1399
           </el-row>
1447
           </el-row>
1448
+
1449
+          
1400
           <el-form-item label="备注 :">
1450
           <el-form-item label="备注 :">
1401
             <el-input type="textarea" v-model="adviceForm.remark"></el-input>
1451
             <el-input type="textarea" v-model="adviceForm.remark"></el-input>
1402
           </el-form-item>
1452
           </el-form-item>
1404
           <el-form-item label="开嘱医生 :">
1454
           <el-form-item label="开嘱医生 :">
1405
             <span>{{ adminusername }} </span>
1455
             <span>{{ adminusername }} </span>
1406
           </el-form-item>
1456
           </el-form-item>
1457
+
1458
+        
1407
         </el-form>
1459
         </el-form>
1408
         <div slot="footer" class="dialog-footer">
1460
         <div slot="footer" class="dialog-footer">
1409
           <template v-if="isEdit">
1461
           <template v-if="isEdit">
1983
 
2035
 
1984
   data() {
2036
   data() {
1985
     return {
2037
     return {
2038
+      pickerOptionsOne: {
2039
+        // 限制收货时间不让选择今天以前的
2040
+        disabledDate(time) {
2041
+          return time.getTime() < Date.now() - 8.64e7;
2042
+        },
2043
+      },
1986
       weeks: [],
2044
       weeks: [],
1987
       is_open_remind: "",
2045
       is_open_remind: "",
1988
       checkList: [],
2046
       checkList: [],
2044
       adviceTypeArr: [
2102
       adviceTypeArr: [
2045
         { value: 0, label: "全部" },
2103
         { value: 0, label: "全部" },
2046
         { value: 1, label: "长期" },
2104
         { value: 1, label: "长期" },
2047
-        { value: 3, label: "临时" },
2105
+        { value: 2, label: "临时" },
2048
         { value: 4, label: "普通医嘱" },
2106
         { value: 4, label: "普通医嘱" },
2049
       ],
2107
       ],
2050
       adviceTypeOptions: [
2108
       adviceTypeOptions: [
2088
         drug_id:0,
2146
         drug_id:0,
2089
         way:0,
2147
         way:0,
2090
         drug_name_id:0,
2148
         drug_name_id:0,
2149
+        push_start_time:"",
2091
       },
2150
       },
2092
       nameForm: {
2151
       nameForm: {
2093
         advice_name: "",
2152
         advice_name: "",
2104
         isEdit: 0,
2163
         isEdit: 0,
2105
         index: 0,
2164
         index: 0,
2106
         id: 0,
2165
         id: 0,
2107
-        children: []
2166
+        children: [],
2167
+        push_start_time:"",
2108
       },
2168
       },
2109
       groupForm: {
2169
       groupForm: {
2110
         day_count: "",
2170
         day_count: "",
2194
       drug_id: 0,
2254
       drug_id: 0,
2195
       src_type:"",
2255
       src_type:"",
2196
       org_id:0,
2256
       org_id:0,
2257
+     
2197
     };
2258
     };
2198
   },
2259
   },
2199
   methods: {
2260
   methods: {
2266
               this.dialogFormVisible = false;
2327
               this.dialogFormVisible = false;
2267
               this.resetForm(formName);
2328
               this.resetForm(formName);
2268
               var advice = response.data.data.advice;
2329
               var advice = response.data.data.advice;
2330
+              
2269
               this.adviceTableData[this.currentIndex].drug_spec =
2331
               this.adviceTableData[this.currentIndex].drug_spec =
2270
                 advice.drug_spec;
2332
                 advice.drug_spec;
2271
               this.adviceTableData[this.currentIndex].drug_spec_unit =
2333
               this.adviceTableData[this.currentIndex].drug_spec_unit =
2291
               this.adviceTableData[this.currentIndex].advice_doctor =
2353
               this.adviceTableData[this.currentIndex].advice_doctor =
2292
                 advice.advice_doctor;
2354
                 advice.advice_doctor;
2293
               this.adviceTableData[this.currentIndex].remark = advice.remark;
2355
               this.adviceTableData[this.currentIndex].remark = advice.remark;
2356
+               this.adviceTableData[this.currentIndex].push_start_time = advice.push_start_time;
2294
               this.currentIndex = -1;
2357
               this.currentIndex = -1;
2295
               return false;
2358
               return false;
2296
             }
2359
             }
3005
         doctor: groups[0].advice_doctor,
3068
         doctor: groups[0].advice_doctor,
3006
 
3069
 
3007
         remark: groups[0].remark,
3070
         remark: groups[0].remark,
3008
-        groupno: groupno
3071
+        groupno: groupno,
3072
+        
3009
       };
3073
       };
3010
       console.log("到了",groups[0]);
3074
       console.log("到了",groups[0]);
3011
 
3075
 
3049
           children: [],
3113
           children: [],
3050
           parent_row: 0,
3114
           parent_row: 0,
3051
           row_key: this.rowKey,
3115
           row_key: this.rowKey,
3052
-          table: []
3116
+          table: [],
3117
+          push_start_time:uParseTime(groups[index].push_start_time, "{y}-{m}-{d}")
3053
         };
3118
         };
3054
 
3119
 
3055
         if (item.id in childMap) {
3120
         if (item.id in childMap) {
3076
               id: childMap[item.id][key].id,
3141
               id: childMap[item.id][key].id,
3077
               children: [],
3142
               children: [],
3078
               parent_row: item.row_key,
3143
               parent_row: item.row_key,
3079
-              row_key: this.rowKey
3144
+              row_key: this.rowKey,
3145
+              push_start_time:uParseTime(childMap[item.id][key].push_start_time, "{y}-{m}-{d}")
3080
             };
3146
             };
3081
             item.children.push(child);
3147
             item.children.push(child);
3082
           }
3148
           }
3132
         advice_doctor: row.advice_doctor,
3198
         advice_doctor: row.advice_doctor,
3133
         remark: "",
3199
         remark: "",
3134
         parent_id: row.parent_id > 0 ? row.parent_id : row.id,
3200
         parent_id: row.parent_id > 0 ? row.parent_id : row.id,
3135
-        drug_id:""
3201
+        drug_id:"",
3202
+        push_start_time:"",
3136
       };
3203
       };
3137
       this.dialogFormVisible = true;
3204
       this.dialogFormVisible = true;
3138
     },
3205
     },
3386
         single_dose: row.single_dose != 0 ? row.single_dose : "",
3453
         single_dose: row.single_dose != 0 ? row.single_dose : "",
3387
         single_dose_unit: row.single_dose_unit,
3454
         single_dose_unit: row.single_dose_unit,
3388
         prescribing_number:
3455
         prescribing_number:
3389
-          row.prescribing_number != 0 ? row.prescribing_number : "",
3456
+        row.prescribing_number != 0 ? row.prescribing_number : "",
3390
         prescribing_number_unit: row.prescribing_number_unit,
3457
         prescribing_number_unit: row.prescribing_number_unit,
3391
         delivery_way: row.delivery_way,
3458
         delivery_way: row.delivery_way,
3392
         execution_frequency: row.execution_frequency,
3459
         execution_frequency: row.execution_frequency,
3393
         advice_doctor: row.advice_doctor,
3460
         advice_doctor: row.advice_doctor,
3394
         remark: row.remark,
3461
         remark: row.remark,
3395
         id: row.id,
3462
         id: row.id,
3396
-        parent_id: row.parent_id
3463
+        parent_id: row.parent_id,
3464
+        push_start_time:uParseTime(row.push_start_time, "{y}-{m}-{d}"),
3397
       };
3465
       };
3398
     },
3466
     },
3399
     getList() {
3467
     getList() {
3473
     },
3541
     },
3474
 
3542
 
3475
     selectAdvice(selection, row) {
3543
     selectAdvice(selection, row) {
3476
-      console.log("row322232322323",row)
3544
+      console.log("row322232322323",this.adviceType)
3477
       if (this.adviceType != 3) {
3545
       if (this.adviceType != 3) {
3478
         this.lstableData = [];
3546
         this.lstableData = [];
3479
       } else if (this.adviceType != 1) {
3547
       } else if (this.adviceType != 1) {
3531
           });
3599
           });
3532
         }, 1);
3600
         }, 1);
3533
       } else if (this.adviceType == 3 || this.adviceType == 2 || this.adviceType == 4) {
3601
       } else if (this.adviceType == 3 || this.adviceType == 2 || this.adviceType == 4) {
3602
+        console.log("lstableData",this.lstableData)
3534
         if (this.lstableData.length == 0) {
3603
         if (this.lstableData.length == 0) {
3535
           this.$message.error("请勾选需要打印的医嘱!");
3604
           this.$message.error("请勾选需要打印的医嘱!");
3536
           return false;
3605
           return false;
4099
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
4168
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
4100
                       _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
4169
                       _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
4101
                       _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
4170
                       _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
4171
+                       _this.groupForm.adviceNames[index].children[j].push_start_time = _this.nameForm.push_start_time;
4102
 
4172
 
4103
                       _this.$set(
4173
                       _this.$set(
4104
                         _this.groupForm.adviceNames[index].children,
4174
                         _this.groupForm.adviceNames[index].children,
4113
               }
4183
               }
4114
             } else {
4184
             } else {
4115
               for (let index = 0; index < ale; index++) {
4185
               for (let index = 0; index < ale; index++) {
4116
-                if (
4117
-                  _this.groupSelectRow.row_key ==
4118
-                  _this.groupForm.adviceNames[index].row_key
4119
-                ) {
4186
+                if (_this.groupSelectRow.row_key == _this.groupForm.adviceNames[index].row_key) {
4120
                   _this.groupForm.adviceNames[index].advice_name =_this.nameForm.advice_name;
4187
                   _this.groupForm.adviceNames[index].advice_name =_this.nameForm.advice_name;
4121
-                  _this.groupForm.adviceNames[index].advice_desc =
4122
-                    _this.nameForm.advice_desc;
4123
-
4124
-                  _this.groupForm.adviceNames[index].single_dose =
4125
-                    "" + _this.nameForm.single_dose;
4126
-                  _this.groupForm.adviceNames[index].single_dose_unit =
4127
-                    _this.nameForm.single_dose_unit;
4128
-                  _this.groupForm.adviceNames[index].drug_spec =
4129
-                    "" + _this.nameForm.drug_spec;
4130
-                  _this.groupForm.adviceNames[index].drug_spec_unit =
4131
-                    _this.nameForm.drug_spec_unit;
4132
-                  _this.groupForm.adviceNames[index].prescribing_number =
4133
-                    "" + _this.nameForm.prescribing_number;
4134
-                  _this.groupForm.adviceNames[index].prescribing_number_unit =
4135
-                    _this.nameForm.prescribing_number_unit;
4136
-                  _this.groupForm.adviceNames[index].delivery_way =
4137
-                    _this.nameForm.delivery_way;
4138
-                  _this.groupForm.adviceNames[index].execution_frequency =
4139
-                    _this.nameForm.execution_frequency;
4140
-
4188
+                  _this.groupForm.adviceNames[index].advice_desc =_this.nameForm.advice_desc;
4189
+
4190
+                  _this.groupForm.adviceNames[index].single_dose = "" + _this.nameForm.single_dose;
4191
+                  _this.groupForm.adviceNames[index].single_dose_unit =_this.nameForm.single_dose_unit;
4192
+                  _this.groupForm.adviceNames[index].drug_spec = "" + _this.nameForm.drug_spec;
4193
+                  _this.groupForm.adviceNames[index].drug_spec_unit =_this.nameForm.drug_spec_unit;
4194
+                  _this.groupForm.adviceNames[index].prescribing_number = "" + _this.nameForm.prescribing_number;
4195
+                  _this.groupForm.adviceNames[index].prescribing_number_unit = _this.nameForm.prescribing_number_unit;
4196
+                  _this.groupForm.adviceNames[index].delivery_way = _this.nameForm.delivery_way;
4197
+                  _this.groupForm.adviceNames[index].execution_frequency = _this.nameForm.execution_frequency;
4198
+                  _this.groupForm.adviceNames[index].push_start_time = _this.nameForm.push_start_time
4141
                   if (_this.nameForm.frequency_type == 1) {
4199
                   if (_this.nameForm.frequency_type == 1) {
4142
                     _this.groupForm.adviceNames[index].frequency_type =
4200
                     _this.groupForm.adviceNames[index].frequency_type =
4143
                       _this.nameForm.frequency_type;
4201
                       _this.nameForm.frequency_type;
4377
     },
4435
     },
4378
     // 获取勾选中的行
4436
     // 获取勾选中的行
4379
     getPrintInfo(ids) {
4437
     getPrintInfo(ids) {
4438
+      console.log("ids",ids)
4380
       console.log("23332332323232",this.adviceType,"33333333",this.stopType)
4439
       console.log("23332332323232",this.adviceType,"33333333",this.stopType)
4381
 
4440
 
4382
       getPrintInfo({ids:ids},this.adviceType,this.stopType).then(response => {
4441
       getPrintInfo({ids:ids},this.adviceType,this.stopType).then(response => {
4655
         this.nameForm.drug_id = tmp.id
4714
         this.nameForm.drug_id = tmp.id
4656
         console.log("isiisisthis.adviceForm",this.adviceForm)
4715
         console.log("isiisisthis.adviceForm",this.adviceForm)
4657
         this.adviceForm.drug_id = tmp.id
4716
         this.adviceForm.drug_id = tmp.id
4658
-      }
4717
+      },
4718
+      getTime(val) {
4719
+         if(val < 0){
4720
+           return ""
4721
+         }
4722
+         if(val == ""){
4723
+          return ""
4724
+         }else {
4725
+          return uParseTime(val, '{y}-{m}-{d}')
4726
+         }
4727
+      },
4659
   },
4728
   },
4660
   watch: {
4729
   watch: {
4661
     adviceTableData: function() {
4730
     adviceTableData: function() {
4669
       const group = [];
4738
       const group = [];
4670
       const grouptwo = [];
4739
       const grouptwo = [];
4671
       const ids = [];
4740
       const ids = [];
4741
+      console.log("multipleSelection",this.multipleSelection)
4672
       for (const i in this.multipleSelection) {
4742
       for (const i in this.multipleSelection) {
4673
         arr.push(this.multipleSelection[i]);
4743
         arr.push(this.multipleSelection[i]);
4674
         group.push(this.multipleSelection[i].groupno);
4744
         group.push(this.multipleSelection[i].groupno);
4745
+       
4675
       }
4746
       }
4676
       grouptwo.push(this.getdata(group));
4747
       grouptwo.push(this.getdata(group));
4677
       // console.log('组号', group)
4748
       // console.log('组号', group)
4748
 </style>
4819
 </style>
4749
 
4820
 
4750
 <style rel="stylesheet/scss" lang="scss" scoped>
4821
 <style rel="stylesheet/scss" lang="scss" scoped>
4822
+
4751
 .printForm {
4823
 .printForm {
4752
   width: 960px;
4824
   width: 960px;
4753
 }
4825
 }