Parcourir la source

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

XMLWAN il y a 2 ans
Parent
révision
62cae08e3b

+ 29 - 7
src/xt_pages/Pharmacy/DispensingDetails.vue Voir le fichier

@@ -15,7 +15,7 @@
15 15
         <div>
16 16
           <el-input
17 17
             size="small"
18
-            style="width: 200px; margin-left: 10px"
18
+            style="width: 200px;margin-right: 20px;"
19 19
             class="filter-item"
20 20
             v-model="keyword"
21 21
             placeholder="请输入患者姓名"
@@ -54,6 +54,7 @@
54 54
             class="filter-item"
55 55
             type="primary"
56 56
             icon="el-icon-search"
57
+            style="margin-left: 20px;"
57 58
             @click="query"
58 59
             >查询</el-button
59 60
           >
@@ -65,30 +66,30 @@
65 66
           backgroundColor: 'rgb(245, 247, 250)',
66 67
           color: '#606266',
67 68
         }"
68
-        style="width: 1651px"
69
+        style="width: 100%"
69 70
         :data="tableList"
70 71
         :class="signAndWeighBoxPatients"
71 72
         border
72 73
       >
73
-        <el-table-column type="index" label="序号" align="center" width="250">
74
+        <el-table-column type="index" label="序号" align="center" width="100">
74 75
         </el-table-column>
75
-        <el-table-column label="患者名称" align="center" width="300">
76
+        <el-table-column label="患者名称" align="center">
76 77
           <template slot-scope="scope">
77 78
             <span>{{scope.row.Name  ? scope.row.Name  : ""}}</span>
78 79
           </template>
79 80
         </el-table-column>
80 81
 
81
-        <el-table-column label="开立医生" align="center" width="300">
82
+        <el-table-column label="开立医生" align="center">
82 83
           <template slot-scope="scope">
83 84
             <span>{{scope.row.DoctorName  ? scope.row.DoctorName  : ""}}</span>
84 85
           </template>
85 86
         </el-table-column>
86
-        <el-table-column label="发药时间" align="center" width="400">
87
+        <el-table-column label="发药时间" align="center">
87 88
           <template slot-scope="scope">
88 89
             <span>{{scope.row.RecordDate  ? scope.row.RecordDate  : ""}}</span>
89 90
           </template>
90 91
         </el-table-column>
91
-        <el-table-column label="操作" align="center" width="400">
92
+        <el-table-column label="操作" align="center">
92 93
           <template slot-scope="scope">
93 94
             <el-button type="primary" @click="views(scope.row)">查看</el-button>
94 95
           </template>
@@ -211,4 +212,25 @@ export default {
211 212
 </script>
212 213
 
213 214
 <style rel="stylesheet/css" lang="scss" scoped>
215
+
216
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
217
+  overflow: auto;
218
+}
219
+/deep/ .gutter {
220
+  width: 15px !important;
221
+  display: inline-block !important;
222
+}
223
+/deep/ .el-table__fixed-right-patch {
224
+  width: 15px !important;
225
+}
226
+
227
+/deep/ .el-table__fixed-right {
228
+  bottom: 0 !important;
229
+  left: auto;
230
+  right: 0;
231
+}
232
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
233
+  width: 15px !important;
234
+  height: 15px !important;
235
+}
214 236
 </style>

+ 30 - 11
src/xt_pages/Pharmacy/DrugDispensing.vue Voir le fichier

@@ -118,7 +118,7 @@
118 118
              v-if="state == 1"
119 119
           >
120 120
             >
121
-            <el-table-column type="selection" width="55"> </el-table-column>
121
+            <el-table-column type="selection" width="55" align="center"> </el-table-column>
122 122
             <el-table-column type="index" label="序号" width="120" align="center">
123 123
               <template slot-scope="scope">
124 124
                 {{scope.$index + 1}}
@@ -217,7 +217,7 @@
217 217
 
218 218
 
219 219
         </div>
220
-        <div style="margin-top:13px;">领药人:
220
+        <div style="margin-top:12px;" v-if="state == 1">领药人:
221 221
           <el-select v-model="admin_user_id" placeholder="请选择">
