瀏覽代碼

打印单

XMLWAN 4 年之前
父節點
當前提交
46f50cfcfd

+ 9 - 0
src/api/stock.js 查看文件

574
     method:"get",
574
     method:"get",
575
     params:params
575
     params:params
576
   })
576
   })
577
+}
578
+
579
+export function GetOutStockTotalCount(params){
580
+  
581
+  return request({
582
+    url:"/api/warehouseout/getoutstocktotalcount",
583
+    method:"get",
584
+    params:params
585
+  })
577
 }
586
 }

+ 49 - 35
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue 查看文件

289
                 <el-option label="是" value="1"></el-option>
289
                 <el-option label="是" value="1"></el-option>
290
                 <el-option label="否" value="2"></el-option>
290
                 <el-option label="否" value="2"></el-option>
291
               </el-select>
291
               </el-select>
292
-
293
-             <!-- <el-select v-model="assessmentBeforeDislysis.is_hemorrhage" placeholder="请选择">
294
-                <el-option
295
-                  v-for="item in hemorrhages"
296
-                  :key="item.value"
297
-                  :label="item.label"
298
-                  :value="item.value">
299
-                </el-option>
300
-              </el-select> -->
301
             </el-form-item>
292
             </el-form-item>
302
           </el-col>
293
           </el-col>
303
 
294
 
525
             </el-form-item>
516
             </el-form-item>
526
           </el-col>
517
           </el-col>
527
 
518
 
519
+         
528
 
520
 
521
+          <el-col :span="8">
522
+            <el-form-item label="血栓:" v-if="isShow('血栓')">
523
+              <el-select v-model="assessmentBeforeDislysis.thromubus_type" @change="changeThrombus">
524
+                <el-option :key="0" label="请选择" :value="0"></el-option>
525
+                <el-option label="有" value="1"></el-option>
526
+                <el-option label="无" value="2"></el-option>
527
+              </el-select>
528
+            </el-form-item>
529
+          </el-col>
530
+          
531
+          <el-col :span="8">
532
+            <el-form-item label="导管AV端(cm):" v-show="thrombuShow">
533
+              <el-input v-model="assessmentBeforeDislysis.thrombus_av" style="width:150px"></el-input>
534
+            </el-form-item>
535
+          </el-col>
529
 
536
 
537
+          <el-col :span="8">
538
+            <el-form-item label="导管A端(cm):" v-show="thrombuShow">
539
+              <el-input v-model="assessmentBeforeDislysis.thromubus_a" style="width:150px"></el-input>
540
+            </el-form-item>
541
+          </el-col>
530
 
542
 
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
-          <!-- </el-row>
540
-
541
-
542
-          <el-row :gutter="20"> -->
543
-          <!--<el-col :span="8">-->
544
-          <!--<el-form-item label="穿刺方法: " v-if="isShow('穿刺方法')">-->
545
-
546
-          <!--<el-select v-model="assessmentBeforeDislysis.puncture_method">-->
547
-          <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
548
-
549
-          <!--<el-option v-for="item in puncture_method" :label="item.name" :value="item.name"-->
550
-          <!--:key="item.id"></el-option>-->
551
-          <!--</el-select>-->
552
-
553
-          <!--</el-form-item>-->
554
-          <!--</el-col>-->
555
-
543
+          <el-col :span="8">
544
+            <el-form-item label="导管V端(cm):" v-show="thrombuShow">
545
+              <el-input v-model="assessmentBeforeDislysis.thromubus_v" style="width:150px"></el-input>
546
+            </el-form-item>
547
+          </el-col>
548
+      
556
         </el-row>
549
         </el-row>
557
 
550
 
558
 
551
 
704
           edema:'',
697
           edema:'',
705
           special_treatment:'',
698
           special_treatment:'',
706
           catheter_maintenance:"",
699
           catheter_maintenance:"",
700
+          thromubus_type:"",
701
+          thrombus_av:"",
702
+          thromubus_a:"",
703
+          thromubus_v:""
704
+
707
         },
705
         },
708
 
706
 
709
         InnerDialogProps: {
707
         InnerDialogProps: {
718
         puncture_ways: '',
716
         puncture_ways: '',
719
         skins:[],
717
         skins:[],
720
         pinholings:[],
718
         pinholings:[],
721
-        catheter_maintenancelist:[]
719
+        catheter_maintenancelist:[],
720
+        thrombuShow:false
722
       }
721
       }
723
     },
722
     },
724
     props: {
723
     props: {
759
       },
758
       },
760
       show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
759
       show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
761
         this.lastPredialysisEvaluation = last_predialysis_evaluation
760
         this.lastPredialysisEvaluation = last_predialysis_evaluation
