Browse Source

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 years ago
parent
commit
a56b5363ce

+ 26 - 0
src/api/his/his.js View File

@@ -105,6 +105,32 @@ export function delHisProject(params) {
105 105
 }
106 106
 
107 107
 
108
+export function getHisOrderList() {
109
+  return request({
110
+    url: "/api/hisorder/list",
111
+    method: "get",
112
+  });
113
+}
114
+
115
+
116
+export function getHisOrder(params) {
117
+  return request({
118
+    url: "/api/hisorder/get",
119
+    method: "get",
120
+    params:params,
121
+  });
122
+}
123
+
124
+
125
+export function getHisPrescriptionList() {
126
+  return request({
127
+    url: "/api/hisprescription/list",
128
+    method: "get",
129
+  });
130
+}
131
+
132
+
133
+
108 134
 
109 135
 
110 136
 

+ 1 - 3
src/xt_pages/management/components/MultipleForm.vue View File

@@ -137,9 +137,7 @@
137 137
             align="center"
138 138
             type="index"
139 139
           >
140
-            <!-- <template slot-scope="scope">
141
-                {{ scope.row.id }}
142
-              </template>-->
140
+
143 141
           </el-table-column>
144 142
           <el-table-column prop="name" label="分区" width="60" align="center">
145 143
             <template slot-scope="scope">{{ scope.row.name }}</template>

+ 27 - 95
src/xt_pages/outpatientCharges/components/prescriptionTable.vue View File

@@ -4,7 +4,7 @@
4 4
               :row-style="{ color: '#303133' }"
5 5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6 6
       <el-table-column align="center" prop="name" label="名称">
7
-        <template slot-scope="scope">{{ scope.row.advice_name }}</template>
7
+        <template slot-scope="scope">{{ scope.row.drug_name }}</template>
8 8
       </el-table-column>
9 9
 
10 10
       <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
@@ -15,26 +15,13 @@
15 15
       </el-table-column>
16 16
       <el-table-column align="center" prop="name" width="50" label="用法">
17 17
         <template slot-scope="scope">
18
-          <el-select v-model="scope.row.delivery_way" readonly placeholder="请选择">
19
-            <el-option
20
-              v-for="item,index in drugways"
21
-              :key="index"
22
-              :label="item.name"
23
-              :value="item.name">
24
-            </el-option>
25
-          </el-select>
18
+          <el-input v-model="scope.row.delivery_way" readonly></el-input>
19
+
26 20
         </template>
27 21
       </el-table-column>
28 22
       <el-table-column align="center" prop="name" width="50" label="频率">
29 23
         <template slot-scope="scope">
30
-          <el-select v-model="scope.row.execution_frequency" readonly placeholder="请选择">
31
-            <el-option
32
-              v-for="item in efs"
33
-              :key="index"
34
-              :label="item.name"
35
-              :value="item.name">
36
-            </el-option>
37
-          </el-select>
24
+          <el-input v-model="scope.row.execution_frequency" readonly></el-input>
38 25
         </template>
39 26
       </el-table-column>
40 27
 
@@ -42,13 +29,13 @@
42 29
         <template slot-scope="scope">
43 30
           <div style="display:flex;">
44 31
             <el-input v-model="scope.row.prescribing_number" style="width:50%" readonly placeholder=""></el-input>
45
-            <div> {{scope.row.min_unit}}</div>
32
+            <div>{{scope.row.min_unit}}</div>
46 33
           </div>
47 34
         </template>
48 35
       </el-table-column>
49 36
       <el-table-column align="center" prop="name" width="50" label="单价">
50 37
         <template slot-scope="scope">
51
-          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
38
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
52 39
         </template>
53 40
       </el-table-column>
54 41
       <el-table-column align="center" prop="name" width="50" label="备注">
@@ -62,49 +49,49 @@
62 49
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
63 50
 
64 51
       <el-table-column align="center" prop="project_name" label="名称">
65
-        <template slot-scope="scope">{{ scope.row.project.project_name }}</template>
52
+        <template slot-scope="scope">{{ scope.row.project_name }}</template>
66 53
       </el-table-column>
67 54
       <el-table-column align="center" prop="statistical_classification" width="50" label="组">
68 55
         <template slot-scope="scope">
69
-          {{getGroup(scope.row.project.statistical_classification)}}
56
+          {{getGroup(scope.row.statistical_classification)}}
70 57
         </template>
71 58
       </el-table-column>
72 59
       <el-table-column align="center" prop="single_dose" width="130" :label="'单次\n用量'">
73
-        <!--<template slot-scope="scope">-->
74
-          <!--&lt;!&ndash;<el-input v-model="scope.row.project.single_dose" placeholder="" readonly></el-input>&ndash;&gt;-->
75
-        <!--</template>-->
60
+        <template slot-scope="scope">
61
+          <el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>
62
+        </template>
76 63
       </el-table-column>
77 64
       <el-table-column align="center" prop="delivery_way" width="130" label="用法">
78
-        <!--<template slot-scope="scope">-->
79
-          <!--<el-input v-model="scope.row.project.delivery_way" placeholder="" readonly></el-input>-->
80
-        <!--</template>-->
65
+        <template slot-scope="scope">
66
+          <el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>
67
+        </template>
81 68
       </el-table-column>
82 69
       <el-table-column align="center" prop="execution_frequency" width="130" label="频率">
83
-        <!--<template slot-scope="scope">-->
84
-          <!--<el-input v-model="scope.row.project.execution_frequency" placeholder="" readonly></el-input>-->
85
-        <!--</template>-->
70
+        <template slot-scope="scope">
71
+          <el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>
72
+        </template>
86 73
       </el-table-column>
87 74
       <el-table-column align="center" prop="number_days" width="130" label="天数">
88
-        <!--<template slot-scope="scope">-->
89
-          <!--<el-input v-model="scope.row.project.number_days" placeholder="" readonly></el-input>-->
90
-        <!--</template>-->
75
+        <template slot-scope="scope">
76
+          <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
77
+        </template>
91 78
       </el-table-column>
92 79
       <el-table-column align="center" prop="total" width="100" label="总量">
93 80
         <template slot-scope="scope">
94 81
           <div style="display:flex;">
95
-            <el-input v-model="scope.row.project.total" style="width:50" placeholder="" readonly></el-input>
82
+            <el-input v-model="scope.row.total" style="width:50" placeholder="" readonly></el-input>
96 83
           </div>
97 84
         </template>
98 85
       </el-table-column>
99 86
       <el-table-column align="center" prop="name" width="50" label="单价">
100 87
         <template slot-scope="scope">