222 222
             <el-option
223 223
               v-for="item in doctorList"
@@ -229,21 +229,19 @@
229 229
         </div>
230 230
       </div>
231 231
 
232
-      <el-dialog
233
-        title="设置"
234
-        :visible.sync="dialogVisible"
235
-        width="30%">
236
-        <span>请选择药品是否要通过药房管理出库</span>
237
-        <span>
232
+      <el-dialog title="设置" :visible.sync="dialogVisible" width="30%">
233
+        <span style="font-size: 17px">请选择药品是否要通过药房管理出库</span>
234
+        <span style="display: block; padding: 18px 25px">
238 235
           <el-radio v-model="is_open" label="1">是</el-radio>
239 236
           <el-radio v-model="is_open" label="2">否</el-radio>
240 237
         </span>
241
-        <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>
242 240
           若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
243
-        </span>
241
+        </div>
244 242
         <span slot="footer" class="dialog-footer">
245 243
           <el-button @click="dialogVisible = false">取 消</el-button>
246
-          <el-button type="primary" @click="SaveSetting">确 定</el-button>
244
+          <el-button type="primary" @click="SaveSetting">保 存</el-button>
247 245
         </span>
248 246
       </el-dialog>
249 247
     </div>
@@ -541,4 +539,25 @@ export default {
541 539
     justify-content: flex-end;
542 540
   }
543 541
 }
542
+
543
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
544
+  overflow: auto;
545
+}
546
+/deep/ .gutter {
547
+  width: 15px !important;
548
+  display: inline-block !important;
549
+}
550
+/deep/ .el-table__fixed-right-patch {
551
+  width: 15px !important;
552
+}
553
+
554
+/deep/ .el-table__fixed-right {
555
+  bottom: 0 !important;
556
+  left: auto;
557
+  right: 0;
558
+}
559
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
560
+  width: 15px !important;
561
+  height: 15px !important;
562
+}
544 563
 </style>

+ 389 - 72
src/xt_pages/Pharmacy/PatientDispensing.vue Voir le fichier

@@ -1,4 +1,5 @@
1 1
 <template>
2
+  <!--患者发药-->
2 3
   <div class="main-contain new-main-contain">
3 4
     <div class="position">
4 5
       <!--      <bread-crumb :crumbs='crumbs'></bread-crumb>-->
@@ -19,9 +20,10 @@
19 20
             >
20 21
             </el-date-picker>
21 22
           </div>
22
-
23
+          <!--          <el-button @click="testsss">调试1</el-button>-->
24
+          <!--          <el-button @click="testsss2">调试2</el-button>-->
23 25
           <div class="list">
24
-            <el-radio-group v-model="state">
26
+            <el-radio-group v-model="state" @change="lala()">
25 27
               <el-radio :label="1">待发药{{ waitmount }}人</el-radio>
26 28
               <el-radio :label="2">已发药{{ alreadmount }}人</el-radio>
27 29
             </el-radio-group>
@@ -48,13 +50,48 @@
48 50
 
49 51
           <el-table
50 52
             :height="tableHeight"
51
-            :data="tableData"
53
+            ref="table01"
54
+            :data="waitmount_data"
55
+            highlight-current-row
56
+            @current-change="handleCurrentChange"
52 57
             border
53 58
             style="width: 100%"
59
+            v-if="state == 1"
54 60
           >
55 61
             <el-table-column prop="date" label="患者姓名" width="100">
62
+              <template slot-scope="scope">
63
+                <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
64
+              </template>
56 65
             </el-table-column>