761
+        if(this.lastPredialysisEvaluation.thromubus_type == 1){
762
+          this.assessmentBeforeDislysis.thromubus_type = this.lastPredialysisEvaluation.thromubus_type.toString()
763
+           this.thrombuShow = true
764
+        }
765
+        console.log("获取上次数据",this.lastPredialysisEvaluation)
762
         if(this.lastPredialysisEvaluation != null) {
766
         if(this.lastPredialysisEvaluation != null) {
763
           if (this.lastPredialysisEvaluation.is_hemorrhage == 1) {
767
           if (this.lastPredialysisEvaluation.is_hemorrhage == 1) {
764
             this.lastPredialysisEvaluation.is_hemorrhage = "1"
768
             this.lastPredialysisEvaluation.is_hemorrhage = "1"
1189
             }
1193
             }
1190
           }
1194
           }
1191
         })
1195
         })
1196
+      },
1197
+
1198
+      changeThrombus(val){
1199
+        if(val == 1){
1200
+          this.thrombuShow = true
1201
+        }
1202
+        if(val == 2){
1203
+         this.thrombuShow = false
1204
+        }
1192
       }
1205
       }
1193
     },
1206
     },
1194
     created() {
1207
     created() {
1221
       console.log("针眼",this.pinholings)
1234
       console.log("针眼",this.pinholings)
1222
       this.catheter_maintenancelist = getDataConfig('hemodialysis','catheter_maintenance')
1235
       this.catheter_maintenancelist = getDataConfig('hemodialysis','catheter_maintenance')
1223
       console.log("导管维护",this.catheter_maintenancelist)
1236
       console.log("导管维护",this.catheter_maintenancelist)
1237
+     
1224
       // this.weight_adjust.weight = this.dry_weight.dry_weight
1238
       // this.weight_adjust.weight = this.dry_weight.dry_weight
1225
 
1239
 
1226
       // if(this.predialysis_evaluation.id == 0){
1240
       // if(this.predialysis_evaluation.id == 0){

+ 3 - 2
src/xt_pages/dialysis/details/index.vue 查看文件

971
         if (resp.state == 1) {
971
         if (resp.state == 1) {
972
           var patient = resp.data.patient // 患者信息
972
           var patient = resp.data.patient // 患者信息
973
           var schedual = resp.data.schedual // 患者排班信息
973
           var schedual = resp.data.schedual // 患者排班信息
974
-          console.log("患者排班信息99999999",schedual)
974
+          // console.log("患者排班信息99999999",schedual)
975
           var prescription = resp.data.prescription // 透析处方
975
           var prescription = resp.data.prescription // 透析处方
976
           if (prescription != null) {
976
           if (prescription != null) {
977
             if (prescription.body_fluid == -2) {
977
             if (prescription.body_fluid == -2) {
983
           var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
983
           var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
984
           // console.log('receiver_treatment_access', receiver_treatment_access)
984
           // console.log('receiver_treatment_access', receiver_treatment_access)
985
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
985
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
986
-          // console.log('透前评估22222', predialysis_evaluation)
986
+         
987
+        
987
 
988
 
988
           if (predialysis_evaluation != null) {
989
           if (predialysis_evaluation != null) {
989
             if (predialysis_evaluation.blood_access_part_id == -2) {
990
             if (predialysis_evaluation.blood_access_part_id == -2) {

+ 16 - 9
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyOne.vue 查看文件

33
           </div>
33
           </div>
34
         </div>
34
         </div>
35
         <div class="inline_block" style="margin-right:10px;">
35
         <div class="inline_block" style="margin-right:10px;">
36
-          性别&nbsp;&nbsp;&nbsp;&nbsp;
36
+          性别&nbsp;
37
           <label-box :isChecked="patientInfo.gender == '男'" showValue="男" ></label-box>&nbsp;
37
           <label-box :isChecked="patientInfo.gender == '男'" showValue="男" ></label-box>&nbsp;
38
           <label-box :isChecked="patientInfo.gender == '女'" showValue="女" ></label-box>
38
           <label-box :isChecked="patientInfo.gender == '女'" showValue="女" ></label-box>
39
         </div>
39
         </div>
402
 
402
 
403
       <table class="print-table" border="1">
403
       <table class="print-table" border="1">
404
         <tbody>
404
         <tbody>
405
-            <tr style="height:40px;line-height:40px">
405
+            <tr style="line-height:20px;">
406
               <td width="60">时间</td>
406
               <td width="60">时间</td>
407
               <td width="60">BP</td>
407
               <td width="60">BP</td>
408
               <td width="40">心率</td>
408
               <td width="40">心率</td>
447
         <tbody>
447
         <tbody>
448
           <tr style="height:30px;line-height:30px">
448
           <tr style="height:30px;line-height:30px">
449
             <td width="70" rowspan="3" style="padding-left:5px;border:none;border-right:1px solid #000;">
449
             <td width="70" rowspan="3" style="padding-left:5px;border:none;border-right:1px solid #000;">
450
-              透后评估
450
+              透后小结
451
             </td>
451
             </td>
452
 
452
 
453
             <td width="25" style="border:none;padding-left:5px;">
453
             <td width="25" style="border:none;padding-left:5px;">
554
       </table>
554
       </table>
555
 
555
 
556
       <table class="print-table" border="1">
556
       <table class="print-table" border="1">
557
-        <tr style="height:36px;text-align:left;border:none;">
557
+        <tr style="line-height:25px;text-align:left;border:none;">
558
           <td style="padding-left:5px;border:none">
558
           <td style="padding-left:5px;border:none">
559
-              <p style="margin-bottom:30px">
559
+              <div style="padding-bottom:10px;">
560
                 透析小结:{{ summary.dialysis_summary ? summary.dialysis_summary : "" }}
560
                 透析小结:{{ summary.dialysis_summary ? summary.dialysis_summary : "" }}
561
-              </p>
561
+              </div>
562
+          </td>
563
+        </tr>
564
+        <tr style="line-height:25px;text-align:left;border:none;">
565
+          <td style="padding-left:5px;border:none">
566
+              <div style="padding-bottom:10px;">
567
+                病情记录:{{ summary.special_record ? summary.special_record : "" }}
568
+              </div>
562
           </td>
569
           </td>
563
         </tr>
570
         </tr>
564
         <tr style="height:40px">
571
         <tr style="height:40px">
565
           <td rowspan="11" style="border:none;text-align:right;height:40px">
572
           <td rowspan="11" style="border:none;text-align:right;height:40px">
566
-            记录者
573
+            护士签名
567
             <span style="display: inline-block;width:100px;text-align: left;">
574
             <span style="display: inline-block;width:100px;text-align: left;">
568
                 <span v-if="orderForm.url === ''" style="display:flex;align-items:center;">{{ orderForm.start_nurse }}</span>
575
                 <span v-if="orderForm.url === ''" style="display:flex;align-items:center;">{{ orderForm.start_nurse }}</span>
569
                 <span v-if="orderForm.url !== ''" style="display:flex;align-items:center;height:36px;">
576
                 <span v-if="orderForm.url !== ''" style="display:flex;align-items:center;height:36px;">
570
                     <img :src="orderForm.url" style="height:30px;" />
577
                     <img :src="orderForm.url" style="height:30px;" />
571
                 </span>
578
                 </span>
572
             </span>
579
             </span>
573
-            二核护士
580
+            <!-- 二核护士
574
             <span style="display: inline-block;width:100px;text-align: left;">
581
             <span style="display: inline-block;width:100px;text-align: left;">
575
               &nbsp;
582
               &nbsp;
576
               <span v-if="dialysisOrder ? dialysisOrder.start_nurse != check.modifier : false">
583
               <span v-if="dialysisOrder ? dialysisOrder.start_nurse != check.modifier : false">
584
               {{ getAdminUser(check == null ? 0 : check.creater) }}
591
               {{ getAdminUser(check == null ? 0 : check.creater) }}
585
               </span>
592
               </span>
586
               <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.creater)" alt srcset v-else />
593
               <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.creater)" alt srcset v-else />
587
-            </span>
594
+            </span> -->
588
             </span>
595
             </span>
589
             医生签名
596
             医生签名
590
             <span style="display: inline-block;width:100px;text-align: left;">
597
             <span style="display: inline-block;width:100px;text-align: left;">

+ 2 - 2
src/xt_pages/outpatientCharges/statementPrint.vue 查看文件

65
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
65
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
66
 
66
 
67
       const style =
67
       const style =
68
-        '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 14px;border-color: #000;}}';
68
+        '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}';
69
         printJS({
69
         printJS({
70
             printable: "statement-print",
70
             printable: "statement-print",
71
             type: "html",
71
             type: "html",
150
 
150
 
151
     },
151
     },
152
     getInfo(order_id) {
152
     getInfo(order_id) {
153
-      if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
153
+      if (this.$store.getters.xt_user.org_id == 4) {
154
 
154
 
155
         var that = this
155
         var that = this
156
 
156
 

+ 141 - 64
src/xt_pages/stock/drugs/query.vue 查看文件

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
-      <el-button
6
-        size="small"
7
-        class="filter-item"
8
-        type="primary"
9
-        icon="el-icon-search"
10
-        @click="setting"
11
-      >设置
12
-      </el-button
13
-      >
14
-     <!-- <el-button
15
-        size="small"
16
-        class="filter-item"
17
-        type="primary"
18
-        icon="el-icon-search"
19
-        @click="exportStock"
20
-      >导出
21
-      </el-button> -->
22
-    </div>
23
-    <div class="app-container ">
24
-      <div class="cell clearfix">
25
-        <el-input
26
-          size="small"
27
-          style="width: 400px;"
28
-          class="filter-item"
29
-          v-model.trim="keywords"
30
-          placeholder="商品名称/规格名称"
31
-        />
5
+      <div>
32
         <el-button
6
         <el-button
33
           size="small"
7
           size="small"
34
           class="filter-item"
8
           class="filter-item"
35
           type="primary"
9
           type="primary"
36
           icon="el-icon-search"
10
           icon="el-icon-search"
37
-          @click="search"
38
-        >搜索
11
+          @click="setting"
12
+        >设置
39
         </el-button
13
         </el-button
40
         >
14
         >
15
+      <el-button
16
+          size="small"
17
+          class="filter-item"
18
+          type="primary"
19
+          icon="el-icon-search"
20
+          @click="exportStock"
21
+        >导出
22
+        </el-button>
23
+      </div>
24
+    </div>
25
+    <div class="app-container ">
26
+      <div class="cell clearfix">
27
+         <el-select v-model="drug_category" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
28
+            <el-option
29
+              v-for="(item,index) in drugCategory"
30
+              :key="index"
31
+              :label="item.name"
32
+              :value="item.id">
33
+            </el-option>
34
+        </el-select>
35
+         <el-date-picker
36
+            size="small"
37
+            v-model="start_time"
38
+            prefix-icon="el-icon-date"
39
+            :editable="false"
40
+            style="width: 196px;"
41
+            type="date"
42
+            placeholder="选择日期时间"
43
+            align="right"
44
+            format="yyyy-MM-dd"
45
+            value-format="yyyy-MM-dd"
46
+            @change="startTimeChange"
47
+           ></el-date-picker>-
48
+            <el-date-picker
49
+              size="small"
50
+              v-model="end_time"
51
+              prefix-icon="el-icon-date"
52
+              :editable="false"
53
+              style="width: 196px;margin-right:10px;"
54
+              type="date"
55
+              placeholder="选择日期时间"
56
+              align="right"
57
+              format="yyyy-MM-dd"
58
+              value-format="yyyy-MM-dd"
59
+              @change="endTimeChange"
60
+          ></el-date-picker>
61
+          <el-input
62
+            size="small"
63
+            style="width: 200px;"
64
+            class="filter-item"
65
+            v-model.trim="keywords"
66
+            placeholder="商品名称/规格名称"
67
+          />
68
+          <el-button
69
+            size="small"
70
+            class="filter-item"
71
+            type="primary"
72
+            icon="el-icon-search"
73
+            @click="search"
74
+          >搜索
75
+          </el-button>
41
       </div>
76
       </div>
42
 
77
 
43
 
78
 
121
       <el-pagination
156
       <el-pagination
122
         @size-change="handleSizeChange"
157
         @size-change="handleSizeChange"
123
         @current-change="handleCurrentChange"
158
         @current-change="handleCurrentChange"
124
-        :page-sizes="[10, 50, 100]"
159
+        :page-sizes="[10, 50, 100,500,1000]"
125
         :page-size="10"
160
         :page-size="10"
126
         background
161
         background
127
         align="right"
162
         align="right"
144
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
179
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
145
   import { getAllDrugStockQueryList } from '@/api/drug/drug_stock'
180
   import { getAllDrugStockQueryList } from '@/api/drug/drug_stock'
146
   import SettingDialog from './settingDialog/index'
181
   import SettingDialog from './settingDialog/index'
147
-
182
+  import { getDictionaryDataConfig } from "@/utils/data";
148
   export default {
183
   export default {
149
     name: 'stockIn',
184
     name: 'stockIn',
150
     created() {
185
     created() {
151
       this.GetAllDrugStockQueryList()
186
       this.GetAllDrugStockQueryList()
187
+
188
+      var drugCategory = getDictionaryDataConfig('system','drug_category')
189
+      this.drugCategory.push(...drugCategory)
190
+      console.log("透析记录",this.drugCategory)
152
     },
191
     },
153
     components: {
192
     components: {
154
       SettingDialog,
193
       SettingDialog,
176
           loading: false,
215
           loading: false,
177
           warehouseInfoDate: []
216
           warehouseInfoDate: []
178
         },
217
         },
179
-        tableData:[]
218
+        tableData:[],
219
+        drug_category:0,
220
+        drugCategory:[
221
+          {id:0,name:"全部"}
222
+        ]
180
       }
223
       }
181
     },
224
     },
182
     methods: {
225
     methods: {
227
         }
270
         }
228
       },
271
       },
229
       GetAllDrugStockQueryList: function() {
272
       GetAllDrugStockQueryList: function() {
230
-        console.log(this.keywords)
273
+       
231
         const Params = {
274
         const Params = {
232
           page: this.page,
275
           page: this.page,
233
           limit: this.limit,
276
           limit: this.limit,
234
-          keyword: this.keywords
277
+          keyword: this.keywords,
278
+          drug_category:this.drug_category,
279
+          start_time:this.start_time,
280
+          end_time:this.end_time,
235
         }
281
         }
282
+        console.log("parasm22222",Params)
236
         this.WarehouseInfo.loading = true
283
         this.WarehouseInfo.loading = true
237
         this.WarehouseInfo.warehouseInfoDate = []
284
         this.WarehouseInfo.warehouseInfoDate = []
238
         getAllDrugStockQueryList(Params).then(response => {
285
         getAllDrugStockQueryList(Params).then(response => {
251
               arr.push(response.data.data.list[i])
298
               arr.push(response.data.data.list[i])
252
             }
299
             }
253
             console.log("数据源头",arr)
300
             console.log("数据源头",arr)
254
-            // for(let i=0;i<arr.length;i++){
255
-            //    arr[i].stockInCount = 
256
-            // }
301
+            for(let i=0;i<arr.length;i++){
302
+               arr[i].stockInCount =  this.stockInCount(arr[i])
303
+               arr[i].salesReturnCount = this.salesReturnCount(arr[i])
304
+               arr[i].reactCount = (this.stockInCount(arr[i]) - this.salesReturnCount(arr[i]))?this.stockInCount(arr[i]) - this.salesReturnCount(arr[i]):0
305
+               arr[i].stockOutCount = this.stockOutCount(arr[i])
306
+               arr[i].cancelStockCount = this.cancelStockCount(arr[i])?this.cancelStockCount(arr[i]):0
307
+               arr[i].reactOutCount = (this.stockOutCount(arr[i]) - this.cancelStockCount(arr[i]))?(this.stockOutCount(arr[i]) - this.cancelStockCount(arr[i])):0
308
+               arr[i].overplusCount = (this.stockInCount(arr[i])-this.salesReturnCount(arr[i])-this.stockOutCount(arr[i])+this.cancelStockCount(arr[i]))?this.stockInCount(arr[i])-this.salesReturnCount(arr[i])-this.stockOutCount(arr[i])+this.cancelStockCount(arr[i]):0
309
+            }
310
+             console.log("arr222222222",arr)
311
+             this.tableData = arr
257
             this.handleSpanTempArr()
312
             this.handleSpanTempArr()
258
           }
313
           }
259
         })
314
         })
291
       calculate: function(val) {
346
       calculate: function(val) {
292
         return Math.round(parseFloat(val) * 100) / 100
347
         return Math.round(parseFloat(val) * 100) / 100
293
       },
348
       },
294
-      startTimeChange: function() {
295
-        this.GetAllDrugStockQueryList()
296
-      },
297
-      endTimeChange: function() {
298
-        this.GetAllDrugStockQueryList()
299
-      },
349
+  
350
+    startTimeChange: function(val) {
351
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
352
+      
353
+      if (time > 0) {
354
+        this.$message.error("开始时间不能大于结束时间");
355
+        this.start_time = "";
356
+      } else {
357
+        this.GetAllDrugStockQueryList();
358
+      }
359
+    },
360
+    endTimeChange: function(val) {
361
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
362
+      if (time < 0) {
363
+        this.$message.error("结束时间不能小于开始时间");
364
+        this.end_time = "";
365
+      } else {
366
+        this.GetAllDrugStockQueryList();
367
+      }
368
+     
369
+    },
300
       stockInCount: function(row) {
370
       stockInCount: function(row) {
301
         let total = 0
371
         let total = 0
302
         for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
372
         for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
337
       },
407
       },
338
       search: function() {
408
       search: function() {
339
         this.GetAllDrugStockQueryList()
409
         this.GetAllDrugStockQueryList()
340
-      }, setting: function() {
410
+      }, 
411
+      setting: function() {
341
         this.$refs.dialog.show()
412
         this.$refs.dialog.show()
342
       },
413
       },
343
-      //  exportStock(){
344
-      //    import('@/vendor/Export2Excel').then(excel => {
345
-      //    const tHeader = ['药品名称', '规格名称', '入库数量','入库退货','实际入库','出库数量','出库退货','实际出库','剩余库存']
346
-      //    const filterVal = ['index', 'dialysis_no', 'name','drug_name','drug_spec','Total','Count','margin','margin']
347
-      //   //  for(let i=0;i<this.tableData.length;i++){
348
-      //   //     this.tableData[i].margin = (this.tableData[i].Total?this.tableData[i].Total:0) - this.tableData[i].Count
349
-      //   //  }
414
+       exportStock(){
415
+         import('@/vendor/Export2Excel').then(excel => {
416
+         const tHeader = ['药品名称', '规格名称', '入库数量','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
417
+         const filterVal = ['drug_name', 'drug_spec', 'stockInCount','salesReturnCount','reactCount','stockOutCount','cancelStockCount','reactOutCount','overplusCount']
418
+       
350
         
419
         
351
-      //    const data = this.formatJson(filterVal, this.tableData)
420
+         const data = this.formatJson(filterVal, this.tableData)
352
       
421
       
353
-      //    excel.export_json_to_excel({
354
-      //      header: tHeader,
355
-      //      data,
356
-      //      filename: '自备药查询'
357
-      //    })
358
-      //     this.downloadLoading = false
359
-      //   })
360
-      //  },
361
-      //  formatJson(filterVal, jsonData) {
362
-      //   return jsonData.map(v => filterVal.map(j => v[j]));
363
-      // },
364
-
422
+         excel.export_json_to_excel({
423
+           header: tHeader,
424
+           data,
425
+           filename: '自备药查询'
426
+         })
427
+          this.downloadLoading = false
428
+        })
429
+       },
430
+       formatJson(filterVal, jsonData) {
431
+        return jsonData.map(v => filterVal.map(j => v[j]));
432
+      },
433
+      getDictionaryDataConfig(module, filed_name) {
434
+        return getDictionaryDataConfig(module, filed_name)
435
+      },
436
+      getTimestamp(time) { // 把时间日期转成时间戳
437
+        return (new Date(time)).getTime() / 1000
438
+      },
439
+      changeDrug(){
440
+       this.GetAllDrugStockQueryList()
441
+      }
365
     }
442
     }
366
   }
443
   }
367
 </script>
444
 </script>

+ 48 - 13
src/xt_pages/stock/stockOutOrder.vue 查看文件

132
                 size="small"
132
                 size="small"
133
                 type="warning"
133
                 type="warning"
134
                 icon="el-icon-document"
134
                 icon="el-icon-document"
135
-                @click="handleSearch(scope.row.id)"
135
+                @click="handleSearch(scope.row.id,scope.row)"
136
               >
136
               >
137
               </el-button>
137
               </el-button>
138
             </el-tooltip>
138
             </el-tooltip>
259
                 <span>出库数量</span>
259
                 <span>出库数量</span>
260
               </template>
260
               </template>
261
               <template slot-scope="scope">
261
               <template slot-scope="scope">
262
-                <span>{{scope.row.count}}</span>
263
-
262
+                <!-- <span>{{scope.row.count}}</span> -->
263
+                <span>{{getOutStockCount(scope.row.good_id)}}</span>
264
               </template>
264
               </template>
265
             </el-table-column>
265
             </el-table-column>
266
             <el-table-column label="总价" min-width="20" align="center">
266
             <el-table-column label="总价" min-width="20" align="center">
383
   GetAllConfig,
383
   GetAllConfig,
384
   getWarehouseOutList,
384
   getWarehouseOutList,
385
   getWarehouseOutInfo,
385
   getWarehouseOutInfo,
386
-  getWarehouseOutUser
386
+  getWarehouseOutUser,
387
+  GetOutStockTotalCount
387
 } from "@/api/stock";
388
 } from "@/api/stock";
388
 import BreadCrumb from "../components/bread-crumb";
389
 import BreadCrumb from "../components/bread-crumb";
389
 
390
 
452
       userList:[],
453
       userList:[],
453
       type_name:'',
454
       type_name:'',
454
       specification_name:"",
455
       specification_name:"",
455
-      
456
+      stockCount:[]
456
     };
457
     };
457
   },
458
   },