101
-          <el-input v-model="scope.row.project.price" placeholder="" readonly></el-input>
88
+          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
102 89
         </template>
103 90
       </el-table-column>
104 91
       <el-table-column align="center" prop="name" width="120" label="备注">
105
-        <!--<template slot-scope="scope">-->
106
-          <!--<el-input v-model="scope.row.project.remark" readonly></el-input>-->
107
-        <!--</template>-->
92
+        <template slot-scope="scope">
93
+          <el-input v-model="scope.row.remark" readonly></el-input>
94
+        </template>
108 95
       </el-table-column>
109 96
     </el-table>
110 97
   </div>
@@ -136,66 +123,11 @@
136 123
         } else {
137 124
           this.drugways = response.data.data.drugways
138 125
           this.efs = response.data.data.efs
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196 126
         }
197 127
       })
198 128
     }, methods:  {
129
+
130
+
199 131
       getGroup(id){
200 132
         var name = ""
201 133
         var statistics_category =  getDictionaryDataConfig('system','statistics_category')

File diff suppressed because it is too large
+ 560 - 408
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue


+ 114 - 81
src/xt_pages/outpatientCharges/summary.vue View File

@@ -1,93 +1,126 @@
1 1
 <template>
2
-    <div class="main-contain outpatientChargesManagement">
3
-        <div class="position">
4
-            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-        </div>
6
-        <div class="app-container">
7
-            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
-                <div>
9
-                    <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
10
-                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
11
-                    <el-select size="small" v-model="value" placeholder="请选择" style="width:150px;margin-left:10px;">
12
-                        <el-option
13
-                        v-for="item in options"
14
-                        :key="item.value"
15
-                        :label="item.label"
16
-                        :value="item.value">
17
-                        </el-option>
18
-                    </el-select>
19
-                    <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
20
-                    <el-radio v-model="radio" label="1">明细</el-radio>
21
-                    <el-radio v-model="radio" label="2">汇总</el-radio>
22
-                </div>
23
-                <el-button size="small" type="primary">报表下载</el-button>
24
-            </div>
25
-            <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
26
-                <el-table-column type="selection" width="55" align="center"></el-table-column>
27
-                <el-table-column align="center" prop="name" label="患者名字">
28
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
29
-                </el-table-column>
30
-                <el-table-column align="center" prop="name" label="处方号">
31
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
32
-                </el-table-column>
33
-                <el-table-column align="center" prop="name" label="创建时间">
34
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
35
-                </el-table-column>
36
-                <el-table-column align="center" prop="name" label="创建医生">
37
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
38
-                </el-table-column>
39
-                <el-table-column align="center" prop="name" label="项目名称">
40
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
41
-                </el-table-column>
42
-                <el-table-column align="center" prop="name" label="试管颜色">
43
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
44
-                </el-table-column>
45
-                <el-table-column align="center" prop="name" label="操作">
46
-                    <template slot-scope="scope">
47
-                        <el-button size="mini" type="primary" @click="toDetail">详情</el-button>
48
-                    </template>
49
-                </el-table-column>
50
-            </el-table>
2
+  <div class="main-contain outpatientChargesManagement">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+        <div>
9
+          <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
10
+                    class="filter-item"/>
11
+          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12
+            搜索
13
+          </el-button>
14
+          <el-select size="small" v-model="value" placeholder="请选择" style="width:150px;margin-left:10px;">
15
+            <el-option
16
+              v-for="item in options"
17
+              :key="item.value"
18
+              :label="item.label"
19
+              :value="item.value">
20
+            </el-option>
21
+          </el-select>
22
+          <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date"
23
+                          @change="handleScheduleDateChange" :editable="false" :clearable="false"
24
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间"
25
+                          align="right"></el-date-picker>
26
+          <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
27
+          <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
51 28
         </div>
29
+        <!--<el-button size="small" type="primary">报表下载</el-button>-->
30
+      </div>
31
+      <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }"
32
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
33
+        <el-table-column
34
+          prop="date"
35
+          label="序号"
36
+          width="60"
37
+          align="center"
38
+          type="index"
39
+        >
40
+        </el-table-column>
41
+        <el-table-column align="center" prop="name" label="门诊/销售编号">
42
+          <template slot-scope="scope">{{ scope.row.number }}</template>
43
+        </el-table-column>
44
+        <el-table-column align="center" prop="name" label="患者名字">
45
+          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
46
+        </el-table-column>
47
+        <el-table-column align="center" prop="name" label="患者类型">
48
+          <template slot-scope="scope">{{'医保'}}</template>
49
+        </el-table-column>
50
+        <el-table-column align="center" prop="name" label="应收金额">
51
+          <template slot-scope="scope"></template>
52
+        </el-table-column>
53
+        <el-table-column align="center" prop="name" label="实收金额">
54
+          <template slot-scope="scope"></template>
55
+        </el-table-column>
56
+        <el-table-column align="center" prop="name" label="舍入金额">
57
+          <template slot-scope="scope"></template>
58
+        </el-table-column>
59
+        <el-table-column align="center" prop="name" label="收费日期">
60
+          <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
61
+        </el-table-column>
62
+        <el-table-column align="center" prop="name" label="收费员">
63
+          <template slot-scope="scope">{{ scope.row.p_info.doctor }}</template>
64
+        </el-table-column>
65
+        <el-table-column align="center" prop="name" label="状态">
66
+          <template slot-scope="scope">
67
+            <div v-if="scope.row.order_status == 1">待结算</div>
68
+            <div v-if="scope.row.order_status == 2">已结算</div>
69
+            <div v-if="scope.row.order_status == 3">结算失败</div>
70
+          </template>
71
+        </el-table-column>
72
+        <el-table-column align="center" prop="name" label="操作">
73
+          <template slot-scope="scope">
74
+            <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
75
+          </template>
76
+        </el-table-column>
77
+      </el-table>
52 78
     </div>
79
+  </div>
53 80
 </template>
54 81
 
55 82
 
56 83
 <script>
57
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
58
-export default {
59
-    components:{
60
-        BreadCrumb,
84
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
85
+  import { getHisOrderList } from '@/api/his/his'
86
+  import { uParseTime } from '@/utils/tools'
87
+
88
+  export default {
89
+    components: {
90
+      BreadCrumb
61 91
     },
62
-    data(){
63
-        return{
64
-            crumbs: [
65
-                { path: false, name: '门诊收费' },
66
-                { path: false, name: '项目消费明细汇总' }
67
-            ],
68
-            tableData: [{
69
-            date: '2016-05-02',
70
-            name: '王小虎',
71
-            address: '上海市普陀区金沙江路 1518 弄'
72
-            }, {
73
-            date: '2016-05-04',
74
-            name: '王小虎',
75
-            address: '上海市普陀区金沙江路 1517 弄'
76
-            }, {
77
-            date: '2016-05-01',
78
-            name: '王小虎',
79
-            address: '上海市普陀区金沙江路 1519 弄'
80
-            }, {
81
-            date: '2016-05-03',
82
-            name: '王小虎',
83
-            address: '上海市普陀区金沙江路 1516 弄'
84
-            }]
85
-        }
92
+    data() {
93
+      return {
94
+        crumbs: [
95
+          { path: false, name: '门诊收费' },
96
+          { path: false, name: '项目消费明细汇总' }
97
+        ],
98
+        tableData: []
99
+      }
86 100
     },
87
-    methods:{
88
-        toDetail(){
89
-            this.$router.push('/outpatientCharges/summaryDetail')
101
+    methods: {
102
+      getTimes(time) {
103
+        return uParseTime(time, "{y}-{m}-{d}");
104
+      },
105
+      toDetail(row) {
106
+        this.$router.push('/outpatientCharges/summaryDetail?patient_id='+row.patient.id+"&number="+row.number)
107
+      }, getTime(value, temp) {
108
+        if (value != undefined) {
109
+          return uParseTime(value, temp)
90 110
         }
111
+        return ''
112
+      }
113
+    }, created() {
114
+      getHisOrderList().then(response => {
115
+        if (response.data.state == 0) {
116
+          this.$message.error(response.data.msg)
117
+          return false
118
+        } else {
119
+          this.tableData = response.data.data.order
120
+
121
+        }
122
+      })
123
+
91 124
     }
92
-}
125
+  }
93 126
 </script>

+ 174 - 88
src/xt_pages/outpatientCharges/summaryDetail.vue View File

@@ -7,80 +7,38 @@
7 7
             <div class="mainCenter">
8 8
                 <div class="centerLeft">
9 9
                     <div class="tabsBox">
10
-                        <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
11
-                        <el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab" :before-leave="moreState">
12
-                            <el-tab-pane
13
-                                v-for="(item, index) in editableTabs"
14
-                                :key="index"
15
-                                :label="item.title"
16
-                                :name="item.name"
17
-                            >
18
-                                <div class="RP">Rp</div>
19
-                                <el-table :data="tableData" border style="width: 99%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
20
-                                    <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
21
-                                    <el-table-column align="center" prop="name" label="名称">
22
-                                        <template slot-scope="scope">{{ scope.row.date }}</template>
23
-                                    </el-table-column>
24
-                                    <el-table-column align="center" prop="name" width="50" label="组套">
25
-                                        <template slot-scope="scope">
26
-
27
-                                        </template>
28
-                                    </el-table-column>
29
-                                    <el-table-column align="center" prop="name" width="50" :label="'单次\n用量'">
30
-                                        <template slot-scope="scope">
31
-
32
-                                        </template>
33
-                                    </el-table-column>
34
-                                    <el-table-column align="center" prop="name" width="50" label="用法">
35
-                                        <template slot-scope="scope">
36
-
37
-                                        </template>
38
-                                    </el-table-column>
39
-                                    <el-table-column align="center" prop="name" width="50" label="频率">
40
-                                        <template slot-scope="scope">
41
-
42
-                                        </template>
43
-                                    </el-table-column>
44
-                                    <el-table-column align="center" prop="name" width="50" label="天数">
45
-                                        <template slot-scope="scope">
46
-
47
-                                        </template>
48
-                                    </el-table-column>
49
-                                    <el-table-column align="center" prop="name" width="100" label="总量">
50
-                                        <template slot-scope="scope">
51
-
52
-                                        </template>
53
-                                    </el-table-column>
54
-                                    <el-table-column align="center" prop="name" width="50" label="单价">
55
-                                        <template slot-scope="scope">
56
-
57
-                                        </template>
58
-                                    </el-table-column>
59
-                                    <el-table-column align="center" prop="name" width="50" label="备注">
60
-                                        <template slot-scope="scope">
61
-
62
-                                        </template>
63
-                                    </el-table-column>
64
-                                </el-table>
65
-                            </el-tab-pane>
66
-                        </el-tabs>
10
+                      <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
11
+                        <el-tab-pane
12
+                          v-for="(item, index) in prescriptions"
13
+                          :key="index"
14
+                          :label="item.name"
15
+                          :name="item.name"
16
+                        >
17
+                        </el-tab-pane>
18
+
19
+                        <div class="RP">
20
+                          Rp
21
+                        </div>
22
+                        <prescription-table ref="prescription_tables"
23
+                                            :prescription="curPrescriptions"></prescription-table>
24
+
25
+                      </el-tabs>
67 26
 
68 27
                     </div>
69 28
                     <div class="costBox">
70
-                        <span>处方编号:2134348971237883</span>
71
-                        <span>当前处方总费用:<span style="color:red;">0.00元</span></span>
72
-                        <span>已收费</span>
29
+                      <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
30
+                      <span>{{ state }}</span>
73 31
                     </div>
74 32
                 </div>
75 33
                 <div class="centerRight">
76 34
                     <p class="centerRightTitle">人员信息</p>
77 35
                     <ul class="basicUl">
78
-                        <li style="width:50%;">姓名:张三</li>
79
-                        <li style="width:50%;">性别:男</li>
80
-                        <li style="width:50%;">年龄:12</li>
81
-                        <li style="width:50%;">身高:123</li>
82
-                        <li style="width:50%;">体重:44kg</li>
83
-                        <li style="width:50%;">电话:348971237883</li>
36
+                        <li style="width:50%;">姓名:{{patientInfo.name}}</li>
37
+                        <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
38
+                        <li style="width:50%;">年龄:{{patientInfo.age }}</li>
39
+                        <li style="width:50%;">身高:{{patientInfo.height?patientInfo.height:''}}</li>
40
+                        <li style="width:50%;">体重:{{patientInfo.weight?patientInfo.weight:''}}</li>
41
+                        <li style="width:50%;">电话:{{patientInfo.phone}}</li>
84 42
                     </ul>
85 43
                     <p class="centerRightTitle">收费信息</p>
86 44
                     <ul class="basicUl">
@@ -104,9 +62,14 @@
104 62
 
105 63
 <script>
106 64
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
65
+import { getHisOrder } from '@/api/his/his'
66
+import prescriptionTable from './components/prescriptionTable'
67
+
107 68
 export default {
108 69
     components:{
109 70
         BreadCrumb,
71
+      prescriptionTable,
72
+
110 73
     },
111 74
     data(){
112 75
         return{
@@ -114,31 +77,154 @@ export default {
114 77
                 { path: false, name: '门诊收费' },
115 78
                 { path: false, name: '项目消费明细汇总详情' }
116 79
             ],
117
-            tableData: [{
118
-            date: '2016-05-02',
119
-            name: '王小虎',
120
-            address: '上海市普陀区金沙江路 1518 弄'
121
-            }, {
122
-            date: '2016-05-04',
123
-            name: '王小虎',
124
-            address: '上海市普陀区金沙江路 1517 弄'
125
-            }, {
126
-            date: '2016-05-01',
127
-            name: '王小虎',
128
-            address: '上海市普陀区金沙江路 1519 弄'
129
-            }, {
130
-            date: '2016-05-03',
131
-            name: '王小虎',
132
-            address: '上海市普陀区金沙江路 1516 弄'
133
-            }],
134
-            editableTabsValue: '1',
135
-            editableTabs: [{
80
+          info: {},
81
+          curPrescriptions: {},
82
+          prescriptions: [],
83
+          record_date: '',
84
+          tableData: [],
85
+          editableTabsValue: '1',
86
+          loadingone: false,
87
+          editableTabs: [{
136 88
             title: '处方1',
137
-            name: '1',
138
-            }],
139
-            tabIndex: 1,
89
+            name: '1'
90
+          }],
91
+          tabIndex: 1,
92
+          hisPatientInfo: {},
93
+          loadingtwo: false,
94
+          patientTableData: [{
95
+            name: '杨美英',
96
+            mdtrt_id: '1709946'
97
+          }],
98
+          patientInfo: { id: 0 },
99
+          doctor: {},
100
+          total: 0,
101
+          state: '未收费',
102
+          radio: 1,
103
+          radioStatus: 1,
104
+          search_input: '',
105
+        }
106
+    },created(){
107
+      this.GetOrderDetail()
108
+  },methods:{
109
+
110
+    tabclickEvent(val) {
111
+      for (let i = 0; i < this.prescriptions.length; i++) {
112
+        if (this.prescriptions[i].name == val.name) {
113
+          this.curPrescriptions = {}
114
+          var temp = this.deepClone(this.prescriptions[i])
115
+          this.curPrescriptions = temp
116
+        }
117
+      }
118
+    }, deepClone(source) {
119
+      if (!source && typeof source !== 'object') {
120
+        throw new Error('error arguments', 'shallowClone')
121
+      }
122
+      const targetObj = source.constructor === Array ? [] : {}
123
+      Object.keys(source).forEach((keys) => {
124
+        if (source[keys] && typeof source[keys] === 'object') {
125
+          targetObj[keys] = this.deepClone(source[keys])
126
+        } else {
127
+          targetObj[keys] = source[keys]
128
+        }
129
+      })
130
+      return targetObj
131
+    },
132
+    getTotal() {
133
+      var total = 0
134
+      for (let i = 0; i < this.prescriptions.length; i++) {
135
+        if (this.prescriptions[i].advices != null) {
136
+          for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
137
+            total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
138
+          }
139
+        }
140
+        if (this.prescriptions[i].project != null) {
141
+          for (let b = 0; b < this.prescriptions[i].project.length; b++) {
142
+            total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
143
+          }
144
+        }
145
+      }
146
+      return total
147
+    },
148
+    moreState(tab, event) {
149
+      if (tab == 'more') {
150
+        return false
151
+      }
152
+    },
153
+    GetOrderDetail(){
154
+      let params={
155
+        number:this.$route.query.number,
156
+        patient_id:this.$route.query.patient_id,
157
+      }
158
+      getHisOrder(params).then(response => {
159
+        if (response.data.state == 0) {
160
+          this.$message.error(response.data.msg)
161
+          return false
162
+        } else {
163
+          this.patientInfo = response.data.data.order.patient
164
+          this.hisPatientInfo = response.data.data.order.his_patient
165
+          this.info = response.data.data.p_info
166
+          this.prescriptions = []
167
+          for (let i = 0; i < response.data.data.prescription.length; i++) {
168
+            var prescription = response.data.data.prescription[i]
169
+
170
+            let tempAdvice = []
171
+            let tempProject = []
172
+
173
+            for (let b = 0; b < prescription.advices.length; b++) {
174
+              let obj = {
175
+                advice_id: prescription.advices[b].id,
176
+                drug_name: prescription.advices[b].advice_name,
177
+                single_dose: prescription.advices[b].single_dose,
178
+                delivery_way: prescription.advices[b].delivery_way,
179
+                execution_frequency: prescription.advices[b].execution_frequency,
180
+                retail_price: prescription.advices[b].price.toString(),
181
+                remark: prescription.advices[b].remark,
182
+                prescribing_number: prescription.advices[b].prescribing_number.toString(),
183
+                single_dose_unit: prescription.advices[b].single_dose_unit,
184
+                prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
185
+                min_unit: prescription.advices[b].single_dose_unit,
186
+                medical_insurance_number: prescription.advices[b].med_list_codg
187
+
188
+              }
189
+              tempAdvice.push(obj)
190
+            }
191
+
192
+            for (let b = 0; b < prescription.project.length; b++) {
193
+              console.log(prescription.project[b].project.project_name)
194
+              let obj = {
195
+                id: prescription.project[b].id,
196
+                project_id: prescription.project[b].project.id,
197
+                project_name: prescription.project[b].project.project_name,
198
+                statistical_classification: prescription.project[b].statistical_classification,
199
+                single_dose: prescription.project[b].single_dose,
200
+                delivery_way: prescription.project[b].delivery_way,
201
+                execution_frequency: prescription.project[b].execution_frequency,
202
+                number_days: prescription.project[b].day,
203
+                total: prescription.project[b].count.toString(),
204
+                price: prescription.project[b].price,
205
+                remark: prescription.project[b].remark,
206
+                medical_code: prescription.project[b].project.medical_code
207
+              }
208
+              tempProject.push(obj)
209
+            }
210
+            let index = i + 1
211
+            let obj = {
212
+              id: prescription.id,
213
+              name: '处方' + index,
214
+              advices: tempAdvice,
215
+              project: tempProject,
216
+              type: response.data.data.prescription[i].type
217
+            }
218
+            this.prescriptions.push(obj)
219
+            this.curPrescriptions = this.prescriptions[0]
220
+
221
+          }
222
+          // this.tableData = response.data.data.order
223
+
140 224
         }
225
+      })
141 226
     }
227
+  }
142 228
 }
143 229
 </script>
144 230
 

+ 165 - 88
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -24,10 +24,10 @@
24 24
           <el-form-item label="挂号类型: " prop="name">
25 25
             <el-select style="margin-right:5px;" v-model="register_type" placeholder="">
26 26
               <el-option
27
-                v-for="(item,index) in doctors"
27
+                v-for="(item,index) in getDictionaryDataConfig('system','register_type')"
28 28
                 :key="index"
29
-                :label="item.user_name"
30
-                :value="item.id">
29
+                :label="item.name"
30
+                :value="item.name">
31 31
               </el-option>
32 32
             </el-select>
33 33
           </el-form-item>
@@ -40,7 +40,7 @@
40 40
               placeholder="请输入内容"
41 41
             ></el-autocomplete>
42 42
           </el-form-item>
43
-          <el-form-item label="特殊病史: " prop="name">
43
+          <el-form-item label="过敏史及特殊病史: " prop="name">
44 44
             <el-autocomplete
45 45
               style="width:100%;"
46 46
               class="inline-input"
@@ -78,16 +78,16 @@
78 78
               v-for="(item,index) in doctors"
79 79
               :key="index"
80 80
               :label="item.user_name"
81
-              :value="item.id">
81
+              :value="item.user_name">
82 82
             </el-option>
83 83
           </el-select>
84 84
           <span>科室:</span>
85 85
           <el-select style="margin-right:5px;" v-model="departmentValue" placeholder="">
86 86
             <el-option
87
-              v-for="(item,index) in departMent"
87
+              v-for="(item,index) in getDictionaryDataConfig('system','department')"
88 88
               :key="index"
89 89
               :label="item.name"
90
-              :value="item.id">
90
+              :value="item.name">
91 91
             </el-option>
92 92
           </el-select>
93 93
           <span>总计:</span>
@@ -306,16 +306,16 @@
306 306
         for (let i = 0; i < this.prescriptions.length; i++) {
307 307
           if (this.prescriptions[i].advices != null) {
308 308
             for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
309
-              total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
309
+              total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
310 310
             }
311 311
           }
312 312
           if (this.prescriptions[i].project != null) {
313 313
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
314
-              total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].count
314
+              total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
315 315
             }
316 316
           }
317 317
         }
318
-        return total
318
+        return Math.floor(total * 100) / 100
319 319
       },
