Kaynağa Gözat

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

See999 4 yıl önce
ebeveyn
işleme
210e03a5b0

+ 9 - 1
src/router/modules/selfPreparedMedicine.js Dosyayı Görüntüle

37
         component: () => import('@/xt_pages/stock/selfPreparedMedicine/info'),
37
         component: () => import('@/xt_pages/stock/selfPreparedMedicine/info'),
38
         name: 'selfPreparedMedicineInfo',
38
         name: 'selfPreparedMedicineInfo',
39
         meta: { title: 'selfPreparedMedicineInfo', noCache: true }
39
         meta: { title: 'selfPreparedMedicineInfo', noCache: true }
40
-    }
40
+    },
41
+    {
42
+      path: '/stock/stockprint',
43
+      component: () => import('@/xt_pages/stock/stockPrint'),
44
+      name: 'stockqueryprint',
45
+      hidden: true,
46
+      is_menu: false,
47
+      meta: { title: 'stockprint', noCache: true }
48
+     },
41
   ]
49
   ]
42
 }
50
 }

+ 0 - 4
src/xt_pages/data/components/additionDialog.vue Dosyayı Görüntüle

66
           name: [
66
           name: [
67
             { required: true, message: '请输入费用名称', trigger: 'blur' }
67
             { required: true, message: '请输入费用名称', trigger: 'blur' }
68
           ],
68
           ],
69
-          code: [
70
-            { required: true, message: '请输入国家编码', trigger: 'blur' }
71
-          ]
72
-
73
         }
69
         }
74
       }
70
       }
75
     },
71
     },

+ 2 - 2
src/xt_pages/data/components/addtion.vue Dosyayı Görüntüle

184
             this.$message.error(response.data.msg)
184
             this.$message.error(response.data.msg)
185
             return false
185
             return false
186
           } else {
186
           } else {
187
-            this.Dialog.formValue.class_name =
187
+            this.Dialog.formValue.name =
188
               response.data.data.addition.name
188
               response.data.data.addition.name
189
-            this.Dialog.formValue.content_code =
189
+            this.Dialog.formValue.code =
190
               response.data.data.addition.code
190
               response.data.data.addition.code
191
             this.Dialog.formValue.price =
191
             this.Dialog.formValue.price =
192
               response.data.data.addition.price
192
               response.data.data.addition.price

+ 8 - 5
src/xt_pages/data/specialDictionary.vue Dosyayı Görüntüle

25
           <!--<supplier></supplier>-->
25
           <!--<supplier></supplier>-->
26
           <dealer></dealer>
26
           <dealer></dealer>
27
         </el-tab-pane>
27
         </el-tab-pane>
28
-
29
         <el-tab-pane label="疾病类型" name="7">
28
         <el-tab-pane label="疾病类型" name="7">
30
-          <!--<manufacturer></manufacturer>-->
31
-          <diagnosis></diagnosis>
32
-        </el-tab-pane>
33
-
29
+        <!--<manufacturer></manufacturer>-->
30
+        <diagnosis></diagnosis>
31
+      </el-tab-pane>
34
         <!--<el-tab-pane label="医疗类别" name="8">-->
32
         <!--<el-tab-pane label="医疗类别" name="8">-->
35
           <!--&lt;!&ndash;<manufacturer></manufacturer>&ndash;&gt;-->
33
           <!--&lt;!&ndash;<manufacturer></manufacturer>&ndash;&gt;-->
36
           <!--<diagnosis></diagnosis>-->
34
           <!--<diagnosis></diagnosis>-->
42
         <el-tab-pane label="配置项字典" name="9">
40
         <el-tab-pane label="配置项字典" name="9">
43
           <configure></configure>
41
           <configure></configure>
44
         </el-tab-pane>
42
         </el-tab-pane>
43
+
44
+        <el-tab-pane label="诊断信息" name="10">
45
+          <diagnosis></diagnosis>
46
+        </el-tab-pane>
47
+
45
       </el-tabs>
48
       </el-tabs>
46
     </div>
49
     </div>
47
   </div>
50
   </div>

+ 1 - 1
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Dosyayı Görüntüle

67
               <div style="display:flex;height:100%;">
67
               <div style="display:flex;height:100%;">
68
                 <div class="centerLeft">
68
                 <div class="centerLeft">
69
                   <div class="tabsBox">
69
                   <div class="tabsBox">
70
-                    <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
70
+                    <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
71
                     <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card" @tab-click="tabclickEvent">
71
                     <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card" @tab-click="tabclickEvent">
72
                       <el-tab-pane
72
                       <el-tab-pane
73
                         v-for="(item, index) in prescriptions"
73
                         v-for="(item, index) in prescriptions"

+ 9 - 1
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Dosyayı Görüntüle

674
           this.order_status = '已退费'
674
           this.order_status = '已退费'
675
         }