458
   methods: {
459
   methods: {
607
       }
608
       }
608
     },
609
     },
609
     handleEdit: function(index, row) {
610
     handleEdit: function(index, row) {
611
+      
610
       this.$router.push({
612
       this.$router.push({
611
         name: "stockOutDetail",
613
         name: "stockOutDetail",
612
-        query: { id: row.id, type: this.type }
614
+        query: { id: row.id, type: this.type,warehouse_out_time:row.warehouse_out_time }
613
       });
615
       });
614
     },
616
     },
615
     handleDelete: function(index, row) {
617
     handleDelete: function(index, row) {
708
 
710
 
709
     
711
     
710
     //新增
712
     //新增
711
-    handleSearch(id){ 
713
+    handleSearch(id,row){ 
714
+      console.log("row2233r5",row)
712
       this.warehousingOutInfo.info = []
715
       this.warehousingOutInfo.info = []
713
       this.warehousingOutInfo.warehousingOutData = []
716
       this.warehousingOutInfo.warehousingOutData = []
714
       this.GetOrderDetailOne(id)
717
       this.GetOrderDetailOne(id)
715
-      this.dialogVisible = true
718
+      this.GetTotalCount(row.warehouse_out_time)
719
+      
716
     },
720
     },
717
   
721
   
718
     //获取出库单详情数据
722
     //获取出库单详情数据
790
             return false
794
             return false
791
           } else {
795
           } else {
792
             var total = 0
796
             var total = 0
793
-            for (let i = 0; i < response.data.data.list.length; i++) {
794
-              var obj = response.data.data.list[i]
797
+            var list = response.data.data.list
798
+            var arrList =  this.unique(list)
799
+            for (let i = 0; i < arrList.length; i++) {
800
+              var obj = arrList[i]
795
               obj['is_total'] = 0
801
               obj['is_total'] = 0
796
               this.userList.push(obj)
802
               this.userList.push(obj)
797
-              total = total + response.data.data.list[i].count
803
+              total = total + arrList[i].count
798
             }
804
             }
799
             this.userList.push({
805
             this.userList.push({
800
               is_total: 1,
806
               is_total: 1,
803
             this.type_name = this.userList[0].type.type_name
809
             this.type_name = this.userList[0].type.type_name
804
             this.specification_name = this.userList[0].info.specification_name
810
             this.specification_name = this.userList[0].info.specification_name
805
             console.log("详情数据区",this.userList)
811
             console.log("详情数据区",this.userList)
806
-              this.editdialogVisible = true
812
+            this.editdialogVisible = true
807
           }
813
           }
808
         })
814
         })