320 320
       createFilter(queryString) {
321 321
         return (restaurant) => {
@@ -370,7 +370,7 @@
370 370
             this.allDrugs = response.data.data.drugs
371 371
             this.advices_template = response.data.data.advices_template
372 372
             this.doctors = response.data.data.doctors
373
-            this.departMent = response.data.data.department
373
+
374 374
 
375 375
           }
376 376
         })
@@ -413,7 +413,8 @@
413 413
           }
414 414
 
415 415
         }
416
-      }, clearData() {
416
+      },
417
+      clearData() {
417 418
         console.log("111111")
418 419
         this.curPrescriptions = []
419 420
         this.curStatus = 0
@@ -423,12 +424,35 @@
423 424
 
424 425
 
425 426
       },
426
-      setData(data) {
427
+      setData(data,info) {
427 428
         this.curStatus = 0
428
-
429 429
         this.prescriptions = data
430 430
         this.curPrescriptions = this.prescriptions[0]
431
-        console.log(this.$refs)
431
+        if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0 ){
432
+          this.curStatus = 1
433
+          this.customTabIndex= 1
434
+          this.rightTab = 1
435
+          this.showOne = true
436
+          this.showTwo = false
437
+
438
+        }
439
+
440
+        if(this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0 ){
441
+          this.curStatus = 2
442
+          this.customTabIndex= 2
443
+          this.rightTab = 2
444
+          this.showOne = false
445
+          this.showTwo = true
446
+        }
447
+
448
+
449
+        this.state1 = info.diagnosis
450
+        this.state2 = info.sick_history
451
+        this.doctorValue = info.doctor
452
+        this.departmentValue = info.departments
453
+
454
+
455
+        // console.log(this.$refs)
432 456
         // this.$nextTick(() => {
433 457
         //   this.$refs.prescription_tables.setNewData(this.prescriptions[0])
434 458
         // })
@@ -439,6 +463,16 @@
439 463
         }