675
         }
676
 
676
 
677
+        console.log(info)
678
+
679
+
677
         if(info.id > 0){
680
         if(info.id > 0){
681
+          console.log("!Q!!!!")
682
+
678
           this.doctorValue = info.doctor_id
683
           this.doctorValue = info.doctor_id
679
           this.departmentValue = info.department
684
           this.departmentValue = info.department
680
         }else{
685
         }else{
686
+          console.log("------")
681
           this.doctorValue = ''
687
           this.doctorValue = ''
682
           this.departmentValue = ''
688
           this.departmentValue = ''
683
 
689
 
714
           return false
720
           return false
715
         }
721
         }
716
       },
722
       },
717
-      open(index) {
723
+      open(index,isLoading) {
718
         if (this.curPrescriptions.order_status == 2) {
724
         if (this.curPrescriptions.order_status == 2) {
719
           this.$message.error('当前处方已经结算,无法保存')
725
           this.$message.error('当前处方已经结算,无法保存')
720
           return
726
           return
773
           let data = {
779
           let data = {
774
             'prescriptions': this.prescriptions
780
             'prescriptions': this.prescriptions
775
           }
781
           }
782
+          isLoading = true
776
           createHisPrescription(data, params).then(response => {
783
           createHisPrescription(data, params).then(response => {
777
             if (response.data.state == 1) {
784
             if (response.data.state == 1) {
785
+              this.$emit("change")
778
               this.$message.success('保存成功')
786
               this.$message.success('保存成功')
779
             }
787
             }
780
           })
788
           })

+ 7 - 7
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue Dosyayı Görüntüle

11
       <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
11
       <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
12
     </div>
12
     </div>
13
     <el-tabs v-model="activeName">
13
     <el-tabs v-model="activeName">
14
-      
14
+
15
       <el-tab-pane label="处方详情" name="first">
15
       <el-tab-pane label="处方详情" name="first">
16
         <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
16
         <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
17
           <el-tab-pane
17
           <el-tab-pane
42
             <span style="width:240px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
42
             <span style="width:240px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
43
             <!-- <span style="width:180px;">疾病名称:{{case_history.diagnostic}}</span>
43
             <!-- <span style="width:180px;">疾病名称:{{case_history.diagnostic}}</span>
44
             <span style="width:180px;">症状:{{case_history.diagnostic}}</span> -->
44
             <span style="width:180px;">症状:{{case_history.diagnostic}}</span> -->
45
-            
45
+
46
 
46
 
47
           </div>
47
           </div>
48
         </div>
48
         </div>
156
 
156
 
157
           //  /outpatientDoctorStation/print?record=2020-12-11&prescription_id=157&ids=157,159&patient_id=1064
157
           //  /outpatientDoctorStation/print?record=2020-12-11&prescription_id=157&ids=157,159&patient_id=1064
158
         }else if(index == 2){
158
         }else if(index == 2){
159
-           var record_date = this.format(this.case_history.sick_date)    
159
+           var record_date = this.format(this.case_history.sick_date)
160
           this.$router.push("/outpatientDoctorStation/recordPrint?record="+record_date+"&patient_id="+this.case_history.patient_id)
160
           this.$router.push("/outpatientDoctorStation/recordPrint?record="+record_date+"&patient_id="+this.case_history.patient_id)
161
         }
161
         }
162
       },
162
       },
214
             this.patientInfo = response.data.data.order.patient
214
             this.patientInfo = response.data.data.order.patient
215
             this.hisPatientInfo = response.data.data.order.his_patient
215
             this.hisPatientInfo = response.data.data.order.his_patient
216
             this.case_history = response.data.data.order.case_history
216
             this.case_history = response.data.data.order.case_history
217
-            console.log("历史详情",this.case_history)
217
+            // console.log("历史详情",this.case_history)
218
             this.order = response.data.data.order
218
             this.order = response.data.data.order
219
-            console.log('this.order',this.order)
219
+            // console.log('this.order',this.order)
220
 
220
 
221
 
221
 
222
             this.prescriptions = []
222
             this.prescriptions = []
