Procházet zdrojové kódy

Merge branch '20201109_pc_vue_new_branch' of D:\lijianchao\project\z-html\Vue_New with conflicts.

mainqaq před 2 roky
rodič
revize
14eb5373c2

+ 1 - 2
config/dev.env.js Zobrazit soubor

8
   ENV_CONFIG: '"dev"',
8
   ENV_CONFIG: '"dev"',
9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
   BASE_API: '"http://api.xt.test.sgjyun.com"',
10
   BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  // BASE_API: '"http://localhost:9529"',
11
+  // BASE_API: '"http://localhost:9531"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',
15
   MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
15
   MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
16
   CDM_HOST: '"http://cdm.test.sgjyun.com"'
16
   CDM_HOST: '"http://cdm.test.sgjyun.com"'
17
 }
17
 }
18
-

+ 1 - 1
package.json Zobrazit soubor

92
     "babel-preset-stage-2": "6.24.1",
92
     "babel-preset-stage-2": "6.24.1",
93
     "chalk": "2.3.0",
93
     "chalk": "2.3.0",
94
     "copy-webpack-plugin": "4.3.0",
94
     "copy-webpack-plugin": "4.3.0",
95
-    "cross-env": "5.1.1",
95
+    "cross-env": "^7.0.3",
96
     "crypto-js": "^4.1.1",
96
     "crypto-js": "^4.1.1",
97
     "css-loader": "0.28.7",
97
     "css-loader": "0.28.7",
98
     "eslint": "4.13.1",
98
     "eslint": "4.13.1",

+ 1 - 1
src/App.vue Zobrazit soubor

46
   },
46
   },
47
   watch:{
47
   watch:{
48
   $route(to,from){
48
   $route(to,from){
49
-    
49
+
50
     if(to.path.indexOf('/patients/patient')== -1){
50
     if(to.path.indexOf('/patients/patient')== -1){
51
       window.sessionStorage.removeItem('patientKey')
51
       window.sessionStorage.removeItem('patientKey')
52
     }
52
     }

+ 40 - 0
src/api/pharmacy.js Zobrazit soubor

64
     params: params
64
     params: params
65
   })
65
   })
66
 }
66
 }
67
+//获取当天已发药的药品
68
+export function dispensemedicine(params) {
69
+  return request({
70
+    url: '/api/pharmacy/dispensemedicine',
71
+    method: 'get',
72
+    params: params
73
+  })
74
+}
75
+//获取当天待发药的药品
76
+export function waitingmedicine(params) {
77
+  return request({
78
+    url: '/api/pharmacy/waitingmedicine',
79
+    method: 'get',
80
+    params: params
81
+  })
82
+}
83
+//获取当天该药品的所有患者
84
+export function getpatientswithdrugs(params) {
85
+  return request({
86
+    url: '/api/pharmacy/getpatientswithdrugs',
87
+    method: 'get',
88
+    params: params
89
+  })
90
+}
91
+//药品发药按钮点击
92
+export function medicinedeparture(params) {
93
+  return request({
94
+    url: '/api/pharmacy/medicinedeparture',
95
+    method: 'get',
96
+    params: params
97
+  })
98
+}
99
+//获取当前登录账号
100
+export function getcurrentname(params) {
101
+  return request({
102
+    url: '/api/pharmacy/getcurrentname',
103
+    method: 'get',
104
+    params: params
105
+  })
106
+}

+ 1 - 1
src/router/index.js Zobrazit soubor

165
   PatientDispensing, // 患者发药模块
165
   PatientDispensing, // 患者发药模块
166
   DrugDispensing, // 药房管理模块
166
   DrugDispensing, // 药房管理模块
167
   DispensingDetails, // 药房管理模块
167
   DispensingDetails, // 药房管理模块
168
-  // ConsumablesManagement, // 药房管理模块
168
+  //ConsumablesManagement, // 药房管理模块
169
   MedicianManagement, // 药房管理模块
169
   MedicianManagement, // 药房管理模块
170
 
170
 
171
   otherManagement,
171
   otherManagement,

+ 2 - 2
src/router/modules/DispensingDetails.js Zobrazit soubor

8
   children: [{
8
   children: [{
9
     path: '/Pharmacy/DispensingDetails',
9
     path: '/Pharmacy/DispensingDetails',
10
     component: () => import('@/xt_pages/Pharmacy/DispensingDetails.vue'),
10
     component: () => import('@/xt_pages/Pharmacy/DispensingDetails.vue'),
11
-    name: '发药明细',
11
+    name: '药房管理',
12
     meta: {
12
     meta: {
13
       title: '发药明细',
13
       title: '发药明细',
14
       noCache: true
14
       noCache: true
15
     }
15
     }
16
   },]
16
   },]
17
-}
17
+}

+ 2 - 2
src/router/modules/DrugDispensing.js Zobrazit soubor

8
   children: [{
8
   children: [{
9
     path: '/Pharmacy/DrugDispensing',
9
     path: '/Pharmacy/DrugDispensing',
10
     component: () => import('@/xt_pages/Pharmacy/DrugDispensing.vue'),
10
     component: () => import('@/xt_pages/Pharmacy/DrugDispensing.vue'),
11
-    name: '药品发药',
11
+    name: '药房管理',
12
     meta: {
12
     meta: {
13
       title: '药品发药',
13
       title: '药品发药',
14
       noCache: true
14
       noCache: true
15
     }
15
     }
16
   },]
16
   },]
17
-}
17
+}

+ 2 - 2
src/router/modules/PatientDispensing.js Zobrazit soubor

8
   children: [{
8
   children: [{
9
     path: '/Pharmacy/PatientDispensing',
9
     path: '/Pharmacy/PatientDispensing',
10
     component: () => import('@/xt_pages/Pharmacy/PatientDispensing.vue'),
10
     component: () => import('@/xt_pages/Pharmacy/PatientDispensing.vue'),
11
-    name: '患者发药',
11
+    name: '药房管理',
12
     meta: {
12
     meta: {
13
       title: '患者发药',
13
       title: '患者发药',
14
       noCache: true
14
       noCache: true
23
   //   meta: { title: 'outpatientChargesPrint', noCache: true }
23
   //   meta: { title: 'outpatientChargesPrint', noCache: true }
24
   // }
24
   // }
25
 ]
25
 ]
26
-}
26
+}

+ 2 - 2
src/views/layout/Layout.vue Zobrazit soubor

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>

+ 1 - 0
src/xt_pages/DepositManagement/DepositRefund.vue Zobrazit soubor

68
             <div style="width: 465px;white-space: nowrap;">
68
             <div style="width: 465px;white-space: nowrap;">
69
               <span>日期查询:</span>
69
               <span>日期查询:</span>
70
               <el-date-picker
70
               <el-date-picker
71
+                unlink-panels
71
                 v-model="tmp_value1"
72
                 v-model="tmp_value1"
72
                 type="daterange"
73
                 type="daterange"
73
                 range-separator="至"
74
                 range-separator="至"

+ 1 - 0
src/xt_pages/DepositManagement/Template/DeductionDetails.vue Zobrazit soubor

24
           <div style="width: 465px">
24
           <div style="width: 465px">
25
             <span>日期查询:</span>
25
             <span>日期查询:</span>
26
             <el-date-picker
26
             <el-date-picker
27
+              unlink-panels
27
               v-model="value1"
28
               v-model="value1"
28
               type="daterange"
29
               type="daterange"
29
               range-separator="至"
30
               range-separator="至"

+ 1 - 0
src/xt_pages/DepositManagement/Template/DeductionSummary.vue Zobrazit soubor

24
           <div style="width: 465px">
24
           <div style="width: 465px">
25
             <span>日期查询:</span>
25
             <span>日期查询:</span>
26
             <el-date-picker
26
             <el-date-picker
27
+              unlink-panels
27
               v-model="value1"
28
               v-model="value1"
28
               type="daterange"
29
               type="daterange"
29
               range-separator="至"
30
               range-separator="至"

+ 1 - 0
src/xt_pages/DepositManagement/Template/DepositDetails.vue Zobrazit soubor

31
         <div style="width: 550px">
31
         <div style="width: 550px">
32
           <span>日期查询:</span>
32
           <span>日期查询:</span>
33
           <el-date-picker
33
           <el-date-picker
34
+            unlink-panels
34
             v-model="value1"
35
             v-model="value1"
35
             type="daterange"
36
             type="daterange"
36
             range-separator="至"
37
             range-separator="至"

+ 2 - 1
src/xt_pages/DepositManagement/Template/RechargeDetails.vue Zobrazit soubor

24
           <div style="width: 465px">
24
           <div style="width: 465px">
25
             <span>日期查询:</span>
25
             <span>日期查询:</span>
26
             <el-date-picker
26
             <el-date-picker
27
+              unlink-panels
27
               v-model="value1"
28
               v-model="value1"
28
               type="daterange"
29
               type="daterange"
29
               range-separator="至"
30
               range-separator="至"
108
               审核
109
               审核
109
             </el-button>
110
             </el-button>
110
             </span>
111
             </span>
111
-           
112
+
112
             <span v-if="scope.row.trial_status == 1">
113
             <span v-if="scope.row.trial_status == 1">
113
             <el-button
114
             <el-button
114
               size="small"
115
               size="small"

+ 1 - 0
src/xt_pages/DepositManagement/Template/RechargeSummary.vue Zobrazit soubor

24
           <div style="width: 465px">
24
           <div style="width: 465px">
25
             <span>日期查询:</span>
25
             <span>日期查询:</span>
26
             <el-date-picker
26
             <el-date-picker
27
+              unlink-panels
27
               v-model="value1"
28
               v-model="value1"
28
               type="daterange"
29
               type="daterange"
29
               range-separator="至"
30
               range-separator="至"

+ 204 - 204
src/xt_pages/Pharmacy/DispensingDetails.vue Zobrazit soubor

1
 <template><!--发药明细-->
1
 <template><!--发药明细-->
2
-<!--  <div class="main-contain">-->
3
-<!--    <div class="position">-->
4
-<!--      <bread-crumb :crumbs="crumbs"></bread-crumb>-->
5
-<!--    </div>-->
6
-<!--    <div class="app-container">-->
7
-<!--      <div-->
8
-<!--        style="-->
9
-<!--          justify-content: space-between;-->
10
-<!--          margin: 0px 0 12px 0;-->
11
-<!--          display: flex;-->
12
-<!--          align-items: center;-->
13
-<!--        "-->
14
-<!--      >-->
15
-<!--        <div>-->
16
-<!--          <el-input-->
17
-<!--            size="small"-->
18
-<!--            style="width: 200px; margin-left: 10px"-->
19
-<!--            class="filter-item"-->
20
-<!--            v-model="keyword"-->
21
-<!--            placeholder="请输入患者姓名"-->
22
-<!--          ></el-input>-->
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div
8
+        style="
9
+          justify-content: space-between;
10
+          margin: 0px 0 12px 0;
11
+          display: flex;
12
+          align-items: center;
13
+        "
14
+      >
15
+        <div>
16
+          <el-input
17
+            size="small"
18
+            style="width: 200px; margin-left: 10px"
19
+            class="filter-item"
20
+            v-model="keyword"
21
+            placeholder="请输入患者姓名"
22
+          ></el-input>
23
 
23
 
24
-<!--          <el-date-picker-->
25
-<!--            size="small"-->
26
-<!--            v-model="start_time"-->
27
-<!--            prefix-icon="el-icon-date"-->
28
-<!--            :editable="false"-->
29
-<!--            style="width: 196px"-->
30
-<!--            type="date"-->
31
-<!--            placeholder="选择日期时间"-->
32
-<!--            align="right"-->
33
-<!--            format="yyyy-MM-dd"-->
34
-<!--            value-format="yyyy-MM-dd"-->
35
-<!--            @change="startTimeChange"-->
36
-<!--          ></el-date-picker-->
37
-<!--          >- -->
38
-<!--          <el-date-picker-->
39
-<!--            size="small"-->
40
-<!--            v-model="end_time"-->
41
-<!--            prefix-icon="el-icon-date"-->
42
-<!--            :editable="false"-->
43
-<!--            style="width: 196px"-->
44
-<!--            type="date"-->
45
-<!--            placeholder="选择日期时间"-->
46
-<!--            align="right"-->
47
-<!--            format="yyyy-MM-dd"-->
48
-<!--            value-format="yyyy-MM-dd"-->
49
-<!--            @change="endTimeChange"-->
50
-<!--          ></el-date-picker>-->
24
+          <el-date-picker
25
+            size="small"
26
+            v-model="start_time"
27
+            prefix-icon="el-icon-date"
28
+            :editable="false"
29
+            style="width: 196px"
30
+            type="date"
31
+            placeholder="选择日期时间"
32
+            align="right"
33
+            format="yyyy-MM-dd"
34
+            value-format="yyyy-MM-dd"
35
+            @change="startTimeChange"
36
+          ></el-date-picker
37
+          >-
38
+          <el-date-picker
39
+            size="small"
40
+            v-model="end_time"
41
+            prefix-icon="el-icon-date"
42
+            :editable="false"
43
+            style="width: 196px"
44
+            type="date"
45
+            placeholder="选择日期时间"
46
+            align="right"
47
+            format="yyyy-MM-dd"
48
+            value-format="yyyy-MM-dd"
49
+            @change="endTimeChange"
50
+          ></el-date-picker>
51
 
51
 
52
-<!--          <el-button-->
53
-<!--            size="small"-->
54
-<!--            class="filter-item"-->
55
-<!--            type="primary"-->
56
-<!--            icon="el-icon-search"-->
57
-<!--            @click="query"-->
58
-<!--            >查询</el-button-->
59
-<!--          >-->
60
-<!--        </div>-->
61
-<!--      </div>-->
62
-<!--      <el-table-->
63
-<!--        :row-style="{ color: '#303133' }"-->
64
-<!--        :header-cell-style="{-->
65
-<!--          backgroundColor: 'rgb(245, 247, 250)',-->
66
-<!--          color: '#606266',-->
67
-<!--        }"-->
68
-<!--        style="width: 1651px"-->
69
-<!--        :data="tableList"-->
70
-<!--        :class="signAndWeighBoxPatients"-->
71
-<!--        border-->
72
-<!--      >-->
73
-<!--        <el-table-column type="index" label="序号" align="center" width="250">-->
74
-<!--        </el-table-column>-->
75
-<!--        <el-table-column label="患者名称" align="center" width="300">-->
76
-<!--          <template slot-scope="scope">-->
77
-<!--            <span>{{scope.row.Name  ? scope.row.Name  : ""}}</span>-->
78
-<!--          </template>-->
79
-<!--        </el-table-column>-->
52
+          <el-button
53
+            size="small"
54
+            class="filter-item"
55
+            type="primary"
56
+            icon="el-icon-search"
57
+            @click="query"
58
+            >查询</el-button
59
+          >
60
+        </div>
61
+      </div>
62
+      <el-table
63
+        :row-style="{ color: '#303133' }"
64
+        :header-cell-style="{
65
+          backgroundColor: 'rgb(245, 247, 250)',
66
+          color: '#606266',
67
+        }"
68
+        style="width: 1651px"
69
+        :data="tableList"
70
+        :class="signAndWeighBoxPatients"
71
+        border
72
+      >
73
+        <el-table-column type="index" label="序号" align="center" width="250">
74
+        </el-table-column>
75
+        <el-table-column label="患者名称" align="center" width="300">
76
+          <template slot-scope="scope">
77
+            <span>{{scope.row.Name  ? scope.row.Name  : ""}}</span>
78
+          </template>
79
+        </el-table-column>
80
 