440 464
       },
441 465
       open(index) {
466
+        if(this.doctorValue.length <= 0){
467
+          this.$message.error("医生不能为空")
468
+          return
469
+        }
470
+
471
+        if(this.departmentValue.length <= 0){
472
+          this.$message.error("科室不能为空")
473
+          return
474
+        }
475
+
442 476
         if (index == 1) {
443 477
           let params = {
444 478
             patient_id: this.patientInfo.id,
@@ -463,6 +497,11 @@
463 497
               this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
464 498
 
465 499
             }
500
+
501
+            for (let b = 0; b < this.prescriptions[i].project.length; b++) {
502
+              this.prescriptions[i].project[b].price = parseFloat(this.prescriptions[i].project[b].price)
503
+
504
+            }
466 505
           }
467 506
           let data = {
468 507
             'prescriptions': this.prescriptions
@@ -497,88 +536,100 @@
497 536
         this.curStatus = 0
498 537
       },
499 538
       removeTab(targetName) {
500
-        let id = 0
501
-        for (let i = 0; i < this.prescriptions.length; i++) {
502
-          if (this.prescriptions[i].name == targetName) {
503
-            id = this.prescriptions[i].id
539
+        this.$confirm("处方删除后不可恢复,是否确认删除", "删除", {
540
+          confirmButtonText: "确 定",
541
+          cancelButtonText: "取 消",
542
+          type: "warning"
543
+        }).then(() => {
544
+          let id = 0
545
+          for (let i = 0; i < this.prescriptions.length; i++) {
546
+            if (this.prescriptions[i].name == targetName) {
547
+              id = this.prescriptions[i].id
548
+            }
504 549
           }
505
-        }
506 550
 
507
-        if (id == 0) {
508
-          let tabs = this.prescriptions
509
-          let activeName = this.editableTabsValue
510
-          if (activeName === targetName) {
511
-            tabs.forEach((tab, index) => {
512
-              if (tab.name === targetName) {
513
-                let nextTab = tabs[index + 1] || tabs[index - 1]
514
-                if (nextTab) {
515
-                  activeName = nextTab.name
551
+          if (id == 0) {
552
+            let tabs = this.prescriptions
553
+            let activeName = this.editableTabsValue
554
+            if (activeName === targetName) {
555
+              tabs.forEach((tab, index) => {
556
+                if (tab.name === targetName) {
557
+                  let nextTab = tabs[index + 1] || tabs[index - 1]
558
+                  if (nextTab) {
559
+                    activeName = nextTab.name
516 560
 
561
+                  }
562
+                }
563
+              })
564
+            }
565
+            this.editableTabsValue = activeName
566
+            this.prescriptions = tabs.filter(tab => tab.name !== targetName)
567
+
568
+            for (let i = 0; i < this.prescriptions.length; i++) {
569
+              if (activeName == this.prescriptions[i].name) {
570
+                this.curPrescriptions = this.prescriptions[i]
571
+                if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
572
+                  this.curStatus = 1
573
+                }
574
+                if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
575
+                  this.curStatus = 2
517 576
                 }
518
-              }
519
-            })
520
-          }
521
-          this.editableTabsValue = activeName
522
-          this.prescriptions = tabs.filter(tab => tab.name !== targetName)
523
-
524
-          for (let i = 0; i < this.prescriptions.length; i++) {
525
-            if (activeName == this.prescriptions[i].name) {
526
-              this.curPrescriptions = this.prescriptions[i]
527
-              if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
528
-                this.curStatus = 1
529
-              }
530
-              if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
531
-                this.curStatus = 2
532 577
               }
533 578
             }
579
+            if (this.prescriptions.length == 0) {
580
+              this.curPrescriptions = []
581
+              this.curStatus = 0
582
+            }
534 583
           }
535
-          if (this.prescriptions.length == 0) {
536
-            this.curPrescriptions = []
537
-            this.curStatus = 0
538
-          }
539
-        } else {
540
-          let params = {
541
-            'id': id
542
-          }
543
-          delHisPrescription(params).then(response => {
544
-            if (response.data.state == 1) {
545
-              this.$message.success('删除成功')
546
-              let tabs = this.prescriptions
547
-              let activeName = this.editableTabsValue
548
-              if (activeName === targetName) {
549
-                tabs.forEach((tab, index) => {
550
-                  if (tab.name === targetName) {
551
-                    let nextTab = tabs[index + 1] || tabs[index - 1]
552
-                    if (nextTab) {
553
-                      activeName = nextTab.name
554
-
584
+          else {
585
+            let params = {
586
+              'id': id
587
+            }
588
+            delHisPrescription(params).then(response => {
589
+              if (response.data.state == 1) {
590
+                this.$message.success('删除成功')
591
+                let tabs = this.prescriptions
592
+                let activeName = this.editableTabsValue
593
+                if (activeName === targetName) {
594
+                  tabs.forEach((tab, index) => {
595
+                    if (tab.name === targetName) {
596
+                      let nextTab = tabs[index + 1] || tabs[index - 1]
597
+                      if (nextTab) {
598
+                        activeName = nextTab.name
599
+
600
+                      }
601
+                    }
602
+                  })
603
+                }
604
+                this.editableTabsValue = activeName
605
+                this.prescriptions = tabs.filter(tab => tab.name !== targetName)
606
+
607
+                for (let i = 0; i < this.prescriptions.length; i++) {
608
+                  if (activeName == this.prescriptions[i].name) {
609
+                    this.curPrescriptions = this.prescriptions[i]
610
+                    if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
611
+                      this.curStatus = 1
612
+                    }
613
+                    if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
614
+                      this.curStatus = 2
555 615
                     }
556
-                  }
557
-                })
558
-              }
559
-              this.editableTabsValue = activeName
560
-              this.prescriptions = tabs.filter(tab => tab.name !== targetName)
561
-
562
-              for (let i = 0; i < this.prescriptions.length; i++) {
563
-                if (activeName == this.prescriptions[i].name) {
564
-                  this.curPrescriptions = this.prescriptions[i]
565
-                  if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
566
-                    this.curStatus = 1
567
-                  }
568
-                  if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
569
-                    this.curStatus = 2
570 616
                   }
571 617
                 }
618
+                if (this.prescriptions.length == 0) {
619
+                  this.curPrescriptions = []
620
+                  this.curStatus = 0
621
+                }
622
+              } else {
623
+                this.$message.success(response.data.msg)
572 624
               }
573
-              if (this.prescriptions.length == 0) {
574
-                this.curPrescriptions = []
575
-                this.curStatus = 0
576
-              }
577
-            } else {
578
-              this.$message.success(response.data.msg)
579
-            }
580
-          })
581
-        }
625
+            })
626
+          }
627
+
628
+        })
629
+          .catch(() => {});
630
+
631
+
632
+
582 633
       },
583 634
       clickTab(index) {
584 635
         if (index == 1){
@@ -648,8 +699,6 @@
648 699
       },
649 700
       comfirm() {
650 701
 
651
-
652
-
653 702
         if (this.curStatus == 1  && this.rightTab == 2) {
654 703
           this.$message.error('改处方是药品,无法添加项目')
655 704
           this.teamList = []
@@ -664,6 +713,33 @@
664 713
           return
665 714
         }
666 715
 
716
+        for (let i = 0; i < this.teamList.length; i++){
717
+          for (let a = 0; a < this.curPrescriptions.project.length; a++){
718
+            if(this.teamList[i].id == this.curPrescriptions.project[a].project_id){
719
+              this.$message.error('改处方存在相同的项目,无法添加相同的项目')
720
+              return
721
+
722
+            }
723
+          }
724
+        }
725
+
726
+        console.log(this.curDrugs)
727
+        console.log(this.curPrescriptions.advices)
728
+
729
+
730
+        for (let i = 0; i < this.curDrugs.length; i++){
731
+          for (let a = 0; a < this.curPrescriptions.advices.length; a++){
732
+            if(this.curDrugs[i].id == this.curPrescriptions.advices[i].id){
733
+              this.$message.error('改处方存在相同的药品,无法添加相同的药品')
734
+              return
735
+
736
+            }
737
+          }
738
+        }
739
+
740
+
741
+
742
+
667 743
         for (let i = 0; i < this.prescriptions.length; i++) {
668 744
           if (this.prescriptions[i].name == this.editableTabsValue) {
669 745
             var temp = this.deepClone(this.curDrugs)
@@ -674,6 +750,7 @@
674 750
               for (let b = 0; b < temp.length; b++) {
675 751
                 let obj = {
676 752
                   advice_id: 0,
753
+                  id:  temp[b].id,
677 754
                   drug_name: temp[b].drug_name,
678 755
                   single_dose: temp[b].single_dose,
679 756
                   delivery_way: temp[b].delivery_way,

+ 58 - 42
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

@@ -197,29 +197,40 @@
197 197
 
198 198
       },deleteDrug:function(index, row){
199 199
 
200
-       this.$nextTick(function(){
201
-         this.prescription.advices.splice(index, 1)
202
-         // if(row.advice_id == 0){
203
-         // }else{
204
-         //   let params = {
205
-         //     'id': row.advice_id,
206
-         //   }
207
-         //   delHisAdvice(params).then(response => {
208
-         //     if (response.data.state == 0) {
209
-         //       this.$message.error(response.data.msg)
210
-         //       return false
211
-         //     } else {
212
-         //       var temp2 = this.deepClone(this.prescription.advices)
213
-         //       temp2.splice(index, 1)
214
-         //       this.prescription.advices = temp2
215
-         //       this.$message.success(response.data.data.msg)
216
-         //     }
217
-         //   })
218
-         //
219
-         //
220
-         // }
200
+       this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
201
+         confirmButtonText: "确 定",
202
+         cancelButtonText: "取 消",
203
+         type: "warning"
204
+       }).then(() => {
205
+         this.$nextTick(function(){
206
+           // this.prescription.advices.splice(index, 1)
207
+           if(row.advice_id == 0){
208
+           }else{
209
+             let params = {
210
+               'id': row.advice_id,
211
+             }
212
+             delHisAdvice(params).then(response => {
213
+               if (response.data.state == 0) {
214
+                 this.$message.error(response.data.msg)
215
+                 return false
216
+               } else {
217
+                 var temp2 = this.deepClone(this.prescription.advices)
218
+                 temp2.splice(index, 1)
219
+                 this.prescription.advices = temp2
220
+                 this.$message.success(response.data.data.msg)
221
+               }
222
+             })
223
+
224
+
225
+           }
226
+
227
+         });
228
+
229
+
230
+       })
231
+         .catch(() => {});
232
+
221 233
 
222
-       });
223 234
 
224 235
 
225 236
 
@@ -258,29 +269,34 @@
258 269
          return name
259 270
       },
260 271
       deleteProject(row){
261
-        if(row.id == 0){
262
-          this.prescription.project.splice(i, 1)
272
+        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
273
+          confirmButtonText: "确 定",
274
+          cancelButtonText: "取 消",
275
+          type: "warning"
276
+        }).then(() => {
277
+          if(row.id == 0){
278
+            this.prescription.project.splice(i, 1)
263 279
 
264
-        }else{
265
-          let params = {
266
-            'id': row.id,
267
-          }
268
-          delHisProject(params).then(response => {
269
-            if (response.data.state == 0) {
270
-              this.$message.error(response.data.msg)
271
-              return false
272
-            } else {
273
-              for (let i = 0; i < this.prescription.project.length; i++){
274
-                if(this.prescription.project[i].id == row.id){
275
-                  this.prescription.project.splice(i, 1)
280
+          }else{
281
+            let params = {
282
+              'id': row.id,
283
+            }
284
+            delHisProject(params).then(response => {
285
+              if (response.data.state == 0) {
286
+                this.$message.error(response.data.msg)
287
+                return false
288
+              } else {
289
+                for (let i = 0; i < this.prescription.project.length; i++){
290
+                  if(this.prescription.project[i].id == row.id){
291
+                    this.prescription.project.splice(i, 1)
292
+                  }
276 293
                 }
294
+                this.$message.success(response.data.data.msg)
277 295
               }
278
-              this.$message.error(response.data.data.msg)
279
-            }
280
-          })
281
-
282
-
283
-        }
296
+            })
297
+          }
298
+        })
299
+          .catch(() => {});
284 300
 
285 301
       },
286 302
     },mounted(){

+ 14 - 8
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -47,7 +47,7 @@
47 47
         </div>
48 48
         <!--<desk-prescription ref="prescriptions"   :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
49 49
         <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
50
-        <desk-prescription :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
50
+        <desk-prescription  :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
51 51
                            ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
52 52
                            :hisPatientInfo="hisPatientInfo"
53 53
                            v-if="titleType == '处方'" style="flex:1;"></desk-prescription>
@@ -99,7 +99,8 @@
99 99
         case_history: {},
100 100
         patient_id: 0,
101 101
         diagnoses: [],
102
-        other_sick: []
102
+        other_sick: [],
103
+        info:{},
103 104
 
104 105
       }
105 106
     },
@@ -167,6 +168,11 @@
167 168
             this.patientInfo = response.data.data.xt_info
168 169
             this.hisPatientInfo = response.data.data.his_info
169 170
             this.case_history = response.data.data.case_history
171
+
172
+            this.info = response.data.data.info
173
+
174
+
175
+
170 176
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
171 177
             if (this.case_history.temperature <= 0) {
172 178
               this.case_history.temperature = ''
@@ -218,7 +224,7 @@
218 224
                     prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
219 225
                     min_unit:prescription.advices[b].single_dose_unit,
220 226
                     medical_insurance_number:prescription.advices[b].med_list_codg,
221
-
227
+                    id:prescription.advices[b].drug_id
222 228
                   }
223 229
                   tempAdvice.push(obj)
224 230
                 }
@@ -232,10 +238,10 @@
232 238
                     project_id: prescription.project[b].project.id,
233 239
                     project_name: prescription.project[b].project.project_name,
234 240
                     statistical_classification: prescription.project[b].project.statistical_classification,
235
-                    single_dose: prescription.project[b].project.single_dose,
236
-                    delivery_way: prescription.project[b].project.delivery_way,
237
-                    execution_frequency: prescription.project[b].project.execution_frequency,
238
-                    number_days: prescription.project[b].project.number_days,
241
+                    single_dose: prescription.project[b].single_dose,
242
+                    delivery_way: prescription.project[b].delivery_way,
243
+                    execution_frequency: prescription.project[b].execution_frequency,
244
+                    number_days: prescription.project[b].day,
239 245
                     total:prescription.project[b].count.toString(),
240 246
                     price:prescription.project[b].price,
241 247
                     remark:prescription.project[b].remark,
@@ -265,7 +271,7 @@
265 271
               this.prescriptions.push(obj)
266 272
             }
267 273
 
268
-            this.$refs.prescriptions.setData(this.prescriptions)
274
+            this.$refs.prescriptions.setData(this.prescriptions,this.info)
269 275
           }