287
      getAllDoctorList(){
287
      getAllDoctorList(){
288
       getAllDoctorList().then(response=>{
288
       getAllDoctorList().then(response=>{
289
         if(response.data.state == 1){
289
         if(response.data.state == 1){
290
-            var doctor =  response.data.data.doctor 
290
+            var doctor =  response.data.data.doctor
291
             this.doctorList = doctor
291
             this.doctorList = doctor
292
              var department = response.data.data.department
292
              var department = response.data.data.department
293
              console.log("department",department)
293
              console.log("department",department)
294
              this.departmentList = department
294
              this.departmentList = department
295
             }
295
             }
296
-         })   
296
+         })
297
       },
297
       },
298
       getDepartMent(id){
298
       getDepartMent(id){
299
          var name = ""
299
          var name = ""

+ 8 - 54
src/xt_pages/outpatientDoctorStation/components/medicalRecord.vue Dosyayı Görüntüle

8
     >
8
     >
9
         <div>
9
         <div>
10
             <el-tabs v-model="activeName">
10
             <el-tabs v-model="activeName">
11
-                <!-- <el-tab-pane label="历史病历" name="first">
12
-                    <div style="display:flex;align-items: center;margin-bottom:10px;">
13
-                        <el-input size="small" v-model.trim="search_input" class="filter-item" style="width:140px;"/>
14
-                        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
15
-                        <span>日期:</span>
16
-                        <el-date-picker
17
-                        size="small"
18
-                        style="width:140px;margin:0 10px;"
19
-                        v-model="value1"
20
-                        type="date"
21
-                        placeholder="选择日期">
22
-                        </el-date-picker>
23
-                        <el-date-picker
24
-                        style="width:140px;"
25
-                        size="small"
26
-                        v-model="value1"
27
-                        type="date"
28
-                        placeholder="选择日期">
29
-                        </el-date-picker>
30
-                    </div>
31
-                    <el-table :data="tableData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
32
-                        <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
33
-                        <el-table-column align="center" prop="name" label="病历编号">
34
-                            <template slot-scope="scope">{{ scope.row.id }}</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">{{ scope.row.date }}</template>
47
-                        </el-table-column>
48
-                        <el-table-column align="center" prop="name" label="操作" width='200'>
49
-                            <template slot-scope="scope">
50
-                                <el-button type="primary" size="mini">调用</el-button>
51
-                                <el-button type="primary" size="mini" @click="toHistoryDetail">详情</el-button>
52
-                            </template>
53
-                        </el-table-column>
54
-                    </el-table>
55
-                </el-tab-pane> -->
56
                 <el-tab-pane label="病历模板" name="first">
11
                 <el-tab-pane label="病历模板" name="first">
57
                     <div style="display:flex;align-items: center;margin-bottom:10px;">
12
                     <div style="display:flex;align-items: center;margin-bottom:10px;">
58
                         <el-input size="small"  v-model.trim="search_input" class="filter-item" style="width:140px;"/>
13
                         <el-input size="small"  v-model.trim="search_input" class="filter-item" style="width:140px;"/>
77
                     </div>
32
                     </div>
78
                     <el-table :data="tempalateData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
33
                     <el-table :data="tempalateData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
79
                         <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
34
                         <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
80
-                        <el-table-column align="center" prop="name" label="病历编号">
35
+                        <el-table-column align="center" prop="name" width="60" label="病历编号">
81
                             <template slot-scope="scope">{{ scope.row.id }}</template>
36
                             <template slot-scope="scope">{{ scope.row.id }}</template>
82
                         </el-table-column>
37
                         </el-table-column>
83
                         <el-table-column align="center" prop="name" label="名称">
38
                         <el-table-column align="center" prop="name" label="名称">
134
             search_input:"",
89
             search_input:"",
135
             start_time:"",
90
             start_time:"",
136
             end_time:"",
91
             end_time:"",
92
+            mode_status:0,
137
         }
93
         }
138
     },
94
     },
139
     methods:{
95
     methods:{
146
             this.form.name = "";
102
             this.form.name = "";
147
             this.form.intro = "";
103
             this.form.intro = "";
148
         },
104
         },
149
-        show() {
150
-            // this.clear()
105
+        show(id) {
106
+            this.mode_status = id
107
+            this.getlist()
151
             this.visible = true
108
             this.visible = true
152
         },
109
         },
153
         hide() {
110
         hide() {
161
             this.$refs.recordTemplateDetail.show(id)
118
             this.$refs.recordTemplateDetail.show(id)
162
         },
119
         },
163
         totemplateDetailTwo(id){
120
         totemplateDetailTwo(id){
164
-        console.log("id0---",id)
165
          this.$emit('func',id)
121
          this.$emit('func',id)
166
          this.visible = false
122
          this.visible = false
167
         },
123
         },