57
-            <el-table-column prop="name" label="单据编号" width="100">
66
+            <el-table-column prop="name" label="透析号" width="100">
67
+              <template slot-scope="scope">
68
+                <span>{{
69
+                  scope.row.DialysisNo ? scope.row.DialysisNo : ""
70
+                }}</span>
71
+              </template>
72
+            </el-table-column>
73
+          </el-table>
74
+          <el-table
75
+            :height="tableHeight"
76
+            ref="table02"
77
+            :data="alreadmount_data"
78
+            highlight-current-row
79
+            @current-change="handleCurrentChange"
80
+            border
81
+            style="width: 100%"
82
+            v-if="state == 2"
83
+          >
84
+            <el-table-column prop="date" label="患者姓名" width="100">
85
+              <template slot-scope="scope">
86
+                <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
87
+              </template>
88
+            </el-table-column>
89
+            <el-table-column prop="name" label="透析号" width="100">
90
+              <template slot-scope="scope">
91
+                <span>{{
92
+                  scope.row.DialysisNo ? scope.row.DialysisNo : ""
93
+                }}</span>
94
+              </template>
58 95
             </el-table-column>
59 96
           </el-table>
60 97
         </div>
@@ -68,7 +105,10 @@
68 105
             >退药</el-button
69 106
           >
70 107
           <el-button type="primary" @click="toPrint">打印</el-button>
71
-          <el-button type="primary" v-if="state == 1">设置</el-button>
108
+          <!--          <el-button @click="tiaoshi">调试</el-button>-->
109
+          <el-button type="primary" v-if="state == 1" @click="toSetting"
110
+            >设置</el-button
111
+          >
72 112
         </div>
73 113
         <el-divider></el-divider>
74 114
         <div>
@@ -85,73 +125,76 @@
85 125
               align="center"
86 126
             >
87 127
             </el-table-column>
88
-            <el-table-column
89
-              prop="name"
90
-              label="名称"
91
-              width="220"
92
-              align="center"
93
-            >
128
+            <el-table-column label="名称" width="200" align="center">
129
+              <template slot-scope="scope">
130
+                <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
131
+              </template>
94 132
             </el-table-column>
95
-            <el-table-column
96
-              prop="name"
97
-              label="单次用量"
98
-              width="170"
99
-              align="center"
100
-            >
133
+            <el-table-column label="单次用量" width="150" align="center">
134
+              <template slot-scope="scope">
135
+                <span>{{
136
+                  scope.row.SingleDosage ? scope.row.SingleDosage : ""
137
+                }}</span>
138
+              </template>
101 139
             </el-table-column>
102
-            <el-table-column
103
-              prop="name"
104
-              label="用法"
105
-              width="160"
106
-              align="center"
107
-            >
140
+            <el-table-column label="用法" width="160" align="center">
141
+              <template slot-scope="scope">
142
+                <span>{{ scope.row.Usage ? scope.row.Usage : "" }}</span>
143
+              </template>
108 144
             </el-table-column>
109
-            <el-table-column
110
-              prop="name"
111
-              label="频率"
112
-              width="160"
113
-              align="center"
114
-            >
145
+            <el-table-column label="频率" width="160" align="center">
146
+              <template slot-scope="scope">
147
+                <span>{{
148
+                  scope.row.Frequency ? scope.row.Frequency : ""
149
+                }}</span>
150
+              </template>
115 151
             </el-table-column>
116
-            <el-table-column
117
-              prop="name"
118
-              label="天数"
119
-              width="160"
120
-              align="center"
121
-            >
152
+            <el-table-column label="天数" width="140" align="center">
153
+              <template slot-scope="scope">
154
+                <span>{{ scope.row.Days ? scope.row.Days : "" }}</span>
155
+              </template>
122 156
             </el-table-column>
123
-            <el-table-column
124
-              prop="name"
125
-              label="总量"
126
-              width="160"
127
-              align="center"
128
-            >
157
+            <el-table-column label="总量" width="140" align="center">
158
+              <template slot-scope="scope">
159
+                <span>{{ scope.row.Total ? scope.row.Total : "" }}</span>
160
+              </template>
129 161
             </el-table-column>
130
-            <el-table-column
131
-              prop="name"
132
-              label="开立医生"
133
-              width="160"
134
-              align="center"
135
-            >
162
+            <el-table-column label="开立医生" width="150" align="center">
163
+              <template slot-scope="scope">
164
+                <span>{{ scope.row.Doctor ? scope.row.Doctor : "" }}</span>
165
+              </template>
136 166
             </el-table-column>