270 276
         })
271 277
 

+ 112 - 91
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

@@ -1,100 +1,121 @@
1 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 class="cell clearfix">
8
-                <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
9
-                <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
10
-                <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
11
-            </div>
12
-            <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
13
-                <el-table-column align="center" width="60" label="序号">
14
-                    <template slot-scope="scope">
15
-                        1
16
-                    </template>
17
-                </el-table-column>
18
-                <el-table-column align="center" prop="name" label="姓名" width="100">
19
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
20
-                </el-table-column>
21
-                <el-table-column align="center" prop="name" label="处方日期" width="110">
22
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
23
-                </el-table-column>
24
-                <el-table-column align="center" prop="name" label="患者类型">
25
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
26
-                </el-table-column>
27
-                <el-table-column align="center" prop="name" label="处方号">
28
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
29
-                </el-table-column>
30
-                <el-table-column align="center" prop="name" label="开立医生">
31
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
32
-                </el-table-column>
33
-                <el-table-column align="center" prop="name" label="诊断">
34
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
35
-                </el-table-column>
36
-                <el-table-column align="center" prop="name" label="状态">
37
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
38
-                </el-table-column>
39
-                <el-table-column align="center" prop="name" label="操作" width="100">
40
-                    <template slot-scope="scope">
41
-                        <el-button size="mini" type="primary" @click="handerDelete">详情</el-button>
42
-                    </template>
43
-                </el-table-column>
44
-            </el-table>
45
-            <el-pagination
46
-                @size-change="handleSizeChange"
47
-                @current-change="handleCurrentChange"
48
-                :page-sizes="[10, 50, 100]"
49
-                :page-size="10"
50
-                background
51
-                style="margin-top:20px;float: right"
52
-                layout="total, sizes, prev, pager, next, jumper"
53
-                :total="total"
54
-            >
55
-            </el-pagination>
56
-            <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
57
-        </div>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
58 5
     </div>