179
               var template =  response.data.data.template
135
               var template =  response.data.data.template
180
               console.log("templagte",template)
136
               console.log("templagte",template)
181
               this.tempalateData = template
137
               this.tempalateData = template
182
-            //   var history =  response.data.data.history
183
-            //   console.log("history",history)
184
-            //   this.tableData = history
185
             }
138
             }
186
           })
139
           })
187
         },
140
         },
199
       },
152
       },
200
     },
153
     },
201
     created(){
154
     created(){
202
-       console.log("99999999999999999")
203
        this.getlist()
155
        this.getlist()
204
-    }
156
+    },
157
+   
158
+    
205
 }
159
 }
206
 </script>
160
 </script>
207
 
161
 

+ 6 - 6
src/xt_pages/outpatientDoctorStation/components/saveRecordTemplate.vue Dosyayı Görüntüle

7
         class="recordDialog"
7
         class="recordDialog"
8
     >
8
     >
9
         <el-form class="recordForm" :model="form"  ref="form" label-width="80px">
9
         <el-form class="recordForm" :model="form"  ref="form" label-width="80px">
10
-            <!-- <el-form-item label="模板类别:" prop="name" style="width:100%;">
11
-                <el-radio v-model="mode_type" label="1">私人模板</el-radio>
12
-                <el-radio v-model="mode_type" label="2">公共模板</el-radio>
13
-            </el-form-item> -->
14
             <el-form-item label="模板名称: " prop="name" style="width:100%;">
10
             <el-form-item label="模板名称: " prop="name" style="width:100%;">
15
                 <el-input v-model="template_name" placeholder=""></el-input>
11
                 <el-input v-model="template_name" placeholder=""></el-input>
16
             </el-form-item>
12
             </el-form-item>
58
             start_time:"",
54
             start_time:"",
59
             user_name:"",
55
             user_name:"",
60
             template_name:"",
56
             template_name:"",
61
-            template_remark:""
57
+            template_remark:"",
58
+            mode_status:0,
62
         }
59
         }
63
      },
60
      },
64
     
61
     
74
         },
71
         },
75
         show(obj) {
72
         show(obj) {
76
          console.log("obj",obj)
73
          console.log("obj",obj)
77
-         this.chief_conplain= obj.chief_conplain
74
+         this.chief_conplain= obj.chief_conplaint
78
          this.past_history = obj.past_history
75
          this.past_history = obj.past_history
79
          this.history_of_present_illness = obj.history_of_present_illness
76
          this.history_of_present_illness = obj.history_of_present_illness
80
          this.personal_history = obj.personal_history
77
          this.personal_history = obj.personal_history
101
              diagnostic:this.diagnostic,
98
              diagnostic:this.diagnostic,
102
             }
99
             }
103
          console.log("params",params)
100
          console.log("params",params)
101
+       
104
           SaveHisPatientCaseHistoryTemplate(params).then(response=>{
102
           SaveHisPatientCaseHistoryTemplate(params).then(response=>{
105
               if(response.data.state == 1){
103
               if(response.data.state == 1){
104
+                 this.mode_status = 1
106
                  this.$message.success("保存成功")
105
                  this.$message.success("保存成功")
107
                  this.visible = false
106
                  this.visible = false
107
+                
108
               }
108
               }
109
           })   
109
           })   
110
         }
110
         }

+ 47 - 13
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Dosyayı Görüntüle

45
             <el-tab-pane label="电子病历" name="电子病历"></el-tab-pane>
45
             <el-tab-pane label="电子病历" name="电子病历"></el-tab-pane>
46
           </el-tabs>
46
           </el-tabs>
47
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子处方'">
47
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子处方'">
48
-            <el-button size="small" ref="button_one" @click="open(1)" type="primary">保存</el-button>
48
+            <el-button size="small" ref="button_one" @click="open(1)" type="primary" v-loading="saveLoading">保存</el-button>
49
             <el-popover
49
             <el-popover
50
               placement="bottom"
50
               placement="bottom"
51
               width="200"
51
               width="200"
69
         <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
69
         <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
70
                           ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
70
                           ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
71
                           :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
71
                           :hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
72
-                          v-if="titleType == '电子处方'" style="flex:1;"></desk-prescription>
72
+                          v-if="titleType == '电子处方'" style="flex:1;" v-on:change="changeTab"></desk-prescription>
73
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
73
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
74
                     :hisPatientInfo="hisPatientInfo"   v-if="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
74
                     :hisPatientInfo="hisPatientInfo"   v-if="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
75
 