809
       },
815
       },
813
       },
819
       },
814
       deleteRecord(){
820
       deleteRecord(){
815
 
821
 
816
-      }
822
+      },
823
+
824
+      GetTotalCount(time){
825
+          var params = {
826
+           warehouse_out_time:time
827
+          }
828
+        GetOutStockTotalCount(params).then(response=>{
829
+           if(response.data.state == 1){
830
+              var stockCount = response.data.data.stockCount
831
+              console.log("出库数量2323",stockCount)
832
+              this.stockCount = stockCount
833
+              this.dialogVisible = true
834
+           }
835
+        })
836
+      },
837
+
838
+     getOutStockCount(id){
839
+         var count = 0 
840
+         for(let i=0;i<this.stockCount.length;i++){
841
+            if(id == this.stockCount[i].good_id){
842
+              count = this.stockCount[i].count
843
+            }
844
+         }
845
+         return count
846
+     },
847
+
848
+     unique(arr) {
849
+        const res = new Map();
850
+        return arr.filter((arr) => !res.has(arr.patient_id) && res.set(arr.patient_id, 1));
851
+     }
817
   }
852
   }
818
 };
853
 };
819
 </script>
854
 </script>

+ 35 - 9
src/xt_pages/stock/stockOutOrderDetail.vue 查看文件