80
 
81
-<!--        <el-table-column label="开立医生" align="center" width="300">-->
82
-<!--          <template slot-scope="scope">-->
83
-<!--            <span>{{scope.row.DoctorName  ? scope.row.DoctorName  : ""}}</span>-->
84
-<!--          </template>-->
85
-<!--        </el-table-column>-->
86
-<!--        <el-table-column label="发药时间" align="center" width="400">-->
87
-<!--          <template slot-scope="scope">-->
88
-<!--            <span>{{scope.row.RecordDate  ? scope.row.RecordDate  : ""}}</span>-->
89
-<!--          </template>-->
90
-<!--        </el-table-column>-->
91
-<!--        <el-table-column label="操作" align="center" width="400">-->
92
-<!--          <template slot-scope="scope">-->
93
-<!--            <el-button type="primary" @click="views(scope.row)">查看</el-button>-->
94
-<!--          </template>-->
95
-<!--        </el-table-column>-->
96
-<!--      </el-table>-->
97
-<!--      <el-pagination-->
98
-<!--        @size-change="handleSizeChange"-->
99
-<!--        @current-change="handleCurrentChange"-->
100
-<!--        :page-sizes="[10, 50, 100, 200, 500, 1000]"-->
101
-<!--        :page-size="10"-->
102
-<!--        background-->
103
-<!--        align="right"-->
104
-<!--        style="margin-top: 20px"-->
105
-<!--        layout="total, sizes, prev, pager, next, jumper"-->
106
-<!--        :total="total"-->
107
-<!--      >-->
108
-<!--      </el-pagination>-->
109
-<!--    </div>-->
81
+        <el-table-column label="开立医生" align="center" width="300">
82
+          <template slot-scope="scope">
83
+            <span>{{scope.row.DoctorName  ? scope.row.DoctorName  : ""}}</span>
84
+          </template>
85
+        </el-table-column>
86
+        <el-table-column label="发药时间" align="center" width="400">
87
+          <template slot-scope="scope">
88
+            <span>{{scope.row.RecordDate  ? scope.row.RecordDate  : ""}}</span>
89
+          </template>
90
+        </el-table-column>
91
+        <el-table-column label="操作" align="center" width="400">
92
+          <template slot-scope="scope">
93
+            <el-button type="primary" @click="views(scope.row)">查看</el-button>
94
+          </template>
95
+        </el-table-column>
96
+      </el-table>
97
+      <el-pagination
98
+        @size-change="handleSizeChange"
99
+        @current-change="handleCurrentChange"
100
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
101
+        :page-size="10"
102
+        background
103
+        align="right"
104
+        style="margin-top: 20px"
105
+        layout="total, sizes, prev, pager, next, jumper"
106
+        :total="total"
107
+      >
108
+      </el-pagination>
109
+    </div>
110
 
110
 
111
-<!--    <details-print-->
112
-<!--      ref="detailsprint"-->
113
-<!--      :visibility="isVisibility"-->
114
-<!--      :propsTable="propsTable"-->
115
-<!--    >-->
116
-<!--    </details-print>-->
111
+    <details-print
112
+      ref="detailsprint"
113
+      :visibility="isVisibility"
114
+      :propsTable="propsTable"
115
+    >
116
+    </details-print>
117
 
117
 
118
-<!--  </div>-->
118
+  </div>
119
 </template>
119
 </template>
120
 
120
 
121
-<!--<script>-->
122
-<!--import detailsPrint from "./print/details.vue";-->
123
-<!--import BreadCrumb from "@/xt_pages/components/bread-crumb";-->
124
-<!--import {-->
125
-<!--  dispensingdetails,-->
126
-<!--  prescriptiondetails-->
127
-<!--} from "@/api/pharmacy"-->
128
-<!--const moment = require('moment')-->
129
-<!--export default {-->
130
-<!--  components: {-->
131
-<!--    detailsPrint,-->
132
-<!--    BreadCrumb,-->
133
-<!--  },-->
134
-<!--  data() {-->
135
-<!--    return {-->
136
-<!--      crumbs: [-->
137
-<!--        { path: false, name: "发药明细" },-->
138
-<!--        { path: "/Pharmacy/DispensingDetails", name: "发药明细" },-->
139
-<!--      ],-->
140
-<!--      keyword: "",-->
141
-<!--      tableList: [{}],-->
142
-<!--      signAndWeighBoxPatients: "sign-and-weigh-box-patients",-->
143
-<!--      start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),-->
144
-<!--      end_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),-->
145
-<!--      prescriptionList:[],//处方-->
146
-<!--      stat_order:[],//临时医嘱-->
147
-<!--      total: 0,-->
148
-<!--      page: 1,-->
149
-<!--      limit: 10,-->
150
-<!--    };-->
151
-<!--  },-->
152
-<!--  created() {-->
153
-<!--    this.init();-->
154
-<!--    this.query();-->
155
-<!--  },-->
156
-<!--  methods: {-->
157
-<!--    init(){-->
158
-<!--      this.page = 1;-->
159
-<!--      this.limit = 10;-->
160
-<!--      this.keyword = "";-->
161
-<!--    },-->
162
-<!--    query(){-->
163
-<!--      var params = {-->
164
-<!--        keyword: this.keyword,-->
165
-<!--        start_time: this.start_time,-->
166
-<!--        end_time: this.end_time,-->
167
-<!--        page: 1,-->
168
-<!--        limit: this.limit,-->
169
-<!--      }-->
170
-<!--      dispensingdetails(params).then((res) => {-->
171
-<!--        if (res.data.state == 1){-->
172
-<!--          this.tableList = res.data.data.list;-->
173
-<!--          this.total = res.data.data.total;-->
174
-<!--        }-->
175
-<!--      })-->
176
-<!--    },-->
177
-<!--    search(){-->
178
-<!--      console.log("this.start_time",this.start_time)-->
179
-<!--      console.log("this.end_time",this.end_time)-->
180
-<!--      var params = {-->
181
-<!--        keyword: this.keyword,-->
182
-<!--        start_time: this.start_time,-->
183
-<!--        end_time: this.end_time,-->
184
-<!--        page: this.page,-->
185
-<!--        limit: this.limit,-->
186
-<!--      }-->
187
-<!--      dispensingdetails(params).then((res) => {-->
188
-<!--        if (res.data.state == 1){-->
189
-<!--          this.tableList = res.data.data.list;-->
190
-<!--        }-->
191
-<!--      })-->
192
-<!--    },-->
121
+<script>
122
+import detailsPrint from "./print/details.vue";
123
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
124
+import {
125
+  dispensingdetails,
126
+  prescriptiondetails
127
+} from "@/api/pharmacy"
128
+const moment = require('moment')
129
+export default {
130
+  components: {
131
+    detailsPrint,
132
+    BreadCrumb,
133
+  },
134
+  data() {
135
+    return {
136
+      crumbs: [
137
+        { path: false, name: "药房管理" },
138
+        { path: "/Pharmacy/DispensingDetails", name: "发药明细" },
139
+      ],
140
+      keyword: "",
141
+      tableList: [{}],
142
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
143
+      start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
144
+      end_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
145
+      prescriptionList:[],//处方
146
+      stat_order:[],//临时医嘱
147
+      total: 0,
148
+      page: 1,
149
+      limit: 10,
150
+    };
151
+  },
152
+  created() {
153
+    this.init();
154
+    this.query();
155
+  },
156
+  methods: {
157
+    init(){
158
+      this.page = 1;
159
+      this.limit = 10;
160
+      this.keyword = "";
161
+    },
162
+    query(){
163
+      var params = {
164
+        keyword: this.keyword,
165
+        start_time: this.start_time,
166
+        end_time: this.end_time,
167
+        page: 1,
168
+        limit: this.limit,
169
+      }
170
+      dispensingdetails(params).then((res) => {
171
+        if (res.data.state == 1){
172
+          this.tableList = res.data.data.list;
173
+          this.total = res.data.data.total;
174
+        }
175
+      })
176
+    },
177
+    search(){
178
+      console.log("this.start_time",this.start_time)
179
+      console.log("this.end_time",this.end_time)
180
+      var params = {
181
+        keyword: this.keyword,
182
+        start_time: this.start_time,
183
+        end_time: this.end_time,
184
+        page: this.page,
185
+        limit: this.limit,
186
+      }
187
+      dispensingdetails(params).then((res) => {
188
+        if (res.data.state == 1){
189
+          this.tableList = res.data.data.list;
190
+        }
191
+      })
192
+    },
193
 
193
 
194
-<!--    // 查看-->
195
-<!--    views(data) {-->
196
-<!--      console.log("吱吱吱",data)-->
197
-<!--      this.$refs.detailsprint.show();-->
198
-<!--      this.$refs.detailsprint.drugdetails(data);-->
199
-<!--    },-->
200
-<!--    // 页表操作-->
201
-<!--    handleSizeChange(val) {-->
202
-<!--      this.limit = val;-->
203
-<!--      this.search();-->
204
-<!--    },-->
205
-<!--    handleCurrentChange(val) {-->
206
-<!--      this.page = val;-->
207
-<!--      this.search();-->
208
-<!--    },-->
209
-<!--  },-->
210
-<!--};-->
211
-<!--</script>-->
194
+    // 查看
195
+    views(data) {
196
+      console.log("吱吱吱",data)
197
+      this.$refs.detailsprint.show();
198
+      this.$refs.detailsprint.drugdetails(data);
199
+    },
200
+    // 页表操作
201
+    handleSizeChange(val) {
202
+      this.limit = val;
203
+      this.search();
204
+    },
205
+    handleCurrentChange(val) {
206
+      this.page = val;
207
+      this.search();
208
+    },
209
+  },
210
+};
211
+</script>
212
 
212
 
213
-<!--<style rel="stylesheet/css" lang="scss" scoped>-->
214
-<!--</style>-->
213
+<style rel="stylesheet/css" lang="scss" scoped>
214
+</style>

+ 242 - 168
src/xt_pages/Pharmacy/DrugDispensing.vue Zobrazit soubor

18
               format="yyyy-MM-dd"
18
               format="yyyy-MM-dd"
19
               value-format="yyyy-MM-dd"
19
               value-format="yyyy-MM-dd"
20
               placeholder="选择日期"
20
               placeholder="选择日期"
21
-              :change="testsss()"
21
+              @change="changeTimes()"
22
             >
22
             >
23
             </el-date-picker>
23
             </el-date-picker>
24
           </div>
24
           </div>
25
 
25
 
26
           <div class="list">
26
           <div class="list">
27
-            <el-radio-group v-model="state">
27
+            <el-radio-group v-model="state" @change="lala()">
28
               <el-radio :label="1">待发药</el-radio>
28
               <el-radio :label="1">待发药</el-radio>
29
               <el-radio :label="2">已发药</el-radio>
29
               <el-radio :label="2">已发药</el-radio>
30
             </el-radio-group>
30
             </el-radio-group>
46
             </el-button>
46
             </el-button>
47
           </div>
47
           </div>
48
 
48
 
49
-          <el-table
50
-            v-if="state == 1"
49
+          <el-table v-if="state == 1"
51
             :height="tableHeight"
50
             :height="tableHeight"
52
-            :data="tableData"
51
+            :data="waiting_drug"
53
             border
52
             border
54
             style="width: 100%"
53
             style="width: 100%"
55
             highlight-current-row
54
             highlight-current-row
56
-            ref="singleTable"
55
+            ref="table01"
57
             @current-change="handleCurrentChange"
56
             @current-change="handleCurrentChange"
58
           >
57
           >
59
             <el-table-column prop="name" label="名称" width="100">
58
             <el-table-column prop="name" label="名称" width="100">
60
                <template slot-scope="scope">
59
                <template slot-scope="scope">
61
-                {{scope.row.drug_name}}
60
+                {{scope.row.name}}
62
               </template>
61
               </template>
63
             </el-table-column>
62
             </el-table-column>
64
             <el-table-column prop="specifications" label="规格" width="100">
63
             <el-table-column prop="specifications" label="规格" width="100">
65
               <template slot-scope="scope">
64
               <template slot-scope="scope">