75
 
142
     data() {
142
     data() {
143
       return {
143
       return {
144
         tableHeight:'',
144
         tableHeight:'',
145
+        saveloading:false,
145
         fullHeight: document.documentElement.clientHeight,
146
         fullHeight: document.documentElement.clientHeight,
146
         prescriptions: [
147
         prescriptions: [
147
           {
148
           {
182
         selecting_schs: [],
183
         selecting_schs: [],
183
         index:0,
184
         index:0,
184
         admin_info:{},
185
         admin_info:{},
186
+        saveLoading:false,
187
+
185
       }
188
       }
186
     },
189
     },
187
     methods: {
190
     methods: {
208
         }
211
         }
209
 
212
 
210
 
213
 
214
+      },changeTab(){
215
+        this.saveLoading = false
216
+
217
+        this.radio = 2
218
+        let params = {
219
+          'record_date': this.record_date,
220
+          'type': this.radio
221
+        }
222
+        this.patientTableData = []
223
+        getSchedulePatientList(params).then(response => {
224
+          if (response.data.state == 0) {
225
+            this.$message.error(response.data.msg)
226
+            return false
227
+          } else {
228
+            this.patientTableData = response.data.data.list
229
+            this.patientTableDataTwo = response.data.data.list
230
+            this.cal_one = response.data.data.total_one
231
+            this.cal_two =  response.data.data.total_two
232
+            this.admin_info =  response.data.data.info
233
+           for (let i = 0; i< this.patientTableData.length; i++){
234
+             if(this.patientTableData[i].patients.id == this.patientid){
235
+               this.$refs.tab.setCurrentRow(this.patientTableData[i])
236
+               this.getPatientInfo(this.patientTableData[i])
237
+
238
+             }
239
+           }
240
+
241
+
242
+          }
243
+        })
244
+
211
       },
245
       },
212
       change(val) {
246
       change(val) {
213
         this.getList()
247
         this.getList()
214
-
215
-
216
       },
248
       },
217
       getList() {
249
       getList() {
218
         let params = {
250
         let params = {
240
             }
272
             }
241
 
273
 
242
             this.prescriptionList = response.data.data.list.prescription
274
             this.prescriptionList = response.data.data.list.prescription
275
+
243
             this.patientid = this.patientTableData[0].patient_id
276
             this.patientid = this.patientTableData[0].patient_id
244
 
277
 
245
           }
278
           }
394
 
427
 
395
 
428
 
396
       },
429
       },
397
-      
430
+
398
       choosePatient(val) {
431
       choosePatient(val) {
399
         let isShowDailog = false
432
         let isShowDailog = false
400
         for (let i = 0; i < this.prescriptions.length; i++){
433
         for (let i = 0; i < this.prescriptions.length; i++){
403
           }
436
           }
404
         }
437
         }
405
         if(isShowDailog){
438
         if(isShowDailog){
406
-          
439
+
407
           this.patientTableData.map((item,index) => {
440
           this.patientTableData.map((item,index) => {
408
             if(item.patient_id == this.oldCurrentRow.patient_id){
441
             if(item.patient_id == this.oldCurrentRow.patient_id){
409
               this.$refs.tab.setCurrentRow(this.patientTableData[index])
442
               this.$refs.tab.setCurrentRow(this.patientTableData[index])
558
           this.oldCurrentRow = currentRow
591
           this.oldCurrentRow = currentRow
559
           return
592
           return
560
         }
593
         }
561
-        
562
-        
594
+
595
+
563
       },
596
       },
564
       open(index) {
597
       open(index) {
565
-        console.log("index0999999",this.prescriptions)
566
          if(this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0){
598
          if(this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0){
567
            this.$message.error("请先开处方")
599
            this.$message.error("请先开处方")
568
            return
600
            return
569
           }
601
           }
570
         this.index = index
602
         this.index = index
571
         if (index == 1) {
603
         if (index == 1) {
572
-          this.$refs.prescriptions.open(1)
604
+          this.$refs.prescriptions.open(1,this.saveLoading)
573
         } else if (index == 2) {
605
         } else if (index == 2) {
574
 
606
 
575
           this.getPrescriptionList(this.patientid)
607
           this.getPrescriptionList(this.patientid)
588
       },
620
       },
589
 
621
 
590
       opentwo(index) {
622
       opentwo(index) {
591
-        console.log("index",index)
592
         if (index == 1) {
623
         if (index == 1) {
593
           if(this.patientInfo.id == undefined){
624
           if(this.patientInfo.id == undefined){
594
             this.$message.error("请先选择病人")
625
             this.$message.error("请先选择病人")
598
         } else if (index == 2) {
629
         } else if (index == 2) {
599
           this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
630
           this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
600
         } else if (index == 3) {
631
         } else if (index == 3) {
601
-          this.$refs.medicalRecord.show()
632
+           var mode_status =   this.$refs.saveRecordTemplate.mode_status
633
+           console.log("数据返回",mode_status)
634
+          this.$refs.medicalRecord.show(mode_status)
602
         } else if (index == 4) {
635
         } else if (index == 4) {
603
           this.$refs.saveRecordTemplate.show(this.case_history)
636
           this.$refs.saveRecordTemplate.show(this.case_history)
604
         }
637
         }
703
             that.timer = false
736
             that.timer = false
704
           },400)
737
           },400)
705
         }
738
         }
706
-      }
739
+      },
740
+
707
     }
741
     }