6
+    <div class="app-container">
7
+      <div class="cell clearfix">
8
+        <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
9
+                  class="filter-item"/>
10
+        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
11
+        </el-button>
12
+        <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
13
+                        :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
14
+                        placeholder="选择日期时间" align="right"></el-date-picker>
15
+      </div>
16
+      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
17
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
18
+        <el-table-column align="center" width="60" label="序号">
19
+          <template slot-scope="scope">
20
+            1
21
+          </template>
22
+        </el-table-column>
23
+        <el-table-column align="center" prop="name" label="姓名" width="100">
24
+          <template slot-scope="scope">{{ scope.row.date }}</template>
25
+        </el-table-column>
26
+        <el-table-column align="center" prop="name" label="处方日期" width="110">
27
+          <template slot-scope="scope">{{ scope.row.date }}</template>
28
+        </el-table-column>
29
+        <el-table-column align="center" prop="name" label="患者类型">
30
+          <template slot-scope="scope">{{ scope.row.date }}</template>
31
+        </el-table-column>
32
+        <el-table-column align="center" prop="name" label="处方号">
33
+          <template slot-scope="scope">{{ scope.row.date }}</template>
34
+        </el-table-column>
35
+        <el-table-column align="center" prop="name" label="开立医生">
36
+          <template slot-scope="scope">{{ scope.row.date }}</template>
37
+        </el-table-column>
38
+        <el-table-column align="center" prop="name" label="诊断">
39
+          <template slot-scope="scope">{{ scope.row.date }}</template>
40
+        </el-table-column>
41
+        <el-table-column align="center" prop="name" label="状态">
42
+          <template slot-scope="scope">{{ scope.row.date }}</template>
43
+        </el-table-column>
44
+        <el-table-column align="center" prop="name" label="操作" width="100">
45
+          <template slot-scope="scope">
46
+            <el-button size="mini" type="primary" @click="handerDelete">详情</el-button>
47
+          </template>
48
+        </el-table-column>
49
+      </el-table>
50
+      <el-pagination
51
+        @size-change="handleSizeChange"
52
+        @current-change="handleCurrentChange"
53
+        :page-sizes="[10, 50, 100]"
54
+        :page-size="10"
55
+        background
56
+        style="margin-top:20px;float: right"
57
+        layout="total, sizes, prev, pager, next, jumper"
58
+        :total="total"
59
+      >
60
+      </el-pagination>
61
+      <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
62
+    </div>
63
+  </div>
59 64
 </template>
