huangyw 2 years ago
parent
commit
6406ef2057

+ 8 - 7
src/xt_pages/Pharmacy/DispensingDetails.vue View File

15
         <div>
15
         <div>
16
           <el-input
16
           <el-input
17
             size="small"
17
             size="small"
18
-            style="width: 200px; margin-left: 10px"
18
+            style="width: 200px;margin-right: 20px;"
19
             class="filter-item"
19
             class="filter-item"
20
             v-model="keyword"
20
             v-model="keyword"
21
             placeholder="请输入患者姓名"
21
             placeholder="请输入患者姓名"
54
             class="filter-item"
54
             class="filter-item"
55
             type="primary"
55
             type="primary"
56
             icon="el-icon-search"
56
             icon="el-icon-search"
57
+            style="margin-left: 20px;"
57
             @click="query"
58
             @click="query"
58
             >查询</el-button
59
             >查询</el-button
59
           >
60
           >
65
           backgroundColor: 'rgb(245, 247, 250)',
66
           backgroundColor: 'rgb(245, 247, 250)',
66
           color: '#606266',
67
           color: '#606266',
67
         }"
68
         }"
68
-        style="width: 1651px"
69
+        style="width: 100%"
69
         :data="tableList"
70
         :data="tableList"
70
         :class="signAndWeighBoxPatients"
71
         :class="signAndWeighBoxPatients"
71
         border
72
         border
72
       >
73
       >
73
-        <el-table-column type="index" label="序号" align="center" width="250">
74
+        <el-table-column type="index" label="序号" align="center">
74
         </el-table-column>
75
         </el-table-column>
75
-        <el-table-column label="患者名称" align="center" width="300">
76
+        <el-table-column label="患者名称" align="center">
76
           <template slot-scope="scope">
77
           <template slot-scope="scope">
77
             <span>{{scope.row.Name  ? scope.row.Name  : ""}}</span>
78
             <span>{{scope.row.Name  ? scope.row.Name  : ""}}</span>
78
           </template>
79
           </template>
79
         </el-table-column>
80
         </el-table-column>
80
 
81
 
81
-        <el-table-column label="开立医生" align="center" width="300">
82
+        <el-table-column label="开立医生" align="center">
82
           <template slot-scope="scope">
83
           <template slot-scope="scope">
83
             <span>{{scope.row.DoctorName  ? scope.row.DoctorName  : ""}}</span>
84
             <span>{{scope.row.DoctorName  ? scope.row.DoctorName  : ""}}</span>
84
           </template>
85
           </template>
85
         </el-table-column>
86
         </el-table-column>
86
-        <el-table-column label="发药时间" align="center" width="400">
87
+        <el-table-column label="发药时间" align="center">
87
           <template slot-scope="scope">
88
           <template slot-scope="scope">
88
             <span>{{scope.row.RecordDate  ? scope.row.RecordDate  : ""}}</span>
89
             <span>{{scope.row.RecordDate  ? scope.row.RecordDate  : ""}}</span>
89
           </template>
90
           </template>
90
         </el-table-column>
91
         </el-table-column>
91
-        <el-table-column label="操作" align="center" width="400">
92
+        <el-table-column label="操作" align="center">
92
           <template slot-scope="scope">
93
           <template slot-scope="scope">
93
             <el-button type="primary" @click="views(scope.row)">查看</el-button>
94
             <el-button type="primary" @click="views(scope.row)">查看</el-button>
94
           </template>
95
           </template>

+ 1 - 1
src/xt_pages/Pharmacy/DrugDispensing.vue View File

217
 
217
 
218
 
218
 
219
         </div>
219
         </div>
220
-        <div style="margin-top:13px;">领药人:
220
+        <div style="margin-top:12px;" v-if="state == 1">领药人:
221
           <el-select v-model="admin_user_id" placeholder="请选择">
221
           <el-select v-model="admin_user_id" placeholder="请选择">
222
             <el-option
222
             <el-option
223
               v-for="item in doctorList"
223
               v-for="item in doctorList"

+ 368 - 72
src/xt_pages/Pharmacy/PatientDispensing.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>-->
19
             >
20
             >
20
             </el-date-picker>
21
             </el-date-picker>
21
           </div>
22
           </div>
22
-
23
+          <!--          <el-button @click="testsss">调试1</el-button>-->
24
+          <!--          <el-button @click="testsss2">调试2</el-button>-->
23
           <div class="list">
25
           <div class="list">
24
-            <el-radio-group v-model="state">
26
+            <el-radio-group v-model="state" @change="lala()">
25
               <el-radio :label="1">待发药{{ waitmount }}人</el-radio>
27
               <el-radio :label="1">待发药{{ waitmount }}人</el-radio>
26
               <el-radio :label="2">已发药{{ alreadmount }}人</el-radio>
28
               <el-radio :label="2">已发药{{ alreadmount }}人</el-radio>
27
             </el-radio-group>
29
             </el-radio-group>
48
 
50
 
49
           <el-table
51
           <el-table
50
             :height="tableHeight"
52
             :height="tableHeight"
51
-            :data="tableData"
53
+            ref="table01"
54
+            :data="waitmount_data"
55
+            highlight-current-row
56
+            @current-change="handleCurrentChange"
57
+            border
58
+            style="width: 100%"
59
+            v-if="state == 1"
60
+          >
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>
65
+            </el-table-column>
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"
52
             border
80
             border
53
             style="width: 100%"