708
   }
742
   }
709
 </script>
743
 </script>

+ 241 - 0
src/xt_pages/stock/stockPrint.vue Dosyayı Görüntüle

1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">自备药查询表</span>
16
+                    </div>
17
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18
+                      打印时间:{{time_now}}
19
+                    </div>
20
+                    <div class="table_panel">
21
+                        <table class="table">
22
+                            <thead>
23
+                                <tr>
24
+                                    <td width="60">商品编码</td>
25
+                                    <td width="80">耗材名称</td>
26
+                                    <td width="80">耗材类型</td>
27
+                                    <td width="80">规格型号</td>
28
+                                    <td width="80">入库数量</td>
29
+                                    <td width="80">入库退货</td>
30
+                                    <td width="80">实际入库</td>
31
+                                    <td width="80">出库数量</td>
32
+                                    <td width="80">出库退库</td>
33
+                                    <td width="80">实际出库</td>
34
+                                    <td width="80">剩余库存</td>
35
+                                </tr>
36
+                            </thead>
37
+                            <tbody>
38
+                                <tr v-for='(item,index) in WarehouseInfo.warehouseInfoDate' :key="index">
39
+                                    <td>{{item.good_code}}</td>
40
+                                    <td>{{item.good_name}}</td>
41
+                                    <td>{{item.type.type_name}}</td>
42
+                                    <td>{{item.specification_name}}</td>
43
+                                    <td>{{stockInCount(item)}}</td>
44
+                                    <td>{{salesReturnCount(item)}}</td>
45
+                                    <td> {{ stockInCount(item) - salesReturnCount(item) }}</td>
46
+                                    <td>{{ stockOutCount(item) }}</td>
47
+                                    <td>{{cancelStockCount(item) }}</td>
48
+                                    <td>{{ stockOutCount(item) - cancelStockCount(item)}}</td>
49
+                                    <td>{{stockInCount(item) -salesReturnCount(item) -stockOutCount(item) +cancelStockCount(item)}}</td>
50
+                                </tr>
51
+                            </tbody>
52
+                        </table>
53
+                    </div>
54
+                </div>
55
+            </div>
56
+        </div>
57
+    </div>
58
+</template>
59
+
60
+<script>
61
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
62
+import { getAllStockQueryList } from "@/api/stock";
63
+import print from 'print-js'
64
+const moment = require('moment')
65
+export default {
66
+    components:{
67
+        BreadCrumb
68
+    },
69
+    data(){
70
+        return{
71
+          crumbs: [
72
+            { path: false, name: '库存管理' },
73
+            { path: false, name: '自备药查询' },
74
+            { path: false, name: '自备药打印' },
75
+          ],
76
+          start_time:"",
77
+          end_time:"",
78
+          drug_name:"",
79
+          drug_spec:"",
80
+          keyword:"",
81
+          tableData:[],
82
+          time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
83
+          type_name:"",
84
+          limit:20,
85
+          page:1,
86
+          WarehouseInfo: {
87
+          loading: false,
88
+          warehouseInfoDate: []
89
+         },
90
+        }
91
+    },
92
+    methods:{
93
+      printAction: function() {
94
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
95
+          printJS({
96
+          printable: 'print_content',
97
+          type: 'html',
98
+          documentTitle: '  ',
99
+          style: style,
100
+          scanStyles: false
101
+          })
102
+      },
103
+      getlist(){
104
+         const Params = {
105
+            page: this.page,
106
+            limit: this.limit,
107
+            keyword: this.keywords,
108
+            start_time:this.start_time,
109
+            end_time:this.end_time,
110
+            type_name:this.type_name,
111
+        };
112
+         this.WarehouseInfo.loading = true;
113
+         this.WarehouseInfo.warehouseInfoDate = [];
114
+         getAllStockQueryList(Params).then(response => {
115
+           if (response.data.state == 0) {
116
+            this.WarehouseInfo.loading = false;
117
+            this.$message.error(response.data.msg);
118
+            return false;
119
+          } else {
120
+            this.WarehouseInfo.loading = false;
121
+            this.total = response.data.data.total;
122
+          for (let i = 0; i < response.data.data.list.length; i++) {
123
+            this.WarehouseInfo.warehouseInfoDate.push( response.data.data.list[i]);
124
+          }
125
+         }
126
+            console.log("打印数据源头",this.WarehouseInfo.warehouseInfoDate)
127
+          });
128
+      },
129
+       stockInCount: function(row) {
130
+      let total = 0;
131
+      for (let i = 0; i < row.query_warehousing_info.length; i++) {
132
+        total = total + row.query_warehousing_info[i].warehousing_count;
133
+      }
134
+      return total;
135
+    },
136
+    salesReturnCount: function(row) {
137
+      let total = 0;
138
+      for (let i = 0; i < row.query_sales_return_info.length; i++) {
139
+        total = total + row.query_sales_return_info[i].count;
140
+      }
141
+      return total;
142
+    },
143
+    stockOutCount: function(row) {
144
+      let total = 0;
145
+      for (let i = 0; i < row.query_warehouseout_info.length; i++) {
146
+        total = total + row.query_warehouseout_info[i].count;
147
+      }
148
+      return total;
149
+    },
150
+    cancelStockCount: function(row) {
151
+      let total = 0;
152
+      for (let i = 0; i < row.query_cancel_stock_info.length; i++) {
153
+        total = total + row.query_cancel_stock_info[i].count;
154
+      }
155
+      return total;
156
+    },
157
+    },
158
+    created(){
159
+      var starttime =  this.$route.query.start_time
160
+      this.start_time = starttime
161
+      var endtime =  this.$route.query.end_time
162
+      this.end_time = endtime
163
+      var type_name = this.$route.query.type_name
164
+      this.type_name = type_name
165
+      var keyword = this.$route.query.keyword
166
+      this.keyword = keyword
167
+
168
+      this.getlist()
169
+    }
170
+}
171
+</script>
172
+
173
+
174
+<style rel="stylesheet/scss" lang="scss" scoped>
175
+.print_main_content {
176
+  background-color: white;
177
+  max-width: 1500px;
178
+  margin: 0 auto;
179
+  padding: 0 0 20px 0;
180
+
181
+  .order_title_panl {
182
+    text-align: center;
183
+
184
+    .main_title {
185
+      font-size: 18px;
186
+      line-height: 40px;
187
+      font-weight: 500;
188
+    }
189
+  }
190
+  .table_panel {
191
+    .table {
192
+      width: 100%;
193
+      border: 1px solid;
194
+      border-collapse: collapse;
195
+      padding: 2px;
196
+      
197
+
198
+      thead {
199
+        tr {
200
+          td {
201
+            border: 1px solid;
202
+            text-align: center;
203
+            font-size: 18px;
204
+            padding: 15px 5px;
205
+          }
206
+        }
207
+      }
208
+      tbody {
209
+        tr {
210
+          td {
211
+            border: 1px solid;
212
+            text-align: center;
213
+            font-size: 18px;
214
+            padding: 10px 5px;
215
+            white-space: pre-line;
216
+            .proj {
217
+              padding: 5px 0;
218
+              text-align: left;
219
+
220
+              .proj_title {
221
+                font-size: 16px;
222
+                font-weight: 500;
223
+                line-height: 25px;
224
+              }
225
+
226
+              .proj_item {
227
+                font-size: 15px;
228
+                line-height: 20px;
229
+
230
+                .zone_name {
231
+                  font-weight: 500;
232
+                }
233
+              }
234
+            }
235
+          }
236
+        }
237
+      }
238
+    }
239
+  }
240
+}
241
+</style>