137
-            <el-table-column
138
-              prop="name"
139
-              label="数据来源"
140
-              width="162"
141
-              align="center"
142
-            >
167
+            <el-table-column label="数据来源" width="162" align="center">
168
+              <template slot-scope="scope">
169
+                <span>{{
170
+                  scope.row.DataSources ? scope.row.DataSources : ""
171
+                }}</span>
172
+              </template>
143 173
             </el-table-column>
144
-            <el-table-column
145
-              prop="name"
146
-              label="备注"
147
-              width="170"
148
-              align="center"
149
-            >
174
+            <el-table-column label="备注" width="170" align="center">
175
+              <template slot-scope="scope">
176
+                <span>{{ scope.row.Remarks ? scope.row.Remarks : "" }}</span>
177
+              </template>
150 178
             </el-table-column>
151 179
           </el-table>
152 180
         </div>
153
-        <!-- <div style="margin-top: 25px">诊断时间:2022-05-07 19:22:16</div> -->
181
+        <!--        <div v-if="state == 2" style="margin-top: 25px">诊断时间:{{ timedate }}</div>-->
154 182
       </div>
183
+      <el-dialog title="设置" :visible.sync="dialogVisible" width="30%">
184
+        <span style="font-size: 17px">请选择药品是否要通过药房管理出库</span>
185
+        <span style="display: block; padding: 18px 25px">
186
+          <el-radio v-model="is_open" label="1">是</el-radio>
187
+          <el-radio v-model="is_open" label="2">否</el-radio>
188
+        </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>
191
+          若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
192
+        </div>
193
+        <span slot="footer" class="dialog-footer">
194
+          <el-button @click="dialogVisible = false">取 消</el-button>
195
+          <el-button type="primary" @click="SaveSetting">保 存</el-button>
196
+        </span>
197
+      </el-dialog>
155 198
     </div>
156 199
 
157 200
     <patient-print
@@ -166,6 +209,16 @@
166 209
 <script>
167 210
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
168 211
 import patientPrint from "./print/patientPrint.vue";