74
               <span>出库数量</span>
74
               <span>出库数量</span>
75
             </template>
75
             </template>
76
             <template slot-scope="scope">
76
             <template slot-scope="scope">
77
-              <span>{{scope.row.count}}</span>
78
-
77
+              <!-- <span>{{scope.row.count}}</span> -->
78
+                <span>{{getOutStockCount(scope.row.good_id)}}</span>
79
             </template>
79
             </template>
80
           </el-table-column>
80
           </el-table-column>
81
           <el-table-column label="总价" min-width="20" align="center">
81
           <el-table-column label="总价" min-width="20" align="center">
112
 
112
 
113
 <script>
113
 <script>
114
   import { uParseTime } from '@/utils/tools'
114
   import { uParseTime } from '@/utils/tools'
115
-  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutInfo } from '@/api/stock'
115
+  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutInfo,GetOutStockTotalCount } from '@/api/stock'
116
   import BreadCrumb from '../components/bread-crumb'
116
   import BreadCrumb from '../components/bread-crumb'
117
 
117
 
118
   export default {
118
   export default {
120
     components: { BreadCrumb },
120
     components: { BreadCrumb },
121
     created() {
121
     created() {
122
       const order_id = this.$route.query.id
122
       const order_id = this.$route.query.id
123
+      const warehouse_out_time = this.$route.query.warehouse_out_time
124
+      console.log("时间搓",warehouse_out_time)
123
       this.GetConfigInfo()
125
       this.GetConfigInfo()
124
       this.GetOrderDetail(order_id)
126
       this.GetOrderDetail(order_id)
127
+      this.GetTotalCount(warehouse_out_time)
125
     },
128
     },
126
     data() {
129
     data() {
127
       return {
130
       return {
149
           loading: false,
152
           loading: false,
150
           warehousingOutData: [],
153
           warehousingOutData: [],
151
           info: {}
154
           info: {}
152
-        }
155
+        },
156
+        stockCount:[]
153
       }
157
       }
154
     },
158
     },
