Browse Source

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

csx 4 years ago
parent
commit
aee37b45c4

+ 2 - 2
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -69,9 +69,9 @@
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-show="titleType == '电子处方'" style="flex:1;"></desk-prescription>
72
+                          v-if="titleType == '电子处方'" style="flex:1;"></desk-prescription>
73 73
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
74
-                    :hisPatientInfo="hisPatientInfo"   v-show="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
74
+                    :hisPatientInfo="hisPatientInfo"   v-if="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
75 75
 
76 76
         <medicalRecord ref='medicalRecord' @func="getMsgFormSon" ></medicalRecord>
77 77
         <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>

+ 10 - 11
src/xt_pages/outpatientDoctorStation/recordTemplate/printOne.vue View File

@@ -42,12 +42,12 @@
42 42
         <div class="printTitle">病历内容</div>
43 43
         <div class="recordTitle">
44 44
             <div>科别:{{hispatient.departments?hispatient.departments:''}}</div>
45
-            <div>姓名:{{hispatient.name?hispatient.name:''}}</div>
45
+            <div>姓名:{{patient.name?patient.name:''}}</div>
46 46
             <div>性别:
47
-                <span v-if="hispatient.gender == 1">男</span>
48
-                <span v-if="hispatient.gender == 2">女</span>
47
+                <span v-if="patient.gender == 1">男</span>
48
+                <span v-if="patient.gender == 2">女</span>
49 49
             </div>
50
-            <div>年龄:{{hispatient.age?hispatient.age:''}}岁</div>
50
+            <div>年龄:{{patient.age?patient.age:''}}岁</div>
51 51
         </div>
52 52
         <div class="otherInfo">
53 53
             <div class="otherName">主诉:</div>
@@ -100,19 +100,18 @@ export default {
100 100
       hispatient:Object,
101 101
       history:Object,
102 102
     },
103
-    return:{
104
-      educationOptions:[]
105
-    },
106 103
     data(){
107
-
104
+        return{
105
+            educationOptions:[]
106
+        }                   
108 107
     },