212
+import { getPharmacyConfig, SaveSetting } from "@/api/his/advice";
213
+import {
214
+  waitingdrug,
215
+  issueddrugs,
216
+  todaynumber,
217
+  getpharmacycontent,
218
+  dispensingmedicine,
219
+  drugwithdrawal,
220
+} from "@/api/pharmacy";
221
+const moment = require("moment");
169 222
 export default {
170 223
   components: {
171 224
     BreadCrumb,
@@ -173,29 +226,208 @@ export default {
173 226
   },
174 227
   data() {
175 228
     return {
229
+      patient_id: 0,
176 230
       crumbs: [
177 231
         { path: false, name: "患者发药" },
178 232
         { path: "/Pharmacy/patiantDispensing", name: "患者发药" },
179 233
       ],
180 234
       tableHeight: 400,
181
-      datepick: "",
182
-      state: 1,
183
-      waitmount: 0,
184
-      alreadmount: 0,
235
+      start_time: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
236
+      state: 1, //1待发药,2已发药
237
+      waitmount: 0, //待发药人数
238
+      waitmount_data: [],
239
+      alreadmount: 0, //已发药人数
240
+      alreadmount_data: [],
185 241
       keywords: "",
186 242
       tableData: [],
187 243
       propsTable: [],
188 244
       tableData_list: [],
189 245
       isVisibility: false,
246
+      currentRow: null,
247
+      dialogVisible: false,
248
+      is_open: "2",
190 249
     };
191 250
   },
192 251
   watch: {},
193
-
252
+  created() {
253
+    this.init();
254
+    this.gettodaynumber();
255
+    this.fun3();
256
+    // this.getwaitmount();//fun3
257
+    // this.selectedbydefault();
258
+  },
194 259
   methods: {
260
+    tiaoshi() {
261
+      console.log("this.tableData", this.tableData);
262
+    },
263
+    async fun3() {
264
+      console.log("fun3");
265
+      this.fun1().then((val) => {
266
+        this.fun2();
267
+      });
268
+    },
269
+    async fun4(tmp) {
270
+      console.log("fun3");
271
+      this.fun1().then((val) => {
272
+        console.log("this.alreadmount_data", this.alreadmount_data);
273
+        for (let i = 0; i < this.alreadmount_data.length; i++) {
274
+          console.log("tmp = ", tmp);
275
+          if (this.alreadmount_data[i].PatientID == tmp) {
276
+            console.log("i = ", i);
277
+            this.$refs.table02.setCurrentRow(this.alreadmount_data[i]);
278
+            this.handleCurrentChange(this.alreadmount_data[i]);
279
+          }
280
+        }
281
+      });
282
+    },
283
+    async fun5(tmp) {
284
+      console.log("fun3");
285
+      this.fun1().then((val) => {
286
+        console.log("this.alreadmount_data", this.waitmount_data);
287
+        for (let i = 0; i < this.waitmount_data.length; i++) {
288
+          console.log("tmp = ", tmp);
289
+          if (this.waitmount_data[i].PatientID == tmp) {
290
+            console.log("i = ", i);
291
+            this.$refs.table02.setCurrentRow(this.waitmount_data[i]);
292
+            this.handleCurrentChange(this.waitmount_data[i]);
293
+          }
294
+        }
295
+      });
296
+    },
297
+
298
+    lala() {
299
+      console.log("this.state!!!!!!", this.state);
300
+      //初始化状态
301
+      this.tableData = null;
302
+      this.currentRow = null;
303
+      this.selectedbydefault();
304
+    },
305
+    //选中行数
306
+    handleCurrentChange(val) {
307
+      this.currentRow = val;
308
+      console.log("this.currentRow", this.currentRow);
309
+      if (this.state == 1) {
310
+        this.getpatientdetails(0);
311
+      }
312
+      if (this.state == 2) {
313
+        this.getpatientdetails(1);
314
+      }
315
+    },
316
+    init() {
317
+      // console.log("初始化了")
318
+      this.state = 1;
319
+      this.tableData = null;
320
+      this.currentRow = null;
321
+    },
322
+    testsss() {
323
+      this.state = 1;
324
+    },
325
+    //默认选中的
326
+    selectedbydefault() {
327
+      if (this.state == 1 && this.waitmount_data.length > 0) {
328
+        this.$refs.table01.setCurrentRow(this.waitmount_data[0]);
329
+        this.handleCurrentChange(this.waitmount_data[0]);
330
+      }
331
+      if (this.state == 2 && this.alreadmount_data.length > 0) {
332
+        this.$refs.table02.setCurrentRow(this.alreadmount_data[0]);
333
+        this.handleCurrentChange(this.alreadmount_data[0]);
334
+      }
335
+    },
336
+    //包装selectedbydefault
337
+    fun2() {
338
+      console.log("3333333this.waitmount_data", this.waitmount_data);
339
+      // return new Promise((resolve, reject) => {
340
+      if (this.state == 1 && this.waitmount_data.length > 0) {
341
+        this.$refs.table01.setCurrentRow(this.waitmount_data[0]);
342
+        this.handleCurrentChange(this.waitmount_data[0]);
343
+      }
344
+      if (this.state == 2 && this.alreadmount_data.length > 0) {
345
+        this.$refs.table02.setCurrentRow(this.alreadmount_data[0]);
346
+        this.handleCurrentChange(this.alreadmount_data[0]);
347
+      }
348
+      // });
349
+    },
350
+    changeTimes() {
351
+      this.gettodaynumber();
352
+      this.getwaitmount();
353
+      this.fun3();
354
+    },
355
+    //获取当天发药的人数
356
+    gettodaynumber() {
357
+      console.log("aaa");
358
+      var params = {
359
+        time: this.start_time,
360
+      };
361
+      todaynumber(params).then((res) => {
362
+        if (res.data.state == 1) {
363
+          this.waitmount = res.data.data.itotal;
364
+          this.alreadmount = res.data.data.wtotal;
365
+        }
366
+      });
367
+      // console.log("2222222")
368
+    },
369
+    //获取发药人列表
370
+    getwaitmount() {
371
+      var params = {
372
+        keyword: this.keywords,
373
+        time: this.start_time,
374
+      };
375
+      waitingdrug(params).then((res) => {
376
+        if (res.data.state == 1) {
377
+          this.waitmount_data = res.data.data.list;
378
+        }
379
+      });
380
+      issueddrugs(params).then((res) => {
381
+        if (res.data.state == 1) {
382
+          this.alreadmount_data = res.data.data.list;
383
+        }
384
+      });
385
+    },
386
+    //包装getwaitmount
387
+    async fun1() {
388
+      // return new Promise((resolve, reject) => {
389
+      var params = {
390
+        keyword: this.keywords,
391
+        time: this.start_time,
392
+      };
393
+      await waitingdrug(params).then((res) => {
394
+        if (res.data.state == 1) {
395
+          this.waitmount_data = res.data.data.list;
396
+          console.log("1111111");
397
+        }
398
+      });
399
+      await issueddrugs(params).then((res) => {
400
+        if (res.data.state == 1) {
401
+          this.alreadmount_data = res.data.data.list;
402
+          console.log("1111111s");
403
+        }
404
+      });
405
+      console.log("222222222");
406
+
407
+      // })
408
+    },
409
+    //获取患者信息详情
410
+    getpatientdetails(val) {
411
+      var params = {
412
+        patient_id: this.currentRow.PatientID,
413
+        is_medicine: val,
414
+        time: this.start_time,
415
+      };
416
+      getpharmacycontent(params).then((res) => {
417
+        if (res.data.state == 1) {
418
+          this.tableData = res.data.data.list;
419
+        } else {
420
+          this.$message.error(res.data.msg);
421
+        }
422
+      });
423
+    },
195 424
     // 跳转打印页面
196 425
     toPrint() {
197
-      // this.$router.push({ path: "/Pharmacy/print/patientPrint" });
198
-      this.$refs.patientprint.show();
426
+      if (this.tableData == null) {
427
+        this.$message.error("未选择任何数据");
428
+        return;
429
+      }
430
+      this.$refs.patientprint.show(this.tableData, this.currentRow, this.state);
199 431
     },
200 432
 
201 433
     // 搜索患者
@@ -203,29 +435,93 @@ export default {
203 435
 
204 436
     // 药品发药
205 437
     dispense() {
206
-      var params = {};
438
+      var tmp = this.currentRow.PatientID;
439
+      var params = {
440
+        patient_id: this.currentRow.PatientID,
441
+        time: this.start_time,
442
+      };
207 443
       this.$confirm("确定是否对该药品进行发药?", "患者发药", {
208 444
         confirmButtonText: "确 定",
209 445
         cancelButtonText: "取 消",
210 446
         type: "warning",
211 447
       })
212
-        .then(() => {})
448
+        .then(() => {
449
+          dispensingmedicine(params).then((res) => {
450
+            if (res.data.state == 1) {
451
+              this.$message.success("操作成功");
452
+              this.gettodaynumber();
453
+              this.searchAction();
454
+              this.tableData = null;
455
+              this.fun4(tmp);
456
+              this.state = 2;
457
+              // console.log("this.alreadmount_data",this.alreadmount_data)
458
+              // for (let i = 0;i < this.alreadmount_data.length;i++){
459
+              //   console.log("tmp = ",tmp)
460
+              //     if (this.alreadmount_data[i].PatientID == tmp){
461
+              //       console.log("i = ",i)
462
+              //       this.$refs.table02.setCurrentRow(this.alreadmount_data[i]);
463
+              //       this.handleCurrentChange(this.alreadmount_data[i])
464
+              //     }
465
+              // }
466
+            } else {
467
+              this.$message.error(res.data.msg);
468
+            }
469
+          });
470
+        })
213 471
         .catch(() => {});
214 472
     },
215 473
 
474
+    toSetting() {
475
+      getPharmacyConfig().then((response) => {
476
+        if (response.data.state == 1) {
477
+          this.dialogVisible = true;
478
+          var config = response.data.data.config;
479
+          this.is_open = config.is_open.toString();
480
+        }
481
+      });
482
+    },
483
+    SaveSetting() {
484
+      var params = {
485
+        is_open: parseInt(this.is_open),
486
+      };
487
+      SaveSetting(params).then((response) => {
488
+        if (response.data.state == 1) {
489
+          var config = response.data.data.config;
490
+          this.$message.success("保存成功!");
491
+          this.dialogVisible = false;
492
+        }
493
+      });
494
+    },
495
+
216 496
     // 药品退药
217 497
     endispense() {
218
-      var params = {};
498
+      var tmp = this.currentRow.PatientID;
499
+      var params = {
500
+        patient_id: this.currentRow.PatientID,
501
+        time: this.start_time,
502
+      };
219 503
       this.$confirm("确定是否对该药品进行退药?", "患者退药", {
220 504
         confirmButtonText: "确 定",
221 505
         cancelButtonText: "取 消",
222 506
         type: "warning",
223 507
       })
224
-        .then(() => {})
508
+        .then(() => {
509
+          drugwithdrawal(params).then((res) => {
510
+            if (res.data.state == 1) {
511
+              this.$message.success("操作成功");
512
+              this.gettodaynumber();
513
+              this.searchAction();
514
+              this.tableData = null;
515
+              this.fun4(tmp);
516
+              this.state = 1;
517
+            } else {
518
+              this.$message.error(res.data.msg);
519
+            }
520
+          });
521
+        })
225 522
         .catch(() => {});
226 523
     },
227 524
   },
228
-  created() {},
229 525
 };
230 526
 </script>
231 527
 
@@ -265,4 +561,25 @@ export default {
265 561
     justify-content: flex-end;
266 562
   }
267 563
 }
564
+
565
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
566
+  overflow: auto;
567
+}
568
+/deep/ .gutter {
569
+  width: 15px !important;
570
+  display: inline-block !important;
571
+}
572
+/deep/ .el-table__fixed-right-patch {
573
+  width: 15px !important;
574
+}
575
+
576
+/deep/ .el-table__fixed-right {
577
+  bottom: 0 !important;
578
+  left: auto;
579
+  right: 0;
580
+}
581
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
582
+  width: 15px !important;
583
+  height: 15px !important;
584
+}
268 585
 </style>