+ 49 - 29
src/xt_pages/stock/stockQuery.vue Dosyayı Görüntüle

6
     <div class="app-container ">
6
     <div class="app-container ">
7
       <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
7
       <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8
         <div>
8
         <div>
9
-          <el-select v-model="value" style="width:140px;margin-right:10px;" placeholder="请选择">
9
+          <el-select v-model="type_name" style="width:140px;margin-right:10px;" placeholder="请选择"
10
+          @change="changeTypeName">
10
             <el-option
11
             <el-option
11
-              v-for="item in options"
12
-              :key="item.value"
13
-              :label="item.label"
14
-              :value="item.value">
12
+              v-for="item in goodType"
13
+              :key="item.id"
14
+              :label="item.type_name"
15
+              :value="item.id">
15
             </el-option>
16
             </el-option>
16
           </el-select>
17
           </el-select>
17
-          <el-time-select
18
-            style="width:140px;"
19
-            v-model="value"
20
-            :picker-options="{
21
-              start: '08:30',
22
-              step: '00:15',
23
-              end: '18:30'
24
-            }"
25
-            placeholder="选择时间">
26
-          </el-time-select>-
27
-          <el-time-select
28
-            style="width:140px;"
29
-            v-model="value"
30
-            :picker-options="{
31
-              start: '08:30',
32
-              step: '00:15',
33
-              end: '18:30'
34
-            }"
35
-            placeholder="选择时间">
36
-          </el-time-select>
18
+          <el-date-picker
19
+            size="small"
20
+            v-model="start_time"
21
+            prefix-icon="el-icon-date"
22
+            :editable="false"
23
+            style="width: 196px;"
24
+            type="date"
25
+            placeholder="选择日期时间"
26
+            align="right"
27
+            format="yyyy-MM-dd"
28
+            value-format="yyyy-MM-dd"
29
+            @change="startTimeChange"
30
+           ></el-date-picker>-
31
+            <el-date-picker
32
+              size="small"
33
+              v-model="end_time"
34
+              prefix-icon="el-icon-date"
35
+              :editable="false"
36
+              style="width: 196px;"
37
+              type="date"
38
+              placeholder="选择日期时间"
39
+              align="right"
40
+              format="yyyy-MM-dd"
41
+              value-format="yyyy-MM-dd"
42
+              @change="endTimeChange"
43
+          ></el-date-picker>
37
           <el-input