155
     methods: {
159
     methods: {
221
             this.$message.error(response.data.msg)
225
             this.$message.error(response.data.msg)
222
             return false
226
             return false
223
           } else {
227
           } else {
224
-            console.log("=====",response.data.data.list)
225
-            console.log("=11111",response.data.data.info)
228
+           
226
             for (let i = 0; i < response.data.data.list.length; i++) {
229
             for (let i = 0; i < response.data.data.list.length; i++) {
227
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
230
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
228
             }
231
             }
229
             this.warehousingOutInfo.info = response.data.data.info
232
             this.warehousingOutInfo.info = response.data.data.info
233
+            console.log("数据源头9999999999",this.warehousingOutInfo.warehousingOutData)
230
             this.handleSpanTempArr()
234
             this.handleSpanTempArr()
231
           }
235
           }
232
         })
236
         })
263
         })
267
         })
264
       }, editRecord: function() {
268
       }, editRecord: function() {
265
         this.$emit('edit-record')
269
         this.$emit('edit-record')
266
-      },jump(row){
270
+      },
271
+      jump(row){
267
         this.$router.push({
272
         this.$router.push({
268
           name: 'user_detail',
273
           name: 'user_detail',
269
           query: { id: row.id }
274
           query: { id: row.id }
277
             colspan: _col
282
             colspan: _col
278
           }
283
           }
279
         }
284
         }
280
-      },handleSpanTempArr(){
285
+      },
286
+      handleSpanTempArr(){
281
         this.tempArr = []
287
         this.tempArr = []
282
 
288
 
283
         for (let i = 0; i < this.warehousingOutInfo.warehousingOutData.length; i++) {
289
         for (let i = 0; i < this.warehousingOutInfo.warehousingOutData.length; i++) {
311
           }
317
           }
312
         })
