Browse Source

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

See999 4 years ago
parent
commit
7f5e07b53d

+ 11 - 0
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -387,6 +387,17 @@
387 387
 
388 388
       },
389 389
       choosePatient(val) {
390
+        let isShowDailog = false
391
+        for (let i = 0; i < this.prescriptions.length; i++){
392
+          if((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)){
393
+            isShowDailog = true
394
+          }
395
+        }
396
+        if(isShowDailog){
397
+          this.$message.error('需要保存当前处方才能切换')
398
+          return
399
+        }
400
+
390 401
 
391 402
         this.patientid = val.patients.id
392 403
         let params = {

+ 3 - 3
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

@@ -35,12 +35,12 @@
35 35
           <template slot-scope="scope">{{scope.row.info?scope.row.info.doctor:''}}</template>
36 36
         </el-table-column>
37 37
         <el-table-column align="center" prop="name" label="诊断">
38
-          <template slot-scope="scope">{{ scope.row.info ? scope.row.info.diagnosis :''}}</template>
38
+          <template slot-scope="scope">{{ scope.row.info?scope.row.info.diagnosis :''}}</template>
39 39
         </el-table-column>
40 40
         <el-table-column align="center" prop="name" label="状态" width="100">
41 41
           <template slot-scope="scope">
42
-            <div v-if=" scope.row.info.id == 0">未就诊</div>
43
-            <div v-if=" scope.row.info.id > 0">已就诊</div>
42
+            <div v-if=" scope.row.info && scope.row.info.id > 0">已就诊</div>
43
+            <div v-else>未就诊</div>
44 44
           </template>
45 45
         </el-table-column>
46 46
         <el-table-column align="center" prop="name" label="操作" width="100">

+ 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>