+ 10 - 1
src/xt_pages/Pharmacy/print/drugPrint.vue Voir le fichier

@@ -9,10 +9,12 @@
9 9
       >打印</el-button
10 10
     >
11 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 13
       <div class="list_title">
13 14
         <div>药品名称:{{name}}</div>
14 15
         <div>规格:{{specifications}}</div>
15 16
         <div>发药状态:{{state_name}}</div>
17
+        <div>日期:</div>
16 18
 <!--        <div v-if="state==2">领药人:</div>-->
17 19
       </div>
18 20
 
@@ -83,6 +85,7 @@ export default {
83 85
       name:"",
84 86
       specifications:"",
85 87
       state_name:"",
88
+      org_name: this.$store.getters.xt_user.org.org_name,
86 89
     };
87 90
   },
88 91
   props: {
@@ -147,7 +150,10 @@ export default {
147 150
       //     scanStyles: false,
148 151
       //   });
149 152
       this.printJson({
150
-        title: `<div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;">
153
+        title: `
154
+        <div>
155
+        <div style="width: 940px;text-align:center;font-size:16px;font-weight:bold;">${this.org_name}医院 领药单</div>
156
+        <div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;font-size:14px;">
151 157
         <div style="width: 230px;padding: 10px 0;">药品名称:${this.name}</div>
152 158
         <div style="width: 230px;padding: 10px 0;">规格:${this.specifications}</div>
153 159
         <div style="width: 230px;padding: 10px 0;">发药状态:${this.state_name}</div>
@@ -209,6 +215,9 @@ export default {
209 215
 </script>
210 216
 
211 217
 <style lang="scss" scoped>
218
+/deep/ .el-dialog{
219
+  width: 60%;
220
+}
212 221
 .print_style {
213 222
   position: absolute;
214 223
   right: 10px;

+ 49 - 14
src/xt_pages/Pharmacy/print/patientPrint.vue Voir le fichier

@@ -9,11 +9,11 @@
9 9
       >打印</el-button
10 10
     >
11 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 13
       <div class="list_title">
13
-        <div>患者名称:</div>
14
-        <div>数据来源:</div>
15
-        <div>发药状态:</div>
16
-        <div>领药时间:</div>
14
+        <div>患者名称:{{name}}</div>
15
+        <div>发药状态:{{state}}</div>
16
+        <div>日期:</div>
17 17
       </div>
18 18
 
19 19
       <el-table
@@ -52,7 +52,9 @@ export default {
52 52
       visibility: false,
53 53
       tableData: [{}],
54 54
       isClose:false,
55
-      org_name:"",
55
+      name:"",
56
+      state:null,
57
+      org_name: this.$store.getters.xt_user.org.org_name,
56 58
     };
57 59
   },
58 60
   props: {
@@ -101,18 +103,20 @@ export default {
101 103
       //     scanStyles: false,
102 104
       //   });
103 105
       this.printJson({
104
-        title: `<div style="width:100%;text-align:center;font-size:16px;font-weight:bold;">${this.org_name}医院 发药单</div>
105
-        <div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;">
106
-        <div style="width: 310px;padding: 10px 0;">患者名称:${1}</div>
107
-        <div style="width: 310px;padding: 10px 0;">数据来源:${1}</div>
108
-        <div style="width: 310px;padding: 10px 0;">发药状态:${1}</div>
106
+        title: `
107
+        <div>
108
+        <div style="width: 940px;text-align:center;font-size:16px;font-weight:bold;">${this.org_name}医院 发药单</div>
109
+        <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>
111
+        <div style="width: 310px;padding: 10px 0;">发药状态:${this.state}</div>
112
+        <div style="width: 310px;padding: 10px 0;">日期:${this.state}</div>
109 113
         </div>`, // 打印出来的标题
110 114
         data: this.tableData, // 需要打印的数据
111 115
         serial: true, // 是否需要打印序列号
112 116
         fields: [
113 117
           // 需要打印的字段
114
-
115
-          "name",
118
+          // "index",
119
+          "Name",
116 120
           "SingleDosage",
117 121
           "use",
118 122
           "frequency",
@@ -123,7 +127,7 @@ export default {
123 127
         ],
124 128
         properties: [
125 129
           // 需要打印的字段对应的表头名
126
-
130
+         
127 131
           {
128 132
             field: "name",
129 133
             displayName: "姓名",
@@ -163,10 +167,15 @@ export default {
163 167
 };
164 168
 </script>
165 169
 
166
-<style lang="scss" scoped>
170
+<style rel="stylesheet/css" lang="scss" scoped>
167 171
 /deep/ .el-dialog{
168 172
   width: 60%;
169 173
 }
174
+
175
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
176
+  width: 10px;
177
+  height: 10px;
178
+}
170 179
 .print_style {
171 180
   position: absolute;
172 181
   right: 65px;
@@ -184,4 +193,30 @@ export default {
184 193
     padding: 10px 0;
185 194
   }
186 195
 }
196
+
187 197
 </style>
198
+
199
+<style>
200
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
201
+  font-size: 12px;
202
+}
203
+
204
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
205
+  background: #6fb5fa;
206
+}
207
+
208
+.count {
209
+  color: #bd2c00;
210
+}
211
+.el-table td,
212
+.el-table th.is-leaf,
213
+.el-table--border,
214
+.el-table--group {
215
+  border-color: #d0d3da;
216
+}
217
+.el-table--border::after,
218
+.el-table--group::after,
219
+.el-table::before {
220
+  background-color: #d0d3da;
221
+}
222
+</style>