44
           <el-input
38
             size="small"
45
             size="small"
39
             style="width: 200px;margin-left:10px;"
46
             style="width: 200px;margin-left:10px;"
52
         </div>
59
         </div>
53
         <div>
60
         <div>
54
           <el-button size="small" type="primary" @click="exportList">导出</el-button>
61
           <el-button size="small" type="primary" @click="exportList">导出</el-button>
55
-          <el-button size="small" type="primary">打印</el-button>
62
+          <el-button size="small" type="primary" @click="toPrint">打印</el-button>
56
         </div>
63
         </div>
57
       </div>
64
       </div>
58
       
65
       
198
         warehouseInfoDate: []
205
         warehouseInfoDate: []
199
       },
206
       },
200
       options:[],
207
       options:[],
201
-      value:""
208
+      value:"",
209
+      type_name:""
202
     };
210
     };
203
   },
211
   },
204
   methods: {
212
   methods: {
207
       const Params = {
215
       const Params = {
208
         page: this.page,
216
         page: this.page,
209
         limit: this.limit,
217
         limit: this.limit,
210
-        keyword: this.keywords
218
+        keyword: this.keywords,
219
+        start_time:this.start_time,
220
+        end_time:this.end_time,
221
+        type_name:this.type_name,
211
       };
222
       };
223
+      console.log("params-----",Params)
212
       this.WarehouseInfo.loading = true;
224
       this.WarehouseInfo.loading = true;
213
       this.WarehouseInfo.warehouseInfoDate = [];
225
       this.WarehouseInfo.warehouseInfoDate = [];
214
       getAllStockQueryList(Params).then(response => {
226
       getAllStockQueryList(Params).then(response => {
256
           for (let i = 0; i < response.data.data.goodType.length; i++) {
268
           for (let i = 0; i < response.data.data.goodType.length; i++) {
257
             this.goodType.push(response.data.data.goodType[i]);
269
             this.goodType.push(response.data.data.goodType[i]);
258
           }
270
           }
271
+          console.log("商品类型",this.goodType)
259
         }
272
         }
260
       });
273
       });
261
     },
274
     },
343
        },
356
        },
344
        formatJson(filterVal, jsonData) {
357
        formatJson(filterVal, jsonData) {
345
         return jsonData.map(v => filterVal.map(j => v[j]));
358
         return jsonData.map(v => filterVal.map(j => v[j]));
346
-     },
359
+      },
360
+      changeTypeName(){
361
+       this.GetAllStockQuery()
362
+      },
363
+      toPrint(){
364
+        this.$router.push("/stock/stockprint?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keywords+"&type_name="+this.type_name)
365
+        
366
+      }
347
   }
367
   }
348
 };
368
 };
349
 </script>
369
 </script>