81
             style="width: 100%"
82
+            v-if="state == 2"
54
           >
83
           >
55
             <el-table-column prop="date" label="患者姓名" width="100">
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>
56
             </el-table-column>
88
             </el-table-column>
57
-            <el-table-column prop="name" label="单据编号" width="100">
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
             </el-table-column>
95
             </el-table-column>
59
           </el-table>
96
           </el-table>
60
         </div>
97
         </div>
68
             >退药</el-button
105
             >退药</el-button
69
           >
106
           >
70
           <el-button type="primary" @click="toPrint">打印</el-button>
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
         </div>
112
         </div>
73
         <el-divider></el-divider>
113
         <el-divider></el-divider>
74
         <div>
114
         <div>
85
               align="center"
125
               align="center"
86
             >
126
             >
87
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
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
             </el-table-column>
178
             </el-table-column>
151
           </el-table>
179
           </el-table>
152
         </div>
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
       </div>
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
     </div>
198
     </div>
156
 
199
 
157
     <patient-print
200
     <patient-print
166
 <script>
209
 <script>
167
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
210
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
168
 import patientPrint from "./print/patientPrint.vue";
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
 export default {
222
 export default {
170
   components: {
223
   components: {
171
     BreadCrumb,
224
     BreadCrumb,
173
   },
226
   },
174
   data() {
227
   data() {
175
     return {
228
     return {
229
+      patient_id: 0,
176
       crumbs: [
230
       crumbs: [
177
         { path: false, name: "患者发药" },
231
         { path: false, name: "患者发药" },
178
         { path: "/Pharmacy/patiantDispensing", name: "患者发药" },
232
         { path: "/Pharmacy/patiantDispensing", name: "患者发药" },
179
       ],
233
       ],
180
       tableHeight: 400,
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
       keywords: "",
241
       keywords: "",
186
       tableData: [],
242
       tableData: [],
187
       propsTable: [],
243
       propsTable: [],
188
       tableData_list: [],
244
       tableData_list: [],
189
       isVisibility: false,
245
       isVisibility: false,
246
+      currentRow: null,
247
+      dialogVisible: false,
248
+      is_open: "2",
190
     };
249
     };
191
   },
250
   },
192
   watch: {},
251
   watch: {},
193
-
252
+  created() {
253
+    this.init();
254
+    this.gettodaynumber();
255
+    this.fun3();
256
+    // this.getwaitmount();//fun3
257
+    // this.selectedbydefault();
258
+  },
194
   methods: {
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
     toPrint() {
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
 
435
 
204
     // 药品发药
436
     // 药品发药
205
     dispense() {
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
       this.$confirm("确定是否对该药品进行发药?", "患者发药", {
443
       this.$confirm("确定是否对该药品进行发药?", "患者发药", {
208
         confirmButtonText: "确 定",
444
         confirmButtonText: "确 定",
209
         cancelButtonText: "取 消",
445
         cancelButtonText: "取 消",
210
         type: "warning",
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
         .catch(() => {});
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
     endispense() {
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
       this.$confirm("确定是否对该药品进行退药?", "患者退药", {
503
       this.$confirm("确定是否对该药品进行退药?", "患者退药", {
220
         confirmButtonText: "确 定",
504
         confirmButtonText: "确 定",
221
         cancelButtonText: "取 消",
505
         cancelButtonText: "取 消",
222
         type: "warning",
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
         .catch(() => {});
522
         .catch(() => {});
226
     },
523
     },
227
   },
524
   },
228
-  created() {},
229
 };
525
 };
230
 </script>
526
 </script>
231
 
527
 

+ 5 - 1
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">
13
       <div class="list_title">
13
         <div>药品名称:{{name}}</div>
14
         <div>药品名称:{{name}}</div>
14
         <div>规格:{{specifications}}</div>
15
         <div>规格:{{specifications}}</div>
15
         <div>发药状态:{{state_name}}</div>
16
         <div>发药状态:{{state_name}}</div>
17
+        <div>日期:</div>
16
 <!--        <div v-if="state==2">领药人:</div>-->
18
 <!--        <div v-if="state==2">领药人:</div>-->
17
       </div>
19
       </div>
18
 
20
 
83
       name:"",
85
       name:"",
84
       specifications:"",
86
       specifications:"",
85
       state_name:"",
87
       state_name:"",
88
+      org_name: this.$store.getters.xt_user.org.org_name,
86
     };
89
     };
87
   },
90
   },
88
   props: {
91
   props: {
147
       //     scanStyles: false,
150
       //     scanStyles: false,
148
       //   });
151
       //   });
149
       this.printJson({
152
       this.printJson({
150
-        title: `<div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;">
153
+        title: `<div style="width:100%;text-align:center;font-size:16px;font-weight:bold;">${this.org_name}医院 领药单</div>
154
+        <div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;font-size:14px;">
151
         <div style="width: 230px;padding: 10px 0;">药品名称:${this.name}</div>
155
         <div style="width: 230px;padding: 10px 0;">药品名称:${this.name}</div>
152
         <div style="width: 230px;padding: 10px 0;">规格:${this.specifications}</div>
156
         <div style="width: 230px;padding: 10px 0;">规格:${this.specifications}</div>
153
         <div style="width: 230px;padding: 10px 0;">发药状态:${this.state_name}</div>
157
         <div style="width: 230px;padding: 10px 0;">发药状态:${this.state_name}</div>

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