60 65
 
61 66
 <script>
62
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
63
-import inquiriesDetail from './components/inquiriesDetail'
64
-export default {
65
-    components:{
66
-        BreadCrumb,
67
-        inquiriesDetail
67
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
68
+  import inquiriesDetail from './components/inquiriesDetail'
69
+  import { getHisPrescriptionList } from '@/api/his/his'
70
+
71
+  export default {
72
+    components: {
73
+      BreadCrumb,
74
+      inquiriesDetail
68 75
     },
69
-    data(){
70
-        return{
71
-            crumbs: [
72
-                { path: false, name: '门诊医生站' },
73
-                { path: false, name: '既往查询' }
74
-            ],
75
-            tableData: [{
76
-            date: '2016-05-02',
77
-            name: '王小虎',
78
-            address: '上海市普陀区金沙江路 1518 弄'
79
-            }, {
80
-            date: '2016-05-04',
81
-            name: '王小虎',
82
-            address: '上海市普陀区金沙江路 1517 弄'
83
-            }, {
84
-            date: '2016-05-01',
85
-            name: '王小虎',
86
-            address: '上海市普陀区金沙江路 1519 弄'
87
-            }, {
88
-            date: '2016-05-03',
89
-            name: '王小虎',
90
-            address: '上海市普陀区金沙江路 1516 弄'
91
-            }]
92
-        }
76
+    data() {
77
+      return {
78
+        crumbs: [
79
+          { path: false, name: '门诊医生站' },
80
+          { path: false, name: '既往查询' }
81
+        ],
82
+        tableData: [{
83
+          date: '2016-05-02',
84
+          name: '王小虎',
85
+          address: '上海市普陀区金沙江路 1518 弄'
86
+        }, {
87
+          date: '2016-05-04',
88
+          name: '王小虎',
89
+          address: '上海市普陀区金沙江路 1517 弄'
90
+        }, {
91
+          date: '2016-05-01',
92
+          name: '王小虎',
93
+          address: '上海市普陀区金沙江路 1519 弄'
94
+        }, {
95
+          date: '2016-05-03',
96
+          name: '王小虎',
97
+          address: '上海市普陀区金沙江路 1516 弄'
98
+        }]
99
+      }
93 100
     },
94
-    methods:{
95
-        handerDelete(){
96
-            this.$refs.inquiriesDetail.show()
97
-        }
101
+    methods: {
102
+      handerDelete() {
103
+        this.$refs.inquiriesDetail.show()
104
+      }, getHisPrescriptionList() {
105
+        getHisPrescriptionList().then(response => {
106
+          if (response.data.state == 0) {
107
+            this.$message.error(response.data.msg)
108
+            return false
109
+          } else {
110
+
111
+          }
112
+        })
113
+
114
+      }
115
+    }, created() {
116
+
117
+      this.getHisPrescriptionList()
118
+
98 119
     }
99
-}
120
+  }
100 121
 </script>