109 108
     methods:{
110 109
       getProfession(id){
111 110
         var name = ""
112 111
         for(let i=0;i<this.educationOptions.length;i++){
113
-           if(id == this.educationOptions[i].id){
114
-              name = this.educationOptions[i].name
115
-           }
112
+            if(id == this.educationOptions[i].id){
113
+                name = this.educationOptions[i].name
114
+            }
116 115
         }
117 116
         return name
118 117
       },

+ 2 - 3
src/xt_pages/stock/selfPreparedMedicine/query.vue View File

@@ -142,10 +142,9 @@ export default {
142 142
          for(let i=0;i<this.tableData.length;i++){
143 143
             this.tableData[i].margin = (this.tableData[i].Total?this.tableData[i].Total:0) - this.tableData[i].Count
144 144
          }
145
-         console.log("表哥------",this.tableData)
145
+        
146 146
          const data = this.formatJson(filterVal, this.tableData)
147
-         console.log("data",data)
148
-         return
147
+      
149 148
          excel.export_json_to_excel({
150 149
            header: tHeader,
151 150
            data,

+ 95 - 22
src/xt_pages/stock/stockQuery.vue View File

@@ -4,23 +4,58 @@
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
     </div>
6 6
     <div class="app-container ">
7
-      <div class="cell clearfix">
8
-        <el-input
9
-          size="small"
10
-          style="width: 400px;"
11
-          class="filter-item"
12
-          v-model.trim="keywords"
13
-          placeholder="商品编码/商品名称/规格名称"
14
-        />
15
-        <el-button
16
-          size="small"
17
-          class="filter-item"
18
-          type="primary"
19
-          icon="el-icon-search"
20
-          @click="search"
21
-          >搜索</el-button
22
-        >
7
+      <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8
+        <div>
9
+          <el-select v-model="value" style="width:140px;margin-right:10px;" placeholder="请选择">
10
+            <el-option
11
+              v-for="item in options"
12
+              :key="item.value"
13
+              :label="item.label"
14
+              :value="item.value">
15
+            </el-option>
16
+          </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>
37
+          <el-input
38
+            size="small"
39
+            style="width: 200px;margin-left:10px;"
40
+            class="filter-item"
41
+            v-model.trim="keywords"
42
+            placeholder="商品编码/商品名称/规格名称"
43
+          />
44
+          <el-button
45
+            size="small"
46
+            class="filter-item"
47
+            type="primary"
48
+            icon="el-icon-search"
49
+            @click="search"
50
+            >搜索</el-button
51
+          >
52
+        </div>
53
+        <div>
54
+          <el-button size="small" type="primary" @click="exportList">导出</el-button>
55
+          <el-button size="small" type="primary">打印</el-button>
56
+        </div>
23 57
       </div>
58
+      
24 59
 
25 60
       <el-table
26 61
         :row-style="{ color: '#303133' }"
@@ -161,7 +196,9 @@ export default {
161 196
       WarehouseInfo: {
162 197
         loading: false,
163 198
         warehouseInfoDate: []
164
-      }
199
+      },
200
+      options:[],
201
+      value:""
165 202
     };
166 203
   },
167 204
   methods: {
@@ -183,12 +220,30 @@ export default {
183 220
           this.WarehouseInfo.loading = false;
184 221
           this.total = response.data.data.total;
185 222
           for (let i = 0; i < response.data.data.list.length; i++) {
186
-
187
-              this.WarehouseInfo.warehouseInfoDate.push(
188
-                response.data.data.list[i]
189
-              );
223
+           this.WarehouseInfo.warehouseInfoDate.push( response.data.data.list[i]);
190 224
           }
191 225
         }
226
+        console.log("数据源头",this.WarehouseInfo.warehouseInfoDate)
227
+         
228
+         for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
229
+            this.WarehouseInfo.warehouseInfoDate[i].type_name = this.WarehouseInfo.warehouseInfoDate[i].type.type_name
230
+
231
+            this.WarehouseInfo.warehouseInfoDate[i].stockInCount = this.stockInCount(this.WarehouseInfo.warehouseInfoDate[i])
232
+
233
+            this.WarehouseInfo.warehouseInfoDate[i].salesReturnCount = this.salesReturnCount(this.WarehouseInfo.warehouseInfoDate[i])
234
+
235
+            this.WarehouseInfo.warehouseInfoDate[i].realCount = this.stockInCount(this.WarehouseInfo.warehouseInfoDate[i]) -  this.salesReturnCount(this.WarehouseInfo.warehouseInfoDate[i])
236
+
237
+            this.WarehouseInfo.warehouseInfoDate[i].stockOutCount = this.stockOutCount(this.WarehouseInfo.warehouseInfoDate[i])
238
+
239
+            this.WarehouseInfo.warehouseInfoDate[i].cancelStockCount = this.cancelStockCount(this.WarehouseInfo.warehouseInfoDate[i])
240
+
241
+            this.WarehouseInfo.warehouseInfoDate[i].realOutCount =  this.stockOutCount(this.WarehouseInfo.warehouseInfoDate[i]) -  this.cancelStockCount(this.WarehouseInfo.warehouseInfoDate[i])
242
+
243
+            this.WarehouseInfo.warehouseInfoDate[i].overplus = this.stockInCount(this.WarehouseInfo.warehouseInfoDate[i]) -this.salesReturnCount(this.WarehouseInfo.warehouseInfoDate[i]) - this.stockOutCount(this.WarehouseInfo.warehouseInfoDate[i]) + this.cancelStockCount(this.WarehouseInfo.warehouseInfoDate[i])
244
+         }
245
+        
246
+        console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
192 247
       });
193 248
     },
194 249
 
@@ -270,7 +325,25 @@ export default {
270 325
     showCancelStockDetailDialog: function() {},
271 326
     search: function() {
272 327
       this.GetAllStockQuery();
273
-    }
328
+    },
329
+
330
+    exportList(){
331
+         import('@/vendor/Export2Excel').then(excel => {
332
+         const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
333
+         const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus'] 
334
+         const data = this.formatJson(filterVal, this.WarehouseInfo.warehouseInfoDate)
335
+      
336
+         excel.export_json_to_excel({
337
+           header: tHeader,
338
+           data,
339
+           filename: '库存查询'
340
+         })
341
+          this.downloadLoading = false
342
+        })
343
+       },
344
+       formatJson(filterVal, jsonData) {
345
+        return jsonData.map(v => filterVal.map(j => v[j]));
346
+     },
274 347
   }
275 348
 };
276 349
 </script>