66
-                {{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
65
+                {{scope.row.specifications}}
67
               </template>
66
               </template>
68
             </el-table-column>
67
             </el-table-column>
69
             <el-table-column prop="stock" label="库存" width="100">
68
             <el-table-column prop="stock" label="库存" width="100">
70
                <template slot-scope="scope">
69
                <template slot-scope="scope">
71
-                {{getWarehoseInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}
70
+                {{scope.row.stock}}
72
               </template>
71
               </template>
73
             </el-table-column>
72
             </el-table-column>
74
           </el-table>
73
           </el-table>
76
           <el-table
75
           <el-table
77
             v-if="state == 2"
76
             v-if="state == 2"
78
             :height="tableHeight"
77
             :height="tableHeight"
79
-            :data="tableData"
78
+            :data="issued_drug"
80
             border
79
             border
81
             style="width: 100%"
80
             style="width: 100%"
82
             highlight-current-row
81
             highlight-current-row
83
-            @current-change="handleSelectionChangeOne"
84
-            ref="singleTable"
82
+            @current-change="handleCurrentChange"
83
+            ref="table02"
85
           >
84
           >
86
             <el-table-column prop="name" label="名称" width="100">
85
             <el-table-column prop="name" label="名称" width="100">
87
                <template slot-scope="scope">
86
                <template slot-scope="scope">
88
-                {{scope.row.drug_name}}
87
+                {{scope.row.name}}
89
               </template>
88
               </template>
90
             </el-table-column>
89
             </el-table-column>
91
             <el-table-column prop="specifications" label="规格" width="100">
90
             <el-table-column prop="specifications" label="规格" width="100">
92
               <template slot-scope="scope">
91
               <template slot-scope="scope">
93
-                {{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
92
+                {{scope.row.specifications}}
94
               </template>
93
               </template>
95
             </el-table-column>
94
             </el-table-column>
96
             <el-table-column prop="stock" label="库存" width="100">
95
             <el-table-column prop="stock" label="库存" width="100">
97
                <template slot-scope="scope">
96
                <template slot-scope="scope">
98
-                {{getWarehoseInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}
97
+                {{scope.row.stock}}
99
               </template>
98
               </template>
100
             </el-table-column>
99
             </el-table-column>
101
           </el-table>
100
           </el-table>
103
       </div>
102
       </div>
104
       <div class="mainRight">
103
       <div class="mainRight">
105
         <div class="titlelist">
104
         <div class="titlelist">
105
+<!--          <el-button type="primary" @click="tt">调试</el-button>-->
106
           <el-button type="primary" @click="dispense" v-if="state == 1">发药</el-button>
106
           <el-button type="primary" @click="dispense" v-if="state == 1">发药</el-button>
107
           <el-button type="primary" @click="toPrint">打印</el-button>
107
           <el-button type="primary" @click="toPrint">打印</el-button>
108
-          <el-button type="primary" @click="toSetting">设置</el-button>
108
+<!--          <el-button @click="tt">调试</el-button>-->
109
+<!--          <el-button type="primary" @click="toSetting">设置</el-button>-->
109
         </div>
110
         </div>
110
         <el-divider></el-divider>
111
         <el-divider></el-divider>
111
         <div>
112
         <div>
112
           <el-table
113
           <el-table
113
             :height="tableHeight"
114
             :height="tableHeight"
114
-            :data="tableData_list"
115
+            :data="tableData"
115
             border
116
             border
116
             style="width: 1328px"
117
             style="width: 1328px"
117
             @selection-change="handleSelectionChange"
118
             @selection-change="handleSelectionChange"
118
              v-if="state == 1"
119
              v-if="state == 1"
119
           >
120
           >
120
-            >
121
             <el-table-column type="selection" width="55"> </el-table-column>
121
             <el-table-column type="selection" width="55"> </el-table-column>
122
             <el-table-column type="index" label="序号" width="120" align="center">
122
             <el-table-column type="index" label="序号" width="120" align="center">
123
-              <template slot-scope="scope">
124
-                {{scope.$index + 1}}
125
-              </template>
126
             </el-table-column>
123
             </el-table-column>
127
             <el-table-column prop="name" label="患者名称" width="180" align="center">
124
             <el-table-column prop="name" label="患者名称" width="180" align="center">
128
                 <template slot-scope="scope">
125
                 <template slot-scope="scope">
129
-                 {{getPatientName(scope.row.patient_id)}}
126
+                 {{scope.row.name}}
130
               </template>
127
               </template>
131
             </el-table-column>
128
             </el-table-column>
132
             <el-table-column prop="name" label="单次用量" width="170" align="center">
129
             <el-table-column prop="name" label="单次用量" width="170" align="center">
133
                <template  slot-scope="scope">
130
                <template  slot-scope="scope">
134
-                 {{scope.row.single_dose}}
131
+                 {{scope.row.single_dosage}}
135
                </template>
132
                </template>
136
             </el-table-column>
133
             </el-table-column>
137
             <el-table-column prop="name" label="用法" width="160" align="center">
134
             <el-table-column prop="name" label="用法" width="160" align="center">
138
                <template  slot-scope="scope">
135
                <template  slot-scope="scope">
139
-                 {{scope.row.delivery_way}}
136
+                 {{scope.row.usage}}
140
                </template>
137
                </template>
141
             </el-table-column>
138
             </el-table-column>
142
             <el-table-column prop="name" label="频率" width="160" align="center">
139
             <el-table-column prop="name" label="频率" width="160" align="center">
143
                 <template  slot-scope="scope">
140
                 <template  slot-scope="scope">
144
-                 {{scope.row.execution_frequency}}
141
+                 {{scope.row.frequency}}
145
                </template>
142
                </template>
146
             </el-table-column>
143
             </el-table-column>
147
             <el-table-column prop="name" label="天数" width="160" align="center">
144
             <el-table-column prop="name" label="天数" width="160" align="center">
148
                <template  slot-scope="scope">
145
                <template  slot-scope="scope">
149
-                 {{scope.row.day}}
146
+                 {{scope.row.days}}
150
                </template>
147
                </template>
151
             </el-table-column>
148
             </el-table-column>
152
             <el-table-column prop="name" label="总量" width="160" align="center">
149
             <el-table-column prop="name" label="总量" width="160" align="center">
153
                 <template  slot-scope="scope">
150
                 <template  slot-scope="scope">
154
-                 {{scope.row.prescribing_number}}
151
+                 {{scope.row.total}}
155
                </template>
152
                </template>
156
             </el-table-column>
153
             </el-table-column>
157
             <el-table-column prop="name" label="数据来源" width="162" align="center">
154
             <el-table-column prop="name" label="数据来源" width="162" align="center">
158
                 <template  slot-scope="scope">
155
                 <template  slot-scope="scope">
159
-                 <span v-if="scope.row.type == 1">血透</span>
160
-                 <span v-if="scope.row.type == 2">HIS</span>
156
+                  {{scope.row.data_sources}}
161
                </template>
157
                </template>
162
             </el-table-column>
158
             </el-table-column>
163
           </el-table>
159
           </el-table>
164
-
165
-
166
-            <el-table
160
+        </div>
161
+        <div>
162
+          <el-table
167
             :height="tableHeight"
163
             :height="tableHeight"
168
-            :data="tableList"
164
+            :data="tableData"
169
             border
165
             border
170
             style="width: 1328px"
166
             style="width: 1328px"
171
             v-if="state == 2"
167
             v-if="state == 2"
172
           >
168
           >
173
-            >
174
-            <el-table-column type="selection" width="55"> </el-table-column>
169
+<!--            <el-table-column type="selection" width="55"> </el-table-column>-->
175
             <el-table-column type="index" label="序号" width="120" align="center">
170
             <el-table-column type="index" label="序号" width="120" align="center">
176
-              <template slot-scope="scope">
177
-                {{scope.$index + 1}}
178
-              </template>
179
             </el-table-column>
171
             </el-table-column>
180
             <el-table-column prop="name" label="患者名称" width="180" align="center">
172
             <el-table-column prop="name" label="患者名称" width="180" align="center">
181
                 <template slot-scope="scope">
173
                 <template slot-scope="scope">
182
-                 {{getPatientName(scope.row.patient_id)}}
174
+                 {{scope.row.name}}
183
               </template>
175
               </template>
184
             </el-table-column>
176
             </el-table-column>
185
             <el-table-column prop="name" label="单次用量" width="170" align="center">
177
             <el-table-column prop="name" label="单次用量" width="170" align="center">
186
                <template  slot-scope="scope">
178
                <template  slot-scope="scope">
187
-                 {{scope.row.single_dose}}
179
+                 {{scope.row.single_dosage}}
188
                </template>
180
                </template>
189
             </el-table-column>
181
             </el-table-column>
190
             <el-table-column prop="name" label="用法" width="160" align="center">
182
             <el-table-column prop="name" label="用法" width="160" align="center">
191
                <template  slot-scope="scope">
183
                <template  slot-scope="scope">
192
-                 {{scope.row.delivery_way}}
184
+                 {{scope.row.usage}}
193
                </template>
185
                </template>
194
             </el-table-column>
186
             </el-table-column>
195
             <el-table-column prop="name" label="频率" width="160" align="center">
187
             <el-table-column prop="name" label="频率" width="160" align="center">
196
                 <template  slot-scope="scope">
188
                 <template  slot-scope="scope">
197
-                 {{scope.row.execution_frequency}}
189
+                 {{scope.row.frequency}}
198
                </template>
190
                </template>
199
             </el-table-column>
191
             </el-table-column>
200
             <el-table-column prop="name" label="天数" width="160" align="center">
192
             <el-table-column prop="name" label="天数" width="160" align="center">
201
                <template  slot-scope="scope">
193
                <template  slot-scope="scope">
202
-                 {{scope.row.day}}
194
+                 {{scope.row.days}}
203
                </template>
195
                </template>
204
             </el-table-column>
196
             </el-table-column>
205
             <el-table-column prop="name" label="总量" width="160" align="center">
197
             <el-table-column prop="name" label="总量" width="160" align="center">
206
                 <template  slot-scope="scope">
198
                 <template  slot-scope="scope">
207
-                 {{scope.row.prescribing_number}}
199
+                 {{scope.row.total}}
208
                </template>
200
                </template>
209
             </el-table-column>
201
             </el-table-column>
210
             <el-table-column prop="name" label="数据来源" width="162" align="center">
202
             <el-table-column prop="name" label="数据来源" width="162" align="center">
211
                 <template  slot-scope="scope">
203
                 <template  slot-scope="scope">
212
-                 <span v-if="scope.row.type == 1">血透</span>
213
-                 <span v-if="scope.row.type == 2">HIS</span>
204
+                  {{scope.row.data_sources}}
214
                </template>
205
                </template>
215
             </el-table-column>
206
             </el-table-column>
207
+              <el-table-column prop="name" label="领药人" width="160" align="center">
208
+                <template  slot-scope="scope">
209
+                  {{scope.row.people}}
210
+                </template>
211
+              </el-table-column>
216
           </el-table>
212
           </el-table>
217
-
218
-
219
         </div>
213
         </div>
220
-        <div style="margin-top">领料人:
214
+        <div style="margin-top" v-if="state == 1">领药人:
221
           <el-select v-model="admin_user_id" placeholder="请选择">
215
           <el-select v-model="admin_user_id" placeholder="请选择">
222
             <el-option
216
             <el-option
223
               v-for="item in doctorList"
217
               v-for="item in doctorList"
262
 import drugPrint from "./print/drugPrint.vue";
256
 import drugPrint from "./print/drugPrint.vue";
263
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
257
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
264
 import { getTodayAdviceList,getPharmacyBaseDrug,updatePharmacyBaseDrug,SaveSetting,getPharmacyConfig,getUserdDrugList } from "@/api/his/advice";
258
 import { getTodayAdviceList,getPharmacyBaseDrug,updatePharmacyBaseDrug,SaveSetting,getPharmacyConfig,getUserdDrugList } from "@/api/his/advice";
265
-// import {
266
-//   waitingdrug,
267
-//   issueddrugs,
268
-//   getpharmacycontent
269
-// } from "@/api/pharmacy"
259
+import {
260
+  dispensemedicine,
261
+  waitingmedicine,
262
+  getpatientswithdrugs,
263
+  medicinedeparture,
264
+  getcurrentname
265
+} from "@/api/pharmacy"
270
 const moment = require('moment')
266
 const moment = require('moment')
271
 export default {
267
 export default {
272
   components: {
268
   components: {
276
   data() {
272
   data() {
277
     return {
273
     return {
278
       crumbs: [
274
       crumbs: [
279
-        { path: false, name: "药品发药" },
275
+        { path: false, name: "药房管理" },
280
         { path: "/Pharmacy/DrugDispensing", name: "药品发药" },
276
         { path: "/Pharmacy/DrugDispensing", name: "药品发药" },
281
       ],
277
       ],
282
       tableHeight: 400,
278
       tableHeight: 400,
296
       isVisibility:"",
292
       isVisibility:"",
297
       propsTable:"",
293
       propsTable:"",
298
       doctorList:[],
294
       doctorList:[],
299
-      admin_user_id:this.$store.getters.xt_user.user.id,
295
+      admin_user_id:0,
296
+      waiting_drug:[],//待发药列表
297
+      issued_drug:[],//已发药列表
298
+      currentRow:null,
299
+      tmp:0,
300
     };
300
     };
301
   },
301
   },
302
 
302
 
303
   methods: {
303
   methods: {
304
-    testsss(){
305
-      console.log("time",this.start_time);
304
+    tt(){
305
+      console.log("this.currentRow",this.currentRow)
306
+      this.$router.go(0)
307
+    },
308
+    async fun3(){
309
+      console.log("fun3")
310
+      this.fun1().then(val => {
311
+        this.fun2();
312
+      })
313
+    },
314
+    async fun4(tps){
315
+      console.log("fun3",tps)
316
+      this.fun1().then(val => {
317
+        console.log("this.issued_drug",this.issued_drug)
318
+        for(let i = 0;i < this.issued_drug.length;i++){
319
+          if(tps == this.issued_drug[i].id){
320
+            this.$refs.table02.setCurrentRow(this.issued_drug[i]);
321
+            this.handleCurrentChange(this.issued_drug[i])
322
+          }
323
+        }
324
+      })
325
+    },
326
+    async fun5(tps){
327
+      console.log("fun3",tps)
328
+      this.fun1().then(val => {
329
+        console.log("this.issued_drug",this.waiting_drug)
330
+        for(let i = 0;i < this.waiting_drug.length;i++){
331
+          if(tps == this.waiting_drug[i].id){
332
+            this.$refs.table01.setCurrentRow(this.waiting_drug[i]);
333
+            this.handleCurrentChange(this.waiting_drug[i])
334
+          }
335
+        }
336
+      })
337
+    },
338
+    changeTimes(){
339
+      // alert("aa")
340
+      // this.getdruglist();
341
+      this.fun3();
306
     },
342
     },
307
     //初始化
343
     //初始化
308
     init(){
344
     init(){
309
-
345
+      this.state = 1
346
+      this.tableData = null
347
+      this.currentRow = null
348
+    },
349
+    lala(){
350
+      this.currentRow = null
351
+      this.tableData = null
352
+      this.selectedbydefault()
310
     },
353
     },
311
      searchAction() {
354
      searchAction() {
312
-      this.getlist();
355
+      // this.getlist();
356
+       this.tableData = null
357
+       this.currentRow = null
358
+       this.getdruglist();
313
     },
359
     },
314
     // 跳转打印页面
360
     // 跳转打印页面
315
     toPrint() {
361
     toPrint() {
316
-      // this.$router.push({ path: "/Pharmacy/print/patientPrint" });
317
-      this.$refs.drugprint.show();
362
+
363
+      if (this.state == 1 && this.multipleSelection.length == 0){
364
+        this.$message.error("未选择任何数据");
365
+        return
366
+      }
367
+      if (this.state == 2 && this.tableData == null){
368
+          this.$message.error("未选择任何数据");
369
+          return
370
+      }
371
+      this.$refs.drugprint.show(this.tableData,this.currentRow,this.state,this.multipleSelection);
318
     },
372
     },
373
+    //列表选择
319
     handleSelectionChange(val) {
374
     handleSelectionChange(val) {
320
       this.multipleSelection = val;
375
       this.multipleSelection = val;
321
     },
376
     },
322
-    handleSelectionChangeOne(val){
323
-      this.tableList = []
324
-      this.getUserlist(val.id)
377
+    //默认选中
378
+    selectedbydefault(){
379
+      if(this.state == 1 && this.waiting_drug.length > 0){
380
+        this.$refs.table01.setCurrentRow(this.waiting_drug[0]);
381
+        this.handleCurrentChange(this.waiting_drug[0])
382
+      }
383
+      if(this.state == 2 && this.issued_drug.length >0){
384
+        this.$refs.table02.setCurrentRow(this.issued_drug[0]);
385
+        this.handleCurrentChange(this.issued_drug[0])
386
+      }
387
+    },
388
+    //包装selectedbydefault
389
+    fun2(){
390
+      console.log("3333333this.waitmount_data",this.waiting_drug)
391
+      // return new Promise((resolve, reject) => {
392
+      if(this.state == 1 && this.waiting_drug.length > 0){
393
+        this.$refs.table01.setCurrentRow(this.waiting_drug[0]);
394
+        this.handleCurrentChange(this.waiting_drug[0])
395
+      }
396
+      if(this.state == 2 && this.issued_drug.length >0){
397
+        this.$refs.table02.setCurrentRow(this.issued_drug[0]);
398
+        this.handleCurrentChange(this.issued_drug[0])
399
+      }
400
+      // });
325
     },
401
     },
326
     // 药品发药
402
     // 药品发药
327
     dispense() {
403
     dispense() {
328
-      var blood_ids = []
329
-      var his_ids = []
330
-      var bloodStr = ""
331
-      var hisStr = ""
332
-      for(let i=0;i<this.tableData.length;i++){
333
-        if(this.tableData[i].type == 1){
334
-          blood_ids.push(this.tableData[i].id)
335
-        }
336
-        if(this.tableData[i].type == 2){
337
-          his_ids.push(this.tableData[i].id)
338
-        }
404
+      var tps = this.currentRow.id;
405
+      if(this.multipleSelection.length < 1){
406
+        this.$message.error("未选择任何信息")
407
+        return
408
+      }
409
+      var tmp = "";
410
+      console.log("初始值",tmp)
411
+      for (var i=0;i < this.multipleSelection.length;i++){
412
+        tmp = tmp + this.multipleSelection[i].id + ","
339
       }
413
       }
340
-      bloodStr = blood_ids.join(",")
341
-      hisStr =  his_ids.join(",")
342
       var params = {
414
       var params = {
343
-        bloodStr:bloodStr,
344
-        hisStr:hisStr,
345
-        admin_user_id:this.admin_user_id,
415
+        creater: this.admin_user_id,
416
+        ids: tmp,
346
       }
417
       }
347
-      this.$confirm("确定是否对该药品进行发药?", "患者发药", {
348
-        confirmButtonText: "确 定",
349
-        cancelButtonText: "取 消",
350
-        type: "warning",
351
-      }).then(() => {
352
-        updatePharmacyBaseDrug(params).then(response=>{
353
-           if(response.data.state == 1){
354
-           var msg = response.data.data.msg
355
-           var medical =  response.data.data.medical
356
-           if(msg === 1){
357
-             this.$message.success("发药成功!")
358
-           }
359
-           if(msg == 2 || msg ===3){
360
-             this.$message.error("库存不足")
361
-           }
362
-         }
363
-        })
364
-      }).catch(() => {});
418
+      medicinedeparture(params).then((res) => {
419
+        if (res.data.state == 1){
420
+          this.$message.success("操作成功")
421
+          this.getdruglist();
422
+          //刷新列表
423
+          this.handleCurrentChange(this.currentRow);
424
+          this.fun4(tps);
425
+          this.state = 2;
426
+        }else{
427
+          this.$message.error("操作失败:" + res.data.msg)
428
+          //刷新列表
429
+          this.handleCurrentChange(this.currentRow);
430
+          this.fun5(tps);
431
+          this.state = 1;
432
+        }
433
+      })
365
     },
434
     },
366
-
367
-    // 药品退药
368
-    endispense() {
369
-      var params = {};
370
-      this.$confirm("确定是否对该药品进行退药?", "患者退药", {
371
-        confirmButtonText: "确 定",
372
-        cancelButtonText: "取 消",
373
-        type: "warning",
435
+    //获取药品列表
436
+    getdruglist(){
437
+      var params = {
438
+        keyword: this.keywords,
439
+        time: this.start_time,
440
+      }
441
+      waitingmedicine(params).then((res) => {
442
+        if (res.data.state == 1){
443
+          this.waiting_drug = res.data.data.list
444
+        }
445
+      })
446
+      dispensemedicine(params).then((res) => {
447
+        if (res.data.state == 1){
448
+          this.issued_drug = res.data.data.list
449
+        }
374
       })
450
       })
375
-        .then(() => {})
376
-        .catch(() => {});
451
+    },
452
+    async fun1(){
453
+      var params = {
454
+        keyword: this.keywords,
455
+        time: this.start_time,
456
+      }
457
+      await waitingmedicine(params).then((res) => {
458
+        if (res.data.state == 1){
459
+          this.waiting_drug = res.data.data.list
460
+        }
461
+        console.log("fun1lil1111i")
462
+      })
463
+      await dispensemedicine(params).then((res) => {
464
+        if (res.data.state == 1){
465
+          this.issued_drug = res.data.data.list
466
+        }
467
+        console.log("fun122222222")
468
+      })
469
+      console.log("fun1")
377
     },
470
     },
378
 
471
 
472
+    morencreatename(){
473
+      var param ={}
474
+      getcurrentname(param).then((res) => {
475
+        console.log("res(药)",res)
476
+        if (res.data.state == 1){
477
+          this.admin_user_id = res.data.data.list;
478
+          console.log("this.admin_user_id(药)",this.admin_user_id)
479
+        }
480
+      });
481
+    },
482
+    //获取领药人选项
379
     getlist(){
483
     getlist(){
380
       var params = {
484
       var params = {
381
         start_time:this.start_time,
485
         start_time:this.start_time,
383
       }
487
       }
384
       getTodayAdviceList(params).then(response=>{
488
       getTodayAdviceList(params).then(response=>{
385
          if(response.data.state == 1){
489
          if(response.data.state == 1){
386
-           var list =  response.data.data.list
387
-           this.$refs.singleTable.setCurrentRow(list[0])
388
-           this.tableData = list
389
-           var doctorlist = response.data.data.doctorlist
390
-           this.doctorList = doctorlist
490
+           this.doctorList = response.data.data.doctorlist
491
+           console.log("this.admin_user_id(药2)",this.admin_user_id)
492
+           // this.admin_user_id = this.doctorList[0].admin_user_id
493
+           // this.admin_user_id = this.tmp
391
          }
494
          }
392
       })
495
       })
393
     },
496
     },
394
-   getWarehoseInfo(arr, max_unit, min_unit, min_number) {
395
-      var total = 0;
396
-      var max_str = "";
397
-      var min_str = "";
398
-      if (arr.length > 0) {
399
-        for (let i = 0; i < arr.length; i++) {
400
-          total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
401
-        }
497
+   //  //获取药品的患者信息
498
+    informationofdrugs(val){
499
+      var params = {
500
+        // patient_id: this.currentRow.
402
       }
501
       }
403
-      if (total < min_number) {
404
-        min_str = total + min_unit;
502
+    },
503
+    handleCurrentChange(val) {
504
+      this.currentRow = val;
505
+      if(this.state == 1){
506
+        this.getdrugsdetails(0)
405
       }
507
       }
406
-      if (total == 0) {
407
-        min_str = "";
408
-        max_str = "";
508
+      if (this.state == 2){
509
+        this.getdrugsdetails(1)
409
       }
510
       }
410
-      if (total >= min_number) {
411
-        if (parseInt(total / min_number) != 0) {
412
-          max_str = parseInt(total / min_number) + max_unit;
413
-        }
414
-        if (total % min_number != 0) {
415
-          min_str = (total % min_number) + min_unit;
416
-        }
417
-      }
418
-      return max_str + min_str;
419
-    },
420
-
421
-    handleCurrentChange(row) {
422
-      this.getPharmacyBaseDrug(row.id)
423
     },
511
     },
424
-    getPharmacyBaseDrug(drug_id){
512
+    getdrugsdetails(val){
425
       var params = {
513
       var params = {
426
-        start_time:this.start_time,
427
-        drug_id:drug_id,
514
+        drug_id:this.currentRow.id,
515
+        is_medicine:val,
516
+        time:this.start_time,
428
       }
517
       }
429
-      getPharmacyBaseDrug(params).then(response=>{
430
-        if(response.data.state == 1){
431
-           var advicelist = response.data.data.advicelist
432
-           for(let i=0;i<advicelist.length;i++){
433
-             advicelist[i].type = 1
434
-             advicelist[i].day = " "
435
-             this.tableData_list.push(advicelist[i])
436
-           }
437
-           var hisAdviceList = response.data.data.hisAdviceList
438
-           for(let i=0;i<hisAdviceList.length;i++){
439
-             hisAdviceList[i].type = 2
440
-             this.tableData_list.push(hisAdviceList[i])
441
-           }
442
-           var patient = response.data.data.patient
443
-           this.patientList = patient
518
+      getpatientswithdrugs(params).then((res) => {
519
+        if (res.data.state == 1){
520
+          this.tableData = res.data.data.list;//列表数据
521
+        }else {
522
+          this.$message.error(res.data.msg);
444
         }
523
         }
445
       })
524
       })
446
     },
525
     },
447
-    getPatientName(id){
448
-       var name = ""
449
-       for(let i=0;i<this.patientList.length;i++){
450
-          if(id == this.patientList[i].id){
451
-             name = this.patientList[i].name
452
-          }
453
-       }
454
-       return name
455
-    },
526
+
456
     toSetting(){
527
     toSetting(){
457
       getPharmacyConfig().then(response=>{
528
       getPharmacyConfig().then(response=>{
458
         if(response.data.state == 1){
529
         if(response.data.state == 1){
500
   },
571
   },
501
   created() {
572
   created() {
502
     this.init();
573
     this.init();
503
-    this.getlist()
574
+    this.morencreatename();
575
+    this.getlist();
576
+    // this.getdruglist();
577
+    this.fun3();
504
   },
578
   },
505
 };
579
 };
506
 </script>
580
 </script>

+ 360 - 45
src/xt_pages/Pharmacy/PatientDispensing.vue Zobrazit soubor

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

+ 102 - 60
src/xt_pages/Pharmacy/print/details.vue Zobrazit soubor

1
-<template>
1
+<template><!--发药明细详情-->
2
   <el-dialog
2
   <el-dialog
3
-    title="打印"
3
+    title="详情"
4
     :visible.sync="visibility"
4
     :visible.sync="visibility"
5
     :close-on-click-modal="isClose"
5
     :close-on-click-modal="isClose"
6
     :close-on-press-escape="isClose"
6
     :close-on-press-escape="isClose"
7
   >
7
   >
8
-    <el-button type="primary" @click="print" class="print_style"
9
-      >打印</el-button
10
-    >
8
+<!--    <el-button type="primary" @click="print" class="print_style">详情</el-button>-->
9
+<!--    <el-button  @click="lili" >调试</el-button>-->
11
     <div id="dialysis-print-box-1" class="dialysis-print-box-1">
10
     <div id="dialysis-print-box-1" class="dialysis-print-box-1">
12
       <!-- <div class="list_title">
11
       <!-- <div class="list_title">
13
         <div>药品名称:</div>
12
         <div>药品名称:</div>
15
         <div>发药状态:</div>
14
         <div>发药状态:</div>
16
         <div v-if="state==2">领药人:</div>
15
         <div v-if="state==2">领药人:</div>
17
       </div> -->
16
       </div> -->
18
-      <el-tabs v-model="activeName" @tab-click="handleClick">
19
-        <el-tab-pane label="处方详情" name="first">
20
-          <el-tabs v-model="editableTabsValue" type="card">
21
-            <el-tab-pane
22
-              :key="item.name"
23
-              v-for="(item, index) in editableTabs"
24
-              :label="item.title"
25
-            >
26
-              Rp
27
-              <el-table
17
+      <el-table
28
                 style="width: 1020px; margin: 0 auto"
18
                 style="width: 1020px; margin: 0 auto"
29
-                :data="tableData"
19
+                :data="list"
30
                 border
20
                 border
31
                 max-height="450"
21
                 max-height="450"
32
                 :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
22
                 :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
33
               >
23
               >
34
-                <el-table-column prop="name" label="名称" width="160" align="center">
35
-                </el-table-column>
36
-                 <el-table-column prop="group" label="组" width="100" align="center">
24
+                <el-table-column prop="Drugname" label="名称" width="160" align="center">
25
+                  <template slot-scope="scope">
26
+                    <span>{{scope.row.Drugname  ? scope.row.Drugname  : ""}}</span>
27
+                  </template>
37
                 </el-table-column>
28
                 </el-table-column>
38
                 <el-table-column prop="SingleDosage" label="单次用量" width="100" align="center">
29
                 <el-table-column prop="SingleDosage" label="单次用量" width="100" align="center">
30
+                  <template slot-scope="scope">
31
+                    <span>{{scope.row.SingleDosage  ? scope.row.SingleDosage  : ""}}</span>
32
+                  </template>
39
                </el-table-column>
33
                </el-table-column>
40
-                <el-table-column prop="use" label="用法" width="120" align="center">
34
+                <el-table-column prop="Usage" label="用法" width="120" align="center">
35
+                  <template slot-scope="scope">
36
+                    <span>{{scope.row.Usage  ? scope.row.Usage  : ""}}</span>
37
+                  </template>
41
                 </el-table-column>
38
                 </el-table-column>
42
-                <el-table-column prop="frequency" label="频率" width="120" align="center">
39
+                <el-table-column prop="Frequency" label="频率" width="120" align="center">
40
+                  <template slot-scope="scope">
41
+                    <span>{{scope.row.Frequency  ? scope.row.Frequency  : ""}}</span>
42
+                  </template>
43
                 </el-table-column>
43
                 </el-table-column>
44
-                <el-table-column prop="day" label="天数" width="120" align="center">
44
+                <el-table-column prop="Days" label="天数" width="120" align="center">
45
+                  <template slot-scope="scope">
46
+                    <span>{{scope.row.Days  ? scope.row.Days  : ""}}</span>
47
+                  </template>
45
                 </el-table-column>
48
                 </el-table-column>
46
-                <el-table-column prop="amount" label="总量" width="90" align="center">
49
+                <el-table-column prop="Total" label="总量" width="90" align="center">
50
+                  <template slot-scope="scope">
51
+                    <span>{{scope.row.Total  ? scope.row.Total  : ""}}</span>
52
+                  </template>
47
                 </el-table-column>
53
                 </el-table-column>
48
-                <el-table-column prop="price" label="单价" width="100" align="center">
54
+                <el-table-column prop="UnitPrice" label="单价" width="100" align="center">
55
+                  <template slot-scope="scope">
56
+                    <span>{{scope.row.UnitPrice  ? scope.row.UnitPrice  : ""}}</span>
57
+                  </template>
49
                 </el-table-column>
58
                 </el-table-column>
50
-                <el-table-column prop="tips" label="备注" width="120" align="center">
59
+                <el-table-column prop="Remarks" label="备注" width="120" align="center">
60
+                  <template slot-scope="scope">
61
+                    <span>{{scope.row.Remarks  ? scope.row.Remarks  : ""}}</span>
62
+                  </template>
51
                 </el-table-column>
63
                 </el-table-column>
52
               </el-table>
64
               </el-table>
53
-            </el-tab-pane>
54
-          </el-tabs>
55
-        </el-tab-pane>
56
-        <el-tab-pane label="病历详情" name="second">病历详情</el-tab-pane>
57
-      </el-tabs>
65
+<!--        <el-tab-pane label="病历详情" name="second">病历详情</el-tab-pane>-->
58
     </div>
66
     </div>
59
   </el-dialog>
67
   </el-dialog>
60
 </template>
68
 </template>
62
 import Vue from "vue";
70
 import Vue from "vue";
63
 import print from "print-js";
71
 import print from "print-js";
64
 import printutils from "./print.js";
72
 import printutils from "./print.js";
73
+import {
74
+  prescriptiondetails
75
+} from "@/api/pharmacy"
65
 
76
 
66
 export default {
77
 export default {
67
   data() {
78
   data() {
71
       isClose: false,
82
       isClose: false,
72
       activeName: "first",
83
       activeName: "first",
73
       editableTabsValue: "2",
84
       editableTabsValue: "2",
74
-      editableTabs: [
75
-        {
76
-          title: "处方1",
77
-        },
78
-        {
79
-          title: "处方2",
80
-        },
81
-      ],
85
+      editableTabs: [],//名字
86
+      // dialysisTabs: [],//名字
87
+      dialysisName:"",
82
       tabIndex: 2,
88
       tabIndex: 2,
89
+      list:[],
83
     };
90
     };
84
   },
91
   },
85
   props: {
92
   props: {
103
         }
110
         }
104
       }
111
       }
105
     },
112
     },
113
+    init(){
114
+      console.log("初始化中。。。。。。。。。。")
115
+      this.dialysisName = "";
116
+      this.list = [];
117
+      this.editableTabs = [];
118
+    },
106
     show: function () {
119
     show: function () {
107
       this.visibility = true;
120
       this.visibility = true;
121
+      console.log("this.visibility",this.visibility)
122
+      this.init();
123
+    },
124
+    lili(){
125
+      console.log("this.list",this.list)
126
+      let v = [];
127
+      //key
128
+      for (let k in this.list){
129
+        v.push(k);
130
+        console.log("k",k)
131
+        console.log("v",this.list[k])
132
+        console.log("editableTabs",this.editableTabs)
133
+        for(let i = 0;i < this.list[k].length;i++){
134
+          this.editableTabs.push(this.list[k][i])
135
+        }
136
+      }
137
+
138
+    },
139
+    //发药明细详情
140
+    drugdetails(data){
141
+      console.log("aaaaaaaaaaaaa")
142
+      var params = {
143
+        patient_id: data.PatientID,
144
+        record_date: data.RecordTime,
145
+      }
146
+      prescriptiondetails(params).then((res) => {
147
+        if (res.data.state == 1){
148
+            this.list = res.data.data.list;
149
+            this.lili();
150
+        }else{
151
+          this.$message.error(res.data.msg);
152
+        }
153
+      })
154
+
108
     },
155
     },
109
 
156
 
110
     comfirm: function (formName) {
157
     comfirm: function (formName) {
124
       Vue.prototype.printJson = printutils.printJson;
171
       Vue.prototype.printJson = printutils.printJson;
125
       this.printJson({
172
       this.printJson({
126
         // title: ``, // 打印出来的标题
173
         // title: ``, // 打印出来的标题
127
-        data: this.tableData, // 需要打印的数据
174
+        data: this.list, // 需要打印的数据
128
         serial: false, // 是否需要打印序列号
175
         serial: false, // 是否需要打印序列号
129
         fields: [
176
         fields: [
130
           // 需要打印的字段
177
           // 需要打印的字段
131
 
178
 
132
-          "name",
133
-          "group",
179
+          "Drugname",
134
           "SingleDosage",
180
           "SingleDosage",
135
-          "use",
136
-          "frequency",
137
-          "day",
138
-          "amount",
139
-          "price",
140
-          "tips",
181
+          "Usage",
182
+          "Frequency",
183
+          "Days",
184
+          "Total",
185
+          "UnitPrice",
186
+          "Remarks",
141
         ],
187
         ],
142
         properties: [
188
         properties: [
143
           // 需要打印的字段对应的表头名
189
           // 需要打印的字段对应的表头名
144
 
190
 
145
           {
191
           {
146
-            field: "name",
192
+            field: "Drugname",
147
             displayName: "名称",
193
             displayName: "名称",
148
-          },
149
-            {
150
-            field: "group",
151
-            displayName: "组",
152
           },
194
           },
153
           {
195
           {
154
             field: "SingleDosage",
196
             field: "SingleDosage",
155
-            displayName: "单用量",
197
+            displayName: "单次用量",
156
           },
198
           },
157
           {
199
           {
158
-            field: "use",
200
+            field: "Usage",
159
             displayName: "用法",
201
             displayName: "用法",
160
           },
202
           },
161
           {
203
           {
162
-            field: "frequency",
204
+            field: "Frequency",
163
             displayName: "频率",
205
             displayName: "频率",
164
           },
206
           },
165
           {
207
           {
166
-            field: "day",
208
+            field: "Days",
167
             displayName: "天数",
209
             displayName: "天数",
168
           },
210
           },
169
           {
211
           {
170
-            field: "amount",
212
+            field: "Total",
171
             displayName: "总量",
213
             displayName: "总量",
172
           },
214
           },
173
           {
215
           {
174
-            field: "price",
216
+            field: "UnitPrice",
175
             displayName: "单价",
217
             displayName: "单价",
176
           },
218
           },
177
-          
219
+
178
           {
220
           {
179
-            field: "tips",
221
+            field: "Remarks",
180
             displayName: "备注",
222
             displayName: "备注",
181
           },
223
           },
182
         ],
224
         ],

+ 75 - 27
src/xt_pages/Pharmacy/print/drugPrint.vue Zobrazit soubor

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">
12
       <div class="list_title">
13
-        <div>药品名称:</div>
14
-        <div>规格:</div>
15
-        <div>发药状态:</div>
16
-        <div v-if="state==2">领药人:</div>
13
+        <div>药品名称:{{name}}</div>
14
+        <div>规格:{{specifications}}</div>
15
+        <div>发药状态:{{state_name}}</div>
16
+<!--        <div v-if="state==2">领药人:</div>-->
17
       </div>
17
       </div>
18
 
18
 
19
       <el-table
19
       <el-table
26
         <el-table-column type="index" prop="index" label="序号" width="60">
26
         <el-table-column type="index" prop="index" label="序号" width="60">
27
         </el-table-column>
27
         </el-table-column>
28
         <el-table-column prop="name" label="患者姓名" width="160">
28
         <el-table-column prop="name" label="患者姓名" width="160">
29
+          <template  slot-scope="scope">
30
+            {{scope.row.name}}
31
+          </template>
29
         </el-table-column>
32
         </el-table-column>
30
-        <el-table-column prop="SingleDosage" label="单次用量" width="120">
33
+        <el-table-column prop="single_dosage" label="单次用量" width="120">
34
+          <template  slot-scope="scope">
35
+            {{scope.row.single_dosage}}
36
+          </template>
37
+        </el-table-column>
38
+        <el-table-column prop="usage" label="用法" width="120">
39
+          <template  slot-scope="scope">
40
+            {{scope.row.usage}}
41
+          </template>
31
         </el-table-column>
42
         </el-table-column>
32
-        <el-table-column prop="use" label="用法" width="120"> </el-table-column>
33
         <el-table-column prop="frequency" label="频率" width="120">
43
         <el-table-column prop="frequency" label="频率" width="120">
44
+          <template  slot-scope="scope">
45
+            {{scope.row.frequency}}
46
+          </template>
47
+        </el-table-column>
48
+        <el-table-column prop="days" label="天数" width="120">
49
+          <template  slot-scope="scope">
50
+            {{scope.row.days}}
51
+          </template>
34
         </el-table-column>
52
         </el-table-column>
35
-        <el-table-column prop="day" label="天数" width="120"> </el-table-column>
36
-        <el-table-column prop="amount" label="总量" width="120">
53
+        <el-table-column prop="total" label="总量" width="120">
54
+          <template  slot-scope="scope">
55
+            {{scope.row.total}}
56
+          </template>
37
         </el-table-column>
57
         </el-table-column>
38
-        <el-table-column prop="tips" label="数据来源" width="120">
58
+        <el-table-column prop="data_sources" label="数据来源" width="120">
59
+          <template  slot-scope="scope">
60
+            {{scope.row.data_sources}}
61
+          </template>
62
+        </el-table-column>
63
+        <el-table-column prop="people" label="领药人" width="120">
64
+          <template  slot-scope="scope">
65
+            {{scope.row.people}}
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: [{}],
54
-      isClose:false
81
+      tableData: [],
82
+      isClose:false,
83
+      name:"",
84
+      specifications:"",
85
+      state_name:"",
55
     };
86
     };
56
   },
87
   },
57
   props: {
88
   props: {
79
         }
110
         }
80
       }
111
       }
81
     },
112
     },
82
-    show: function () {
113
+    show: function (val,data,state,ids) {
83
       this.visibility = true;
114
       this.visibility = true;
115
+      this.name = data.name
116
+      this.specifications = data.specifications
117
+      console.log("this.multipleSelection",ids)
118
+      console.log("this.val",val)
119
+      if (state == 1){
120
+        this.state_name = "待发药"
121
+        this.tableData = ids
122
+      }
123
+      if (state == 2){
124
+        this.state_name = "已发药"
125
+        this.tableData = val
126
+      }
84
     },
127
     },
85
 
128
 
86
     comfirm: function (formName) {
129
     comfirm: function (formName) {
105
       //   });
148
       //   });
106
       this.printJson({
149
       this.printJson({
107
         title: `<div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;">
150
         title: `<div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;">
108
-        <div style="width: 230px;padding: 10px 0;">药品名称:${1}</div>
109
-        <div style="width: 230px;padding: 10px 0;">规格:${1}</div>
110
-        <div style="width: 230px;padding: 10px 0;">发药状态:${1}</div>
151
+        <div style="width: 230px;padding: 10px 0;">药品名称:${this.name}</div>
152
+        <div style="width: 230px;padding: 10px 0;">规格:${this.specifications}</div>
153
+        <div style="width: 230px;padding: 10px 0;">发药状态:${this.state_name}</div>
111
         </div>`, // 打印出来的标题
154
         </div>`, // 打印出来的标题
112
         data: this.tableData, // 需要打印的数据
155
         data: this.tableData, // 需要打印的数据
113
         serial: true, // 是否需要打印序列号
156
         serial: true, // 是否需要打印序列号
115
           // 需要打印的字段
158
           // 需要打印的字段
116
 
159
 
117
           "name",
160
           "name",
118
-          "SingleDosage",
119
-          "use",
161
+          "single_dosage",
162
+          "usage",
120
           "frequency",
163
           "frequency",
121
-          "day",
122
-          "amount",
123
-          "tips",
164
+          "days",
165
+          "total",
166
+          "data_sources",
167
+          "people",
124
         ],
168
         ],
125
         properties: [
169
         properties: [
126
           // 需要打印的字段对应的表头名
170
           // 需要打印的字段对应的表头名
130
             displayName: "姓名",
174
             displayName: "姓名",
131
           },
175
           },
132
           {
176
           {
133
-            field: "SingleDosage",
134
-            displayName: "单用量",
177
+            field: "single_dosage",
178
+            displayName: "单用量",
135
           },
179
           },
136
           {
180
           {
137
-            field: "use",
181
+            field: "usage",
138
             displayName: "用法",
182
             displayName: "用法",
139
           },
183
           },
140
           {
184
           {
142
             displayName: "频率",
186
             displayName: "频率",
143
           },
187
           },
144
           {
188
           {
145
-            field: "day",
189
+            field: "days",
146
             displayName: "天数",
190
             displayName: "天数",
147
           },
191
           },
148
           {
192
           {
149
-            field: "amount",
193
+            field: "total",
150
             displayName: "总量",
194
             displayName: "总量",
151
           },
195
           },
152
           {
196
           {
153
-            field: "tips",
154
-            displayName: "备注",
197
+            field: "data_sources",
198
+            displayName: "数据来源",
199
+          },
200
+          {
201
+            field: "people",
202
+            displayName: "领药人",
155
           },
203
           },
156
         ],
204
         ],
157
       });
205
       });

+ 67 - 26
src/xt_pages/Pharmacy/print/patientPrint.vue Zobrazit soubor

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">
12
       <div class="list_title">
13
-        <div>患者名称:</div>
14
-        <div>数据来源:</div>
15
-        <div>发药状态:</div>
16
-        <div>领药时间:</div>
13
+        <div>患者名称:{{name}}</div>
14
+        <div>发药状态:{{state}}</div>
17
       </div>
15
       </div>
18
 
16
 
19
       <el-table
17
       <el-table
26
         <el-table-column type="index" prop="index" label="序号" width="60">
24
         <el-table-column type="index" prop="index" label="序号" width="60">
27
         </el-table-column>
25
         </el-table-column>
28
         <el-table-column prop="name" label="名称" width="160">
26
         <el-table-column prop="name" label="名称" width="160">
27
+          <template slot-scope="scope" >
28
+            <span>{{scope.row.Name ? scope.row.Name : ""}}</span>
29
+          </template>
29
         </el-table-column>
30
         </el-table-column>
30
         <el-table-column prop="SingleDosage" label="单次用量" width="120">
31
         <el-table-column prop="SingleDosage" label="单次用量" width="120">
32
+          <template slot-scope="scope" >
33
+            <span>{{scope.row.SingleDosage ? scope.row.SingleDosage : ""}}</span>
34
+          </template>
35
+        </el-table-column>
36
+        <el-table-column prop="use" label="用法" width="120">
37
+          <template slot-scope="scope" >
38
+            <span>{{scope.row.Usage ? scope.row.Usage : ""}}</span>
39
+          </template>
31
         </el-table-column>
40
         </el-table-column>
32
-        <el-table-column prop="use" label="用法" width="120"> </el-table-column>
33
         <el-table-column prop="frequency" label="频率" width="120">
41
         <el-table-column prop="frequency" label="频率" width="120">
42
+          <template slot-scope="scope" >
43
+            <span>{{scope.row.Frequency ? scope.row.Frequency : ""}}</span>
44
+          </template>
45
+        </el-table-column>
46
+        <el-table-column prop="day" label="天数" width="120">
47
+          <template slot-scope="scope" >
48
+            <span>{{scope.row.Days ? scope.row.Days : ""}}</span>
49
+          </template>
34
         </el-table-column>
50
         </el-table-column>
35
-        <el-table-column prop="day" label="天数" width="120"> </el-table-column>
36
         <el-table-column prop="amount" label="总量" width="120">
51
         <el-table-column prop="amount" label="总量" width="120">
52
+          <template slot-scope="scope" >
53
+            <span>{{scope.row.Total ? scope.row.Total : ""}}</span>
54
+          </template>
55
+        </el-table-column>
56
+        <el-table-column prop="tips" label="数据来源" width="120">
57
+          <template slot-scope="scope" >
58
+            <span>{{scope.row.DataSources ? scope.row.DataSources : ""}}</span>
59
+          </template>
37
         </el-table-column>
60
         </el-table-column>
38
         <el-table-column prop="tips" label="备注" width="120">
61
         <el-table-column prop="tips" label="备注" width="120">
62
+          <template slot-scope="scope" >
63
+            <span>{{scope.row.Remarks ? scope.row.Remarks : ""}}</span>
64
+          </template>
39
         </el-table-column>
65
         </el-table-column>
40
       </el-table>
66
       </el-table>
41
     </div>
67
     </div>
50
   data() {
76
   data() {
51
     return {
77
     return {
52
       visibility: false,
78
       visibility: false,
53
-      tableData: [{}],
54
-      isClose:false
79
+      tableData: [],
80
+      isClose:false,
81
+      name:"",
82
+      state:null,
55
     };
83
     };
56
   },
84
   },
57
   props: {
85
   props: {
75
         }
103
         }
76
       }
104
       }
77
     },
105
     },
78
-    show: function () {
106
+    show: function (val,data,state) {
79
       this.visibility = true;
107
       this.visibility = true;
108
+      console.log("val",val)
109
+      this.tableData = val
110
+      this.name = data.Name
111
+      if (state == 1){
112
+        this.state = "待发药"
113
+      }
114
+      if (state == 2){
115
+        this.state = "已发药"
116
+      }
117
+
80
     },
118
     },
81
 
119
 
82
     comfirm: function (formName) {
120
     comfirm: function (formName) {
101
       //   });
139
       //   });
102
       this.printJson({
140
       this.printJson({
103
         title: `<div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;">
141
         title: `<div style="width: 940px;border-bottom: 1px solid;display: flex;margin: 30px auto;">
104
-        <div style="width: 230px;padding: 10px 0;">患者名称:${1}</div>
105
-        <div style="width: 230px;padding: 10px 0;">数据来源:${1}</div>
106
-        <div style="width: 230px;padding: 10px 0;">预约状态:${1}</div>
107
-        <div style="width: 230px;padding: 10px 0;">领药时间:${1}</div>
142
+        <div style="width: 230px;padding: 10px 0;">患者名称:${this.name}</div>
143
+        <div style="width: 230px;padding: 10px 0;">发药状态:${this.state}</div>
108
         </div>`, // 打印出来的标题
144
         </div>`, // 打印出来的标题
109
         data: this.tableData, // 需要打印的数据
145
         data: this.tableData, // 需要打印的数据
110
         serial: true, // 是否需要打印序列号
146
         serial: true, // 是否需要打印序列号
111
         fields: [
147
         fields: [
112
           // 需要打印的字段
148
           // 需要打印的字段
113
 
149
 
114
-          "name",
150
+          "Name",
115
           "SingleDosage",
151
           "SingleDosage",
116
-          "use",
117
-          "frequency",
118
-          "day",
119
-          "amount",
120
-          "tips",
152
+          "Usage",
153
+          "Frequency",
154
+          "Days",
155
+          "Total",
156
+          "DataSources",
157
+          "Remarks",
121
         ],
158
         ],
122
         properties: [
159
         properties: [
123
           // 需要打印的字段对应的表头名
160
           // 需要打印的字段对应的表头名
124
 
161
 
125
           {
162
           {
126
-            field: "name",
163
+            field: "Name",
127
             displayName: "姓名",
164
             displayName: "姓名",
128
           },
165
           },
129
           {
166
           {
130
             field: "SingleDosage",
167
             field: "SingleDosage",
131
-            displayName: "单用量",
168
+            displayName: "单用量",
132
           },
169
           },
133
           {
170
           {
134
-            field: "use",
171
+            field: "Usage",
135
             displayName: "用法",
172
             displayName: "用法",
136
           },
173
           },
137
           {
174
           {
138
-            field: "frequency",
175
+            field: "Frequency",
139
             displayName: "频率",
176
             displayName: "频率",
140
           },
177
           },
141
           {
178
           {
142
-            field: "day",
179
+            field: "Days",
143
             displayName: "天数",
180
             displayName: "天数",
144
           },
181
           },
145
           {
182
           {
146
-            field: "amount",
183
+            field: "Total",
147
             displayName: "总量",
184
             displayName: "总量",
148
           },
185
           },
149
           {
186
           {
150
-            field: "tips",
187
+            field: "DataSources",
188
+            displayName: "数据来源",
189
+          },
190
+          {
191
+            field: "Remarks",
151
             displayName: "备注",
192
             displayName: "备注",
152
           },
193
           },
153
         ],
194
         ],

+ 24 - 10
src/xt_pages/data/components/addDrugs.vue Zobrazit soubor

453
                     <el-form-item label="是否统计工作量:" prop="is_statistics_work">
453
                     <el-form-item label="是否统计工作量:" prop="is_statistics_work">
454
                         <el-select v-model="form.is_statistics_work" style="width:160px;" placeholder="请选择">
454
                         <el-select v-model="form.is_statistics_work" style="width:160px;" placeholder="请选择">
455
                             <el-option
455
                             <el-option
456
-                                    v-for="item,index in options"
456
+                                    v-for="(item,index) in options"
457
                                     :key="index"
457
                                     :key="index"
458
                                     :label="item.label"
458
                                     :label="item.label"
459
                                     :value="item.value">
459
                                     :value="item.value">
463
                     <el-form-item label="是否收费常用项:" prop="is_charge_use">
463
                     <el-form-item label="是否收费常用项:" prop="is_charge_use">
464
                         <el-select v-model="form.is_charge_use" style="width:160px;" placeholder="请选择">
464
                         <el-select v-model="form.is_charge_use" style="width:160px;" placeholder="请选择">
465
                             <el-option
465
                             <el-option
466
-                                    v-for="item,index in options"
466
+                                    v-for="(item,index) in options"
467
                                     :key="index"
467
                                     :key="index"
468
                                     :label="item.label"
468
                                     :label="item.label"
469
                                     :value="item.value">
469
                                     :value="item.value">
470
                             </el-option>
470
                             </el-option>
471
                         </el-select>
471
                         </el-select>
472
                     </el-form-item>
472
                     </el-form-item>
473
-                    <el-form-item label="是否通过药房发药:" prop="">
474
-                        <el-select v-model="form.is_charge_use" style="width:160px;" placeholder="请选择">
473
+                    <el-form-item label="是否通过药房发药:" prop="is_pharmacy">
474
+                        <el-select v-model="form.is_pharmacy" style="width:160px;" placeholder="请选择">
475
                             <el-option
475
                             <el-option
476
-                                    v-for="item,index in options"
477
-                                    :key="index"
476
+                                    v-for="item in Pharmacy"
477
+                                    :key="item.value"
478
                                     :label="item.label"
478
                                     :label="item.label"
479
                                     :value="item.value">
479
                                     :value="item.value">
480
                             </el-option>
480
                             </el-option>
512
           { id: 2, name: '特殊护理' },
512
           { id: 2, name: '特殊护理' },
513
           { id: 3, name: '抗凝剂' }
513
           { id: 3, name: '抗凝剂' }
514
         ],
514
         ],
515
-        options: [{
515
+        options: [
516
+          {
516
           value: '1',
517
           value: '1',
517
           label: '是'
518
           label: '是'
518
-        }, {
519
+          },
520
+          {
519
           value: '2',
521
           value: '2',
520
           label: '否'
522
           label: '否'
521
-        }],
523
+          }
524
+        ],
525
+        Pharmacy: [
526
+          {
527
+            value: 1,
528
+            label: '是'
529
+          },
530
+          {
531
+            value: 0,
532
+            label: '否'
533
+          }
534
+        ],
522
         lmt_used_flags: [{
535
         lmt_used_flags: [{
523
           id: 0,
536
           id: 0,
524
           name: '否'
537
           name: '否'
608
           is_user:"2",
621
           is_user:"2",
609
           sum_count:"",
622
           sum_count:"",
610
           sum_in_count:"",
623
           sum_in_count:"",
624
+          is_pharmacy:0,//是否通过药房发药
611
         },
625
         },
612
 
626
 
613
         rules: {
627
         rules: {
723
         this.form.intro = ''
737
         this.form.intro = ''
724
       },
738
       },
725
       show(id, obj) {
739
       show(id, obj) {
726
-        console.log("obj3223323232332",obj)
727
         this.unitList = []
740
         this.unitList = []
728
         this.packingUnit = []
741
         this.packingUnit = []
729
         var arr =  getDataConfig('hemodialysis','units')
742
         var arr =  getDataConfig('hemodialysis','units')
932
         form['is_user'] = this.form.is_user
945
         form['is_user'] = this.form.is_user
933
         form['sum_count'] = this.form.sum_count
946
         form['sum_count'] = this.form.sum_count
934
         form['sum_in_count'] = this.form.sum_in_count
947
         form['sum_in_count'] = this.form.sum_in_count
948
+        form['is_pharmacy'] = this.form.is_pharmacy
935
         return form
949
         return form
936
       },
950
       },
937
       getlist() {
951
       getlist() {

+ 27 - 4
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Zobrazit soubor

223
         :cell-class-name="adviceNameShow"
223
         :cell-class-name="adviceNameShow"
224
         :modal-append-to-body="false"
224
         :modal-append-to-body="false"
225
         highlight-current-row
225
         highlight-current-row
226
-        
226
+
227
       >
227
       >
228
       <!-- @selection-change="handleSelectionChange" -->
228
       <!-- @selection-change="handleSelectionChange" -->
229
         <!-- <el-table-column type="selection"  width="55"></el-table-column> -->
229
         <!-- <el-table-column type="selection"  width="55"></el-table-column> -->
553
       <div slot="footer" class="dialog-footer" v-show="showAdviceForm">
553
       <div slot="footer" class="dialog-footer" v-show="showAdviceForm">
554
         <el-button @click="hideForm">取 消</el-button>
554
         <el-button @click="hideForm">取 消</el-button>
555
         <el-button type="primary" v-if="form.id == 0" @click="submitAdvice" :loading="loading">保 存</el-button><!--新增子药保存按钮(选择医嘱名称前)保 存1-->
555
         <el-button type="primary" v-if="form.id == 0" @click="submitAdvice" :loading="loading">保 存</el-button><!--新增子药保存按钮(选择医嘱名称前)保 存1-->
556
-        <el-button type="primary" v-else @click="submitEditAdvice" :loading="loading">保 存</el-button><!--新增子药保存按钮(选择医嘱名称后)保 存2-->
556
+        <el-button type="primary" v-else @click="submitEditAdvice" :loading="loading">保 存</el-button><!--新增子药保存按钮(编辑医嘱存2-->
557
       </div>
557
       </div>
558
       <!-- 医嘱表单 end -->
558
       <!-- 医嘱表单 end -->
559
     </el-dialog>
559
     </el-dialog>
1113
       }
1113
       }
1114
       ,
1114
       ,
1115
       openDeleteGroupAdvice(val) {
1115
       openDeleteGroupAdvice(val) {
1116
+        if(this.currentRow.is_medicine == 1){
1117
+          this.$message.error('已发药,不可删除')
1118
+          return
1119
+        }
1116
         if (this.groupSelectRow === null) {
1120
         if (this.groupSelectRow === null) {
1117
           this.$message.error('未选择要删除的医嘱内容')
1121
           this.$message.error('未选择要删除的医嘱内容')
1118
           return
1122
           return
1384
       }
1388
       }
1385
       ,
1389
       ,
1386
       openNewChildTwo(index, row) {
1390
       openNewChildTwo(index, row) {
1391
+        if(this.currentRow.is_medicine == 1){
1392
+          this.$message.error('已发药,不可操作')
1393
+          return
1394
+        }
1387
         this.currentRow = row
1395
         this.currentRow = row
1388
         if (this.currentRow == null) {
1396
         if (this.currentRow == null) {
1389
           this.$message.error('请先选择要新增子药的医嘱!')
1397
           this.$message.error('请先选择要新增子药的医嘱!')
1470
       ,
1478
       ,
1471
 
1479
 
1472
       openEdit(index, row) {
1480
       openEdit(index, row) {
1481
+        console.log("lilili",this.currentRow)
1482
+        if(this.currentRow.is_medicine == 1){
1483
+          this.$message.error('已发药不可修改')
1484
+          return
1485
+        }
1473
         if (row.stop_state == 1 || row.execution_state == 1) {
1486
         if (row.stop_state == 1 || row.execution_state == 1) {
1474
           this.$message.error('所选医嘱已停止或执行')
1487
           this.$message.error('所选医嘱已停止或执行')
1475
           return false
1488
           return false
1499
           advice_doctor: row.advice_doctor,
1512
           advice_doctor: row.advice_doctor,
1500
           remark: row.remark,
1513
           remark: row.remark,
1501
           parent_id: row.parent_id,
1514
           parent_id: row.parent_id,
1502
-          drug_id:0,
1503
-          way:0,
1515
+          drug_id:row.drug_id,
1516
+          way:row.way,
1504
           drug_name_id:0,
1517
           drug_name_id:0,
1505
         }
1518
         }
1506
       }
1519
       }
1507
       ,
1520
       ,
1508
 
1521
 
1509
       openEditGroupAdvice() {
1522
       openEditGroupAdvice() {
1523
+        console.log("thissssss",this.currentRow)
1524
+        if(this.currentRow.is_medicine == 1){
1525
+          this.$message.error('已发药不可修改')
1526
+          return
1527
+        }
1510
         if (this.groupSelectRow === null) {
1528
         if (this.groupSelectRow === null) {
1511
           this.$message.error('未选择要修改的医嘱内容')
1529
           this.$message.error('未选择要修改的医嘱内容')
1512
           return
1530
           return
1783
       }
1801
       }
1784
       ,
1802
       ,
1785
       openDelete(index, row) {
1803
       openDelete(index, row) {
1804
+        if(this.currentRow.is_medicine == 1){
1805
+          this.$message.error('已发药不可删除')
1806
+          return
1807
+        }
1786
         this.currentRow = row
1808
         this.currentRow = row
1787
         this.$confirm('确认删除此条医嘱?', '医嘱删除', {
1809
         this.$confirm('确认删除此条医嘱?', '医嘱删除', {
1788
           confirmButtonText: '确定',
1810
           confirmButtonText: '确定',
2131
       ,
2153
       ,
2132
       getAdviceContent(row, isChild) {
2154
       getAdviceContent(row, isChild) {
2133
         // alert("来")
2155
         // alert("来")
2156
+        console.log("this.doctor_advices",this.doctor_advices)
2134
         console.log("row",row)
2157
         console.log("row",row)
2135
         console.log("isChild",isChild)
2158
         console.log("isChild",isChild)
2136
         let tempSingleDoseDesc = ''
2159
         let tempSingleDoseDesc = ''

+ 34 - 34
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue Zobrazit soubor

42
     </div>
42
     </div>
43
 
43
 
44
     <div class="app-container" v-loading="loading">
44
     <div class="app-container" v-loading="loading">
45
-    
45
+
46
       <drugs-stock-dialog
46
       <drugs-stock-dialog
47
         ref="dialog"
47
         ref="dialog"
48
         :propForm="propForm"
48
         :propForm="propForm"
79
         </el-date-picker>
79
         </el-date-picker>
80
       </div>
80
       </div>
81
 
81
 
82
-      
82
+
83
    <!-- 编辑入库单详情 -->
83
    <!-- 编辑入库单详情 -->
84
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
84
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
85
         <el-table
85
         <el-table
111
                     @input="changeDrugName(scope.$index)"
111
                     @input="changeDrugName(scope.$index)"
112
                     style="width:160px;"
112
                     style="width:160px;"
113
                     :disabled="disabled"
113
                     :disabled="disabled"
114
-                   
114
+
115
                   >
115
                   >
116
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
116
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
117
                   <template slot-scope="{ item }">
117
                   <template slot-scope="{ item }">
121
               </el-form-item>
121
               </el-form-item>
122
             </template>
122
             </template>
123
           </el-table-column>
123
           </el-table-column>
124
-       
124
+
125
          <el-table-column align="center" width="140">
125
          <el-table-column align="center" width="140">
126
             <template slot="header" slot-scope="scope">
126
             <template slot="header" slot-scope="scope">
127
               <span>药品类型</span>
127
               <span>药品类型</span>
133
                   :key="index"
133
                   :key="index"
134
                   :label="option.name"
134
                   :label="option.name"
135
                   :value="option.id"
135
                   :value="option.id"
136
-                  
136
+
137
                   >
137
                   >
138
                 </el-option>
138
                 </el-option>
139
                </el-select>
139
                </el-select>
167
                 </el-form-item>
167
                 </el-form-item>
168
               </template>
168
               </template>
169
          </el-table-column>
169
          </el-table-column>
170
-       
171
-                   
170
+
171
+
172
          <el-table-column align="center" width="200">
172
          <el-table-column align="center" width="200">
173
             <template slot="header" slot-scope="scope">
173
             <template slot="header" slot-scope="scope">
174
               <span>入库数量<span style="color: red">*</span></span>
174
               <span>入库数量<span style="color: red">*</span></span>
225
                   v-model="scope.row.retail_price"
225
                   v-model="scope.row.retail_price"
226
                   :disabled="disabled"
226
                   :disabled="disabled"
227
                 ></el-input>
227
                 ></el-input>
228
-               
228
+
229
               </el-form-item>
229
               </el-form-item>
230
             </template>
230
             </template>
231
           </el-table-column>
231
           </el-table-column>
246
                     v-model="scope.row.last_price"
246
                     v-model="scope.row.last_price"
247
                     :disabled="disabled"
247
                     :disabled="disabled"
248
                   ></el-input>
248
                   ></el-input>
249
-                
249
+
250
                 </el-form-item>
250
                 </el-form-item>
251
               </template>
251
               </template>
252
           </el-table-column>
252
           </el-table-column>
253
 
253
 
254
           <el-table-column label="总价(元)" align="center" width="80">
254
           <el-table-column label="总价(元)" align="center" width="80">
255
             <template slot-scope="scope">
255
             <template slot-scope="scope">
256
-              {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
256
+              {{ calculate(scope.row.last_price * scope.row.warehousing_count) }}
257
             </template>
257
             </template>
258
           </el-table-column>
258
           </el-table-column>
259
-    
259
+
260
 
260
 
261
          <el-table-column  width="180" align="center">
261
          <el-table-column  width="180" align="center">
262
              <template slot="header" slot-scope="scope">
262
              <template slot="header" slot-scope="scope">
295
             </template>
295
             </template>
296
           </el-table-column>
296
           </el-table-column>
297
 
297
 
298
-             
298
+
299
           <el-table-column label="生产厂家" width="140" align="center">
299
           <el-table-column label="生产厂家" width="140" align="center">
300
             <template slot-scope="scope">
300
             <template slot-scope="scope">
301
                <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商"  :disabled="disabled">
301
                <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商"  :disabled="disabled">
309
                </el-select>
309
                </el-select>
310
             </template>
310
             </template>
311
           </el-table-column>
311
           </el-table-column>
312
-       
312
+
313
 
313
 
314
           <el-table-column label="经销商" width="140" align="center">
314
           <el-table-column label="经销商" width="140" align="center">
315
             <template slot-scope="scope">
315
             <template slot-scope="scope">
325
             </template>
325
             </template>
326
           </el-table-column>
326
           </el-table-column>
327
 
327
 
328
-          
328
+
329
         <el-table-column align="center" width="150" label="批准文号">
329
         <el-table-column align="center" width="150" label="批准文号">
330
             <template slot-scope="scope">
330
             <template slot-scope="scope">
331
               <el-form-item style="padding-top: 20px">
331
               <el-form-item style="padding-top: 20px">
337
               </el-form-item>
337
               </el-form-item>
338
             </template>
338
             </template>
339
           </el-table-column>
339
           </el-table-column>
340
- 
340
+
341
           <el-table-column label="备注" width="150" align="center">
341
           <el-table-column label="备注" width="150" align="center">
342
             <template slot-scope="scope">
342
             <template slot-scope="scope">
343
               <el-input v-model="scope.row.remark" :disabled="disabled"></el-input>
343
               <el-input v-model="scope.row.remark" :disabled="disabled"></el-input>
497
   methods: {
497
   methods: {
498
     comfirm: function(val) {
498
     comfirm: function(val) {
499
       this.$refs.dialog.hide();
499
       this.$refs.dialog.hide();
500
-   
500
+
501
       if (val.selectedGoodInfo.length > 0) {
501
       if (val.selectedGoodInfo.length > 0) {
502
         for (let i = val.selectedGoodInfo.length - 1; i >= 0 ; i--) {
502
         for (let i = val.selectedGoodInfo.length - 1; i >= 0 ; i--) {
503
           if (i == 0) {
503
           if (i == 0) {
578
       return name;
578
       return name;
579
     },
579
     },
580
     specificationName: function(drug_id) {
580
     specificationName: function(drug_id) {
581
- 
581
+
582
       let name = "";
582
       let name = "";
583
       for (let i = 0; i < this.goodInfo.length; i++) {
583
       for (let i = 0; i < this.goodInfo.length; i++) {
584
         if (this.goodInfo[i].id == drug_id) {
584
         if (this.goodInfo[i].id == drug_id) {
668
         return "";
668
         return "";
669
       }
669
       }
670
     },
670
     },
671
-    
671
+
672
     back() {
672
     back() {
673
       this.$router.go(-1);
673
       this.$router.go(-1);
674
     },
674
     },
691
              if(this.recordInfo.recordData[i].dealer == ""){
691
              if(this.recordInfo.recordData[i].dealer == ""){
692
                 this.recordInfo.recordData[i].dealer = 0
692
                 this.recordInfo.recordData[i].dealer = 0
693
              }
693
              }
694
-             
694
+
695
              if(this.recordInfo.recordData[i].manufacturer == ""){
695
              if(this.recordInfo.recordData[i].manufacturer == ""){
696
                this.recordInfo.recordData[i].manufacturer = 0
696
                this.recordInfo.recordData[i].manufacturer = 0
697
              }
697
              }
700
              this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].last_price.toString()
700
              this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].last_price.toString()
701
 
701
 
702
              this.recordInfo.recordData[i].retail_price = this.recordInfo.recordData[i].retail_price.toString()
702
              this.recordInfo.recordData[i].retail_price = this.recordInfo.recordData[i].retail_price.toString()
703
-          
703
+
704
             for(let j=0;j<this.manufacturerList.length;j++){
704
             for(let j=0;j<this.manufacturerList.length;j++){
705
               if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
705
               if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
706
                  this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
706
                  this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
712
                   this.recordInfo.recordData[i].dealer = this.dealerList[z].id
712
                   this.recordInfo.recordData[i].dealer = this.dealerList[z].id
713
               }
713
               }
714
             }
714
             }
715
-            
715
+
716
           }
716
           }
717
           const params = {
717
           const params = {
718
             stockIn: this.recordInfo.recordData
718
             stockIn: this.recordInfo.recordData
782
           this.$message.error(response.data.msg);
782
           this.$message.error(response.data.msg);
783
           return false;
783
           return false;
784
         } else {
784
         } else {
785
-       
785
+
786
           var manufacturerList = response.data.data.manufacturerList
786
           var manufacturerList = response.data.data.manufacturerList
787
           this.manufacturerList = manufacturerList
787
           this.manufacturerList = manufacturerList
788
           var dealerList  = response.data.data.dealerList
788
           var dealerList  = response.data.data.dealerList
789
-        
789
+
790
           this.dealerList = dealerList
790
           this.dealerList = dealerList
791
-         
791
+
792
           for (let i = 0; i < response.data.data.info.length; i++) {
792
           for (let i = 0; i < response.data.data.info.length; i++) {
793
             response.data.data.info[i].product_date = this.getTime(
793
             response.data.data.info[i].product_date = this.getTime(
794
               response.data.data.info[i].product_date,
794
               response.data.data.info[i].product_date,
803
             response.data.data.info[i].retail_price = response.data.data.info[i].retail_price.toString();
803
             response.data.data.info[i].retail_price = response.data.data.info[i].retail_price.toString();
804
 
804
 
805
             response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
805
             response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
806
-             
806
+
807
             response.data.data.info[i].name = response.data.data.info[i].drug.dose + response.data.data.info[i].drug.dose_unit+"*"+response.data.data.info[i].drug.min_number+ response.data.data.info[i].drug.min_unit+"/"+response.data.data.info[i].drug.max_unit
807
             response.data.data.info[i].name = response.data.data.info[i].drug.dose + response.data.data.info[i].drug.dose_unit+"*"+response.data.data.info[i].drug.min_number+ response.data.data.info[i].drug.min_unit+"/"+response.data.data.info[i].drug.max_unit
808
 
808
 
809
             response.data.data.info[i].lot_number = response.data.data.info[i].number
809
             response.data.data.info[i].lot_number = response.data.data.info[i].number
825
            if(response.data.data.info[i].dealer == 0){
825
            if(response.data.data.info[i].dealer == 0){
826
                response.data.data.info[i].dealer = ""
826
                response.data.data.info[i].dealer = ""
827
             }
827
             }
828
-          
828
+
829
             this.recordInfo.recordData.push(response.data.data.info[i]);
829
             this.recordInfo.recordData.push(response.data.data.info[i]);
830
-           
830
+
831
             for(let j=0;j<manufacturerList.length;j++){
831
             for(let j=0;j<manufacturerList.length;j++){
832
               if(response.data.data.info[i].manufacturer == manufacturerList[j].id){
832
               if(response.data.data.info[i].manufacturer == manufacturerList[j].id){
833
                  response.data.data.info[i].manufacturer = manufacturerList[j].manufacturer_name
833
                  response.data.data.info[i].manufacturer = manufacturerList[j].manufacturer_name
865
           if (response.data.state == 1) {
865
           if (response.data.state == 1) {
866
              searchArray = response.data.data.list;
866
              searchArray = response.data.data.list;
867
              var list = response.data.data.list
867
              var list = response.data.data.list
868
-         
868
+
869
              this.drugList = list
869
              this.drugList = list
870
              var manufacturerList = response.data.data.manufacturerList
870
              var manufacturerList = response.data.data.manufacturerList
871
              this.manufacturerList = manufacturerList
871
              this.manufacturerList = manufacturerList
873
              var dealerList = response.data.data.dealerList
873
              var dealerList = response.data.data.dealerList
874
              this.dealerList = dealerList
874
              this.dealerList = dealerList
875
              for(let i=0;i<this.drugList.length;i++){
875
              for(let i=0;i<this.drugList.length;i++){
876
-               
876
+
877
                 for(let j=0;j<this.manufacturerList.length;j++){
877
                 for(let j=0;j<this.manufacturerList.length;j++){
878
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
878
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
879
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
879
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
885
                   if(this.drugList[i].dealer == this.dealerList[z].id){
885
                   if(this.drugList[i].dealer == this.dealerList[z].id){
886
                       this.drugList[i].dealer = this.dealerList[z].dealer_name
886
                       this.drugList[i].dealer = this.dealerList[z].dealer_name
887
                   }
887
                   }
888
-               
888
+
889
                 }
889
                 }
890
              }
890
              }
891
              cb(this.drugList)
891
              cb(this.drugList)
915
              }else{
915
              }else{
916
                this.recordInfo.recordData[i].retail_price = val.min_price
916
                this.recordInfo.recordData[i].retail_price = val.min_price
917
              }
917
              }
918
-           
918
+
919
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
919
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
920
              this.recordInfo.recordData[i].number = val.number
920
              this.recordInfo.recordData[i].number = val.number
921
              this.recordInfo.recordData[i].max_unit = val.max_unit
921
              this.recordInfo.recordData[i].max_unit = val.max_unit
925
              }else{
925
              }else{
926
                this.recordInfo.recordData[i].dealer =  val.dealer
926
                this.recordInfo.recordData[i].dealer =  val.dealer
927
              }
927
              }
928
-            
928
+
929
            }
929
            }
930
         }
930
         }
931
       },
931
       },
985
     },
985
     },
986
   },
986
   },
987
   created() {
987
   created() {
988
-   
989
-    this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
988
+
989
+    this.drugTypeList = getDictionaryDataConfig('system','drug_type')
990
     this.propForm.goodUnit = this.$store.getters.good_unit;
990
     this.propForm.goodUnit = this.$store.getters.good_unit;
991
     const order_id = this.$route.query.id;
991
     const order_id = this.$route.query.id;
992
     this.GetOrderDetail(order_id);
992
     this.GetOrderDetail(order_id);

+ 6 - 6
src/xt_pages/stock/drugs/drugsStockDialog/index.vue Zobrazit soubor

122
       }
122
       }
123
     },
123
     },
124
     created(){
124
     created(){
125
-      console.log("药品类型",this.propForm)
125
+      console.log("药品类型.",this.propForm)
126
     },
126
     },
127
     methods: {
127
     methods: {
128
       hide: function() {
128
       hide: function() {
151
 
151
 
152
       },
152
       },
153
       comfirm: function(formName) {
153
       comfirm: function(formName) {
154
-       
154
+
155
         this.goodInfoTableData = []
155
         this.goodInfoTableData = []
156
         this.$emit('dialog-comfirm', this.getValue())
156
         this.$emit('dialog-comfirm', this.getValue())
157
         this.$refs.multipleTable.clearSelection()
157
         this.$refs.multipleTable.clearSelection()
215
       //   for (let i = 0; i < searchArr.length; i++) {
215
       //   for (let i = 0; i < searchArr.length; i++) {
216
       //     this.goodInfoTableData.push(searchArr[i])
216
       //     this.goodInfoTableData.push(searchArr[i])
217
       //   }
217
       //   }
218
-      // }, 
218
+      // },
219
       search:function() {
219
       search:function() {
220
        if (this.keywords.length <= 0) {
220
        if (this.keywords.length <= 0) {
221
           this.$message.error('搜索关键字不能为空')
221
           this.$message.error('搜索关键字不能为空')
222
-        } 
223
-        const searchArr = [] 
222
+        }
223
+        const searchArr = []
224
         for(let i=0;i<this.propForm.goods.length;i++){
224
         for(let i=0;i<this.propForm.goods.length;i++){
225
            if(this.propForm.goods[i].drug_name.indexOf(this.keywords)!=-1){
225
            if(this.propForm.goods[i].drug_name.indexOf(this.keywords)!=-1){
226
               searchArr.push(this.propForm.goods[i])
226
               searchArr.push(this.propForm.goods[i])
227
            }
227
            }
228
-        } 
228
+        }
229
         this.propForm.goods = []
229
         this.propForm.goods = []
230
         this.propForm.goods.push(...searchArr)
230
         this.propForm.goods.push(...searchArr)
231
          console.log("2333333",this.propForm.goods)
231
          console.log("2333333",this.propForm.goods)

+ 6 - 1
src/xt_pages/stock/drugs/query.vue Zobrazit soubor

110
           >搜索
110
           >搜索
111
           </el-button> -->
111
           </el-button> -->
112
       </div>
112
       </div>
113
-
113
+<!--      <el-button @click="lili()">调试</el-button>-->
114
       <el-table
114
       <el-table
115
         :data="tableList"
115
         :data="tableList"
116
         border
116
         border
421
   },
421
   },
422
 
422
 
423
   methods: {
423
   methods: {
424
+    lili(){
425
+      console.log("调试:this.tanlelist",this.tableList)
426
+    },
424
     //获取库存
427
     //获取库存
425
     getlist() {
428
     getlist() {
426
       const params = {
429
       const params = {
1259
       var min_str = "";
1262
       var min_str = "";
1260
       var total = 0;
1263
       var total = 0;
1261
       var newarr = arr;
1264
       var newarr = arr;
1265
+      console.log("这是什sfsdfsf么!!!!!",storehouse_id)
1262
       if (newarr.length > 0) {
1266
       if (newarr.length > 0) {
1263
         for (let i = 0; i < newarr.length; i++) {
1267
         for (let i = 0; i < newarr.length; i++) {
1264
           if (newarr[i].storehouse_id == storehouse_id) {
1268
           if (newarr[i].storehouse_id == storehouse_id) {
1281
           min_str = (total % min_number) + min_unit;
1285
           min_str = (total % min_number) + min_unit;
1282
         }
1286
         }
1283
       }
1287
       }
1288
+      console.log("这是什么!!!!!",max_str + min_str)
1284
       return max_str + min_str;
1289
       return max_str + min_str;
1285
     },
1290
     },
1286
     getOutFlushNight(
1291
     getOutFlushNight(

+ 1 - 1
src/xt_pages/user/components/EditGroupAdvice.vue Zobrazit soubor

1410
       this.nameFormTitle = "添加子药内容";
1410
       this.nameFormTitle = "添加子药内容";
1411
     },
1411
     },
1412
     openGroupAdvice(isEdit) {
1412
     openGroupAdvice(isEdit) {
1413
-     
1413
+
1414
       this.isChild = false;
1414
       this.isChild = false;
1415
       if (isEdit) {
1415
       if (isEdit) {
1416
         if (this.groupSelectRow === null) {
1416
         if (this.groupSelectRow === null) {

+ 7 - 2
src/xt_pages/user/doctorAdvice.vue Zobrazit soubor

42
           icon="el-icon-printer"
42
           icon="el-icon-printer"
43
           >打印
43
           >打印
44
         </el-button>
44
         </el-button>
45
+<!--        <el-button @click=lili()>调试</el-button>-->
45
       </div>
46
       </div>
46
       <div class="cell clearfix">
47
       <div class="cell clearfix">
47
         <el-input
48
         <el-input
2417
       });
2418
       });
2418
     },
2419
     },
2419
     submitNewAdvice(formName, action) {
2420
     submitNewAdvice(formName, action) {
2421
+      console.log("kkkthis.adviceForm",this.adviceForm)
2420
       this.$refs[formName].validate(valid => {
2422
       this.$refs[formName].validate(valid => {
2421
         if (valid) {
2423
         if (valid) {
2422
           let mode = "";
2424
           let mode = "";
2437
               var arr = this.adviceForm.advice_name.split("(自备药)")
2439
               var arr = this.adviceForm.advice_name.split("(自备药)")
2438
               this.adviceForm.advice_name = arr[0]
2440
               this.adviceForm.advice_name = arr[0]
2439
           }
2441
           }
2440
-          console.log("222222",this.adviceForm)
2442
+          console.log("222222???????this.adviceForm",this.adviceForm)
2441
 
2443
 
2442
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2444
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2443
             response => {
2445
             response => {
3129
         execution_frequency: row.execution_frequency,
3131
         execution_frequency: row.execution_frequency,
3130
         advice_doctor: row.advice_doctor,
3132
         advice_doctor: row.advice_doctor,
3131
         remark: "",
3133
         remark: "",
3132
-        parent_id: row.parent_id > 0 ? row.parent_id : row.id
3134
+        parent_id: row.parent_id > 0 ? row.parent_id : row.id,
3135
+        drug_id:""
3133
       };
3136
       };
3134
       this.dialogFormVisible = true;
3137
       this.dialogFormVisible = true;
3135
     },
3138
     },
4650
         this.nameForm.delivery_way = tmp.delivery_way//给药途径
4653
         this.nameForm.delivery_way = tmp.delivery_way//给药途径
4651
         this.nameForm.execution_frequency = tmp.execution_frequency//执行频率
4654
         this.nameForm.execution_frequency = tmp.execution_frequency//执行频率
4652
         this.nameForm.drug_id = tmp.id
4655
         this.nameForm.drug_id = tmp.id
4656
+        console.log("isiisisthis.adviceForm",this.adviceForm)
4657
+        this.adviceForm.drug_id = tmp.id
4653
       }
4658
       }
4654
   },
4659
   },
4655
   watch: {
4660
   watch: {