Преглед изворни кода

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

See999 пре 4 година
родитељ
комит
210e03a5b0

+ 9 - 1
src/router/modules/selfPreparedMedicine.js Прегледај датотеку

@@ -37,6 +37,14 @@ export default {
37 37
         component: () => import('@/xt_pages/stock/selfPreparedMedicine/info'),
38 38
         name: 'selfPreparedMedicineInfo',
39 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 Прегледај датотеку

@@ -66,10 +66,6 @@
66 66
           name: [
67 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 Прегледај датотеку

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

+ 8 - 5
src/xt_pages/data/specialDictionary.vue Прегледај датотеку

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

+ 1 - 1
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Прегледај датотеку

@@ -67,7 +67,7 @@
67 67
               <div style="display:flex;height:100%;">
68 68
                 <div class="centerLeft">
69 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 71
                     <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card" @tab-click="tabclickEvent">
72 72
                       <el-tab-pane
73 73
                         v-for="(item, index) in prescriptions"

+ 9 - 1
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Прегледај датотеку

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

+ 7 - 7
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue Прегледај датотеку

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

+ 8 - 54
src/xt_pages/outpatientDoctorStation/components/medicalRecord.vue Прегледај датотеку

@@ -8,51 +8,6 @@
8 8
     >
9 9
         <div>
10 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 11
                 <el-tab-pane label="病历模板" name="first">
57 12
                     <div style="display:flex;align-items: center;margin-bottom:10px;">
58 13
                         <el-input size="small"  v-model.trim="search_input" class="filter-item" style="width:140px;"/>
@@ -77,7 +32,7 @@
77 32
                     </div>
78 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 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 36
                             <template slot-scope="scope">{{ scope.row.id }}</template>
82 37
                         </el-table-column>
83 38
                         <el-table-column align="center" prop="name" label="名称">
@@ -134,6 +89,7 @@ export default {
134 89
             search_input:"",
135 90
             start_time:"",
136 91
             end_time:"",
92
+            mode_status:0,
137 93
         }
138 94
     },
139 95
     methods:{
@@ -146,8 +102,9 @@ export default {
146 102
             this.form.name = "";
147 103
             this.form.intro = "";
148 104
         },
149
-        show() {
150
-            // this.clear()
105
+        show(id) {
106
+            this.mode_status = id
107
+            this.getlist()
151 108
             this.visible = true
152 109
         },
153 110
         hide() {
@@ -161,7 +118,6 @@ export default {
161 118
             this.$refs.recordTemplateDetail.show(id)
162 119
         },
163 120
         totemplateDetailTwo(id){
164
-        console.log("id0---",id)
165 121
          this.$emit('func',id)
166 122
          this.visible = false
167 123
         },
@@ -179,9 +135,6 @@ export default {
179 135
               var template =  response.data.data.template
180 136
               console.log("templagte",template)
181 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,9 +152,10 @@ export default {
199 152
       },
200 153
     },
201 154
     created(){
202
-       console.log("99999999999999999")
203 155
        this.getlist()
204
-    }
156
+    },
157
+   
158
+    
205 159
 }
206 160
 </script>
207 161
 

+ 6 - 6
src/xt_pages/outpatientDoctorStation/components/saveRecordTemplate.vue Прегледај датотеку

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

+ 47 - 13
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Прегледај датотеку

@@ -45,7 +45,7 @@
45 45
             <el-tab-pane label="电子病历" name="电子病历"></el-tab-pane>
46 46
           </el-tabs>
47 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 49
             <el-popover
50 50
               placement="bottom"
51 51
               width="200"
@@ -69,7 +69,7 @@
69 69
         <desk-prescription  :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
70 70
                           ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
71 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 73
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
74 74
                     :hisPatientInfo="hisPatientInfo"   v-if="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
75 75
 
@@ -142,6 +142,7 @@
142 142
     data() {
143 143
       return {
144 144
         tableHeight:'',
145
+        saveloading:false,
145 146
         fullHeight: document.documentElement.clientHeight,
146 147
         prescriptions: [
147 148
           {
@@ -182,6 +183,8 @@
182 183
         selecting_schs: [],
183 184
         index:0,
184 185
         admin_info:{},
186
+        saveLoading:false,
187
+
185 188
       }
186 189
     },
187 190
     methods: {
@@ -208,11 +211,40 @@
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 246
       change(val) {
213 247
         this.getList()
214
-
215
-
216 248
       },
217 249
       getList() {
218 250
         let params = {
@@ -240,6 +272,7 @@
240 272
             }
241 273
 
242 274
             this.prescriptionList = response.data.data.list.prescription
275
+
243 276
             this.patientid = this.patientTableData[0].patient_id
244 277
 
245 278
           }
@@ -394,7 +427,7 @@
394 427
 
395 428
 
396 429
       },
397
-      
430
+
398 431
       choosePatient(val) {
399 432
         let isShowDailog = false
400 433
         for (let i = 0; i < this.prescriptions.length; i++){
@@ -403,7 +436,7 @@
403 436
           }
404 437
         }
405 438
         if(isShowDailog){
406
-          
439
+
407 440
           this.patientTableData.map((item,index) => {
408 441
             if(item.patient_id == this.oldCurrentRow.patient_id){
409 442
               this.$refs.tab.setCurrentRow(this.patientTableData[index])
@@ -558,18 +591,17 @@
558 591
           this.oldCurrentRow = currentRow
559 592
           return
560 593
         }
561
-        
562
-        
594
+
595
+
563 596
       },
564 597
       open(index) {
565
-        console.log("index0999999",this.prescriptions)
566 598
          if(this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0){
567 599
            this.$message.error("请先开处方")
568 600
            return
569 601
           }
570 602
         this.index = index
571 603
         if (index == 1) {
572
-          this.$refs.prescriptions.open(1)
604
+          this.$refs.prescriptions.open(1,this.saveLoading)
573 605
         } else if (index == 2) {
574 606
 
575 607
           this.getPrescriptionList(this.patientid)
@@ -588,7 +620,6 @@
588 620
       },
589 621
 
590 622
       opentwo(index) {
591
-        console.log("index",index)
592 623
         if (index == 1) {
593 624
           if(this.patientInfo.id == undefined){
594 625
             this.$message.error("请先选择病人")
@@ -598,7 +629,9 @@
598 629
         } else if (index == 2) {
599 630
           this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
600 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 635
         } else if (index == 4) {
603 636
           this.$refs.saveRecordTemplate.show(this.case_history)
604 637
         }
@@ -703,7 +736,8 @@
703 736
             that.timer = false
704 737
           },400)
705 738
         }
706
-      }
739
+      },
740
+
707 741
     }
708 742
   }
709 743
 </script>

+ 241 - 0
src/xt_pages/stock/stockPrint.vue Прегледај датотеку

@@ -0,0 +1,241 @@
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 Прегледај датотеку

@@ -6,34 +6,41 @@
6 6
     <div class="app-container ">
7 7
       <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8 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 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 16
             </el-option>
16 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 44
           <el-input
38 45
             size="small"
39 46
             style="width: 200px;margin-left:10px;"
@@ -52,7 +59,7 @@
52 59
         </div>
53 60
         <div>
54 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 63
         </div>
57 64
       </div>
58 65
       
@@ -198,7 +205,8 @@ export default {
198 205
         warehouseInfoDate: []
199 206
       },
200 207
       options:[],
201
-      value:""
208
+      value:"",
209
+      type_name:""
202 210
     };
203 211
   },
204 212
   methods: {
@@ -207,8 +215,12 @@ export default {
207 215
       const Params = {
208 216
         page: this.page,
209 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 224
       this.WarehouseInfo.loading = true;
213 225
       this.WarehouseInfo.warehouseInfoDate = [];
214 226
       getAllStockQueryList(Params).then(response => {
@@ -256,6 +268,7 @@ export default {
256 268
           for (let i = 0; i < response.data.data.goodType.length; i++) {
257 269
             this.goodType.push(response.data.data.goodType[i]);
258 270
           }
271
+          console.log("商品类型",this.goodType)
259 272
         }
260 273
       });
261 274
     },
@@ -343,7 +356,14 @@ export default {
343 356
        },
344 357
        formatJson(filterVal, jsonData) {
345 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 369
 </script>