318
         })
313
         this.sameRowArr = sameRowArr
319
         this.sameRowArr = sameRowArr
320
+      },
314
 
321
 
322
+      GetTotalCount(time){
323
+          var params = {
324
+           warehouse_out_time:time
325
+          }
326
+        GetOutStockTotalCount(params).then(response=>{
327
+           if(response.data.state == 1){
328
+              var stockCount = response.data.data.stockCount
329
+              console.log("stockCount",stockCount)
330
+              this.stockCount = stockCount
331
+           }
332
+        })
333
+      },
315
 
334
 
316
-
335
+      getOutStockCount(id){
336
+         var count = 0 
337
+         for(let i=0;i<this.stockCount.length;i++){
338
+            if(id == this.stockCount[i].good_id){
339
+              count = this.stockCount[i].count
340
+            }
341
+         }
342
+         return count
317
       }
343
       }
318
     }
344
     }
319
   }
345
   }

+ 1 - 1
src/xt_pages/stock/stockQuery.vue 查看文件

345
       return total;
345
       return total;
346
     },
346
     },
347
     stockOutCount: function(row) {
347
     stockOutCount: function(row) {
348
-      console.log("row------",row)
348
+      
349
       let total = 0;
349
       let total = 0;
350
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
350
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
351
         total = total + row.query_warehouseout_info[i].count;
351
         total = total + row.query_warehouseout_info[i].count;

+ 12 - 5
src/xt_pages/stock/stockUserDetail.vue 查看文件

117
             return false
117
             return false
118
           } else {
118
           } else {
119
             var total = 0
119
             var total = 0
120
-            for (let i = 0; i < response.data.data.list.length; i++) {
121
-              var obj = response.data.data.list[i]
120
+          
121
+            var list =  response.data.data.list
122
+            console.log("list",list)
123
+            var arrList = this.unique(list)
124
+            for (let i = 0; i < arrList.length; i++) {
125
+              var obj = arrList[i]
122
               obj['is_total'] = 0
126
               obj['is_total'] = 0
123
               this.userList.push(obj)
127
               this.userList.push(obj)
124
-              total = total + response.data.data.list[i].count
128
+              total = total + arrList[i].count
125
             }
129
             }
126
             this.userList.push({
130
             this.userList.push({
127
               is_total: 1,
131
               is_total: 1,
128
               total: total,
132
               total: total,
129
             })
133
             })
130
-
131
-            console.log(this.userList)
132
           }
134
           }
133
         })
135
         })
136
+      },
137
+
138
+      unique(arr) {
139
+        const res = new Map();
140
+        return arr.filter((arr) => !res.has(arr.patient_id) && res.set(arr.patient_id, 1));
134
       }
141
       }
135
     }
142
     }
136
   }
143
   }