Browse Source

打印单

XMLWAN 4 years ago
parent
commit
46f50cfcfd

+ 9 - 0
src/api/stock.js View File

@@ -574,4 +574,13 @@ export function PostSearchStock(keyword,params){
574 574
     method:"get",
575 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 View File

@@ -289,15 +289,6 @@
289 289
                 <el-option label="是" value="1"></el-option>
290 290
                 <el-option label="否" value="2"></el-option>
291 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 292
             </el-form-item>
302 293
           </el-col>
303 294
 
@@ -525,34 +516,36 @@
525 516
             </el-form-item>
526 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 549
         </el-row>
557 550
 
558 551
 
@@ -704,6 +697,11 @@
704 697
           edema:'',
705 698
           special_treatment:'',
706 699
           catheter_maintenance:"",
700
+          thromubus_type:"",
701
+          thrombus_av:"",
702
+          thromubus_a:"",
703
+          thromubus_v:""
704
+
707 705
         },
708 706
 
709 707
         InnerDialogProps: {
@@ -718,7 +716,8 @@
718 716
         puncture_ways: '',
719 717
         skins:[],
720 718
         pinholings:[],
721
-        catheter_maintenancelist:[]
719
+        catheter_maintenancelist:[],
720
+        thrombuShow:false
722 721
       }
723 722
     },
724 723
     props: {
@@ -759,6 +758,11 @@
759 758
       },
760 759
       show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
761 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 766
         if(this.lastPredialysisEvaluation != null) {
763 767
           if (this.lastPredialysisEvaluation.is_hemorrhage == 1) {
764 768
             this.lastPredialysisEvaluation.is_hemorrhage = "1"
@@ -1189,6 +1193,15 @@
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 1207
     created() {
@@ -1221,6 +1234,7 @@
1221 1234
       console.log("针眼",this.pinholings)
1222 1235
       this.catheter_maintenancelist = getDataConfig('hemodialysis','catheter_maintenance')
1223 1236
       console.log("导管维护",this.catheter_maintenancelist)
1237
+     
1224 1238
       // this.weight_adjust.weight = this.dry_weight.dry_weight
1225 1239
 
1226 1240
       // if(this.predialysis_evaluation.id == 0){

+ 3 - 2
src/xt_pages/dialysis/details/index.vue View File

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

+ 16 - 9
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyOne.vue View File

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

+ 2 - 2
src/xt_pages/outpatientCharges/statementPrint.vue View File

@@ -65,7 +65,7 @@ export default {
65 65
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
66 66
 
67 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 69
         printJS({
70 70
             printable: "statement-print",
71 71
             type: "html",
@@ -150,7 +150,7 @@ export default {
150 150
 
151 151
     },
152 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 155
         var that = this
156 156
 

+ 141 - 64
src/xt_pages/stock/drugs/query.vue View File

@@ -2,42 +2,77 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 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 6
         <el-button
33 7
           size="small"
34 8
           class="filter-item"
35 9
           type="primary"
36 10
           icon="el-icon-search"
37
-          @click="search"
38
-        >搜索
11
+          @click="setting"
12
+        >设置
39 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 76
       </div>
42 77
 
43 78
 
@@ -121,7 +156,7 @@
121 156
       <el-pagination
122 157
         @size-change="handleSizeChange"
123 158
         @current-change="handleCurrentChange"
124
-        :page-sizes="[10, 50, 100]"
159
+        :page-sizes="[10, 50, 100,500,1000]"
125 160
         :page-size="10"
126 161
         background
127 162
         align="right"
@@ -144,11 +179,15 @@
144 179
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
145 180
   import { getAllDrugStockQueryList } from '@/api/drug/drug_stock'
146 181
   import SettingDialog from './settingDialog/index'
147
-
182
+  import { getDictionaryDataConfig } from "@/utils/data";
148 183
   export default {
149 184
     name: 'stockIn',
150 185
     created() {
151 186
       this.GetAllDrugStockQueryList()
187
+
188
+      var drugCategory = getDictionaryDataConfig('system','drug_category')
189
+      this.drugCategory.push(...drugCategory)
190
+      console.log("透析记录",this.drugCategory)
152 191
     },
153 192
     components: {
154 193
       SettingDialog,
@@ -176,7 +215,11 @@
176 215
           loading: false,
177 216
           warehouseInfoDate: []
178 217
         },
179
-        tableData:[]
218
+        tableData:[],
219
+        drug_category:0,
220
+        drugCategory:[
221
+          {id:0,name:"全部"}
222
+        ]
180 223
       }
181 224
     },
182 225
     methods: {
@@ -227,12 +270,16 @@
227 270
         }
228 271
       },
229 272
       GetAllDrugStockQueryList: function() {
230
-        console.log(this.keywords)
273
+       
231 274
         const Params = {
232 275
           page: this.page,
233 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 283
         this.WarehouseInfo.loading = true
237 284
         this.WarehouseInfo.warehouseInfoDate = []
238 285
         getAllDrugStockQueryList(Params).then(response => {
@@ -251,9 +298,17 @@
251 298
               arr.push(response.data.data.list[i])
252 299
             }
253 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 312
             this.handleSpanTempArr()
258 313
           }
259 314
         })
@@ -291,12 +346,27 @@
291 346
       calculate: function(val) {
292 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 370
       stockInCount: function(row) {
301 371
         let total = 0
302 372
         for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
@@ -337,31 +407,38 @@
337 407
       },
338 408
       search: function() {
339 409
         this.GetAllDrugStockQueryList()
340
-      }, setting: function() {
410
+      }, 
411
+      setting: function() {
341 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 444
 </script>

+ 48 - 13
src/xt_pages/stock/stockOutOrder.vue View File

@@ -132,7 +132,7 @@
132 132
                 size="small"
133 133
                 type="warning"
134 134
                 icon="el-icon-document"
135
-                @click="handleSearch(scope.row.id)"
135
+                @click="handleSearch(scope.row.id,scope.row)"
136 136
               >
137 137
               </el-button>
138 138
             </el-tooltip>
@@ -259,8 +259,8 @@
259 259
                 <span>出库数量</span>
260 260
               </template>
261 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 264
               </template>
265 265
             </el-table-column>
266 266
             <el-table-column label="总价" min-width="20" align="center">
@@ -383,7 +383,8 @@ import {
383 383
   GetAllConfig,
384 384
   getWarehouseOutList,
385 385
   getWarehouseOutInfo,
386
-  getWarehouseOutUser
386
+  getWarehouseOutUser,
387
+  GetOutStockTotalCount
387 388
 } from "@/api/stock";
388 389
 import BreadCrumb from "../components/bread-crumb";
389 390
 
@@ -452,7 +453,7 @@ export default {
452 453
       userList:[],
453 454
       type_name:'',
454 455
       specification_name:"",
455
-      
456
+      stockCount:[]
456 457
     };
457 458
   },
458 459
   methods: {
@@ -607,9 +608,10 @@ export default {
607 608
       }
608 609
     },
609 610
     handleEdit: function(index, row) {
611
+      
610 612
       this.$router.push({
611 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 617
     handleDelete: function(index, row) {
@@ -708,11 +710,13 @@ export default {
708 710
 
709 711
     
710 712
     //新增
711
-    handleSearch(id){ 
713
+    handleSearch(id,row){ 
714
+      console.log("row2233r5",row)
712 715
       this.warehousingOutInfo.info = []
713 716
       this.warehousingOutInfo.warehousingOutData = []
714 717
       this.GetOrderDetailOne(id)
715
-      this.dialogVisible = true
718
+      this.GetTotalCount(row.warehouse_out_time)
719
+      
716 720
     },
717 721
   
718 722
     //获取出库单详情数据
@@ -790,11 +794,13 @@ export default {
790 794
             return false
791 795
           } else {
792 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 801
               obj['is_total'] = 0
796 802
               this.userList.push(obj)
797
-              total = total + response.data.data.list[i].count
803
+              total = total + arrList[i].count
798 804
             }
799 805
             this.userList.push({
800 806
               is_total: 1,
@@ -803,7 +809,7 @@ export default {
803 809
             this.type_name = this.userList[0].type.type_name
804 810
             this.specification_name = this.userList[0].info.specification_name
805 811
             console.log("详情数据区",this.userList)
806
-              this.editdialogVisible = true
812
+            this.editdialogVisible = true
807 813
           }
808 814
         })
809 815
       },
@@ -813,7 +819,36 @@ export default {
813 819
       },
814 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 854
 </script>

+ 35 - 9
src/xt_pages/stock/stockOutOrderDetail.vue View File

@@ -74,8 +74,8 @@
74 74
               <span>出库数量</span>
75 75
             </template>
76 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 79
             </template>
80 80
           </el-table-column>
81 81
           <el-table-column label="总价" min-width="20" align="center">
@@ -112,7 +112,7 @@
112 112
 
113 113
 <script>
114 114
   import { uParseTime } from '@/utils/tools'
115
-  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutInfo } from '@/api/stock'
115
+  import { deleteWarehouseOut, GetAllConfig, getWarehouseOutInfo,GetOutStockTotalCount } from '@/api/stock'
116 116
   import BreadCrumb from '../components/bread-crumb'
117 117
 
118 118
   export default {
@@ -120,8 +120,11 @@
120 120
     components: { BreadCrumb },
121 121
     created() {
122 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 125
       this.GetConfigInfo()
124 126
       this.GetOrderDetail(order_id)
127
+      this.GetTotalCount(warehouse_out_time)
125 128
     },
126 129
     data() {
127 130
       return {
@@ -149,7 +152,8 @@
149 152
           loading: false,
150 153
           warehousingOutData: [],
151 154
           info: {}
152
-        }
155
+        },
156
+        stockCount:[]
153 157
       }
154 158
     },
155 159
     methods: {
@@ -221,12 +225,12 @@
221 225
             this.$message.error(response.data.msg)
222 226
             return false
223 227
           } else {
224
-            console.log("=====",response.data.data.list)
225
-            console.log("=11111",response.data.data.info)
228
+           
226 229
             for (let i = 0; i < response.data.data.list.length; i++) {
227 230
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
228 231
             }
229 232
             this.warehousingOutInfo.info = response.data.data.info
233
+            console.log("数据源头9999999999",this.warehousingOutInfo.warehousingOutData)
230 234
             this.handleSpanTempArr()
231 235
           }
232 236
         })
@@ -263,7 +267,8 @@
263 267
         })
264 268
       }, editRecord: function() {
265 269
         this.$emit('edit-record')
266
-      },jump(row){
270
+      },
271
+      jump(row){
267 272
         this.$router.push({
268 273
           name: 'user_detail',
269 274
           query: { id: row.id }
@@ -277,7 +282,8 @@
277 282
             colspan: _col
278 283
           }
279 284
         }
280
-      },handleSpanTempArr(){
285
+      },
286
+      handleSpanTempArr(){
281 287
         this.tempArr = []
282 288
 
283 289
         for (let i = 0; i < this.warehousingOutInfo.warehousingOutData.length; i++) {
@@ -311,9 +317,29 @@
311 317
           }
312 318
         })
313 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 View File

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

+ 12 - 5
src/xt_pages/stock/stockUserDetail.vue View File

@@ -117,20 +117,27 @@
117 117
             return false
118 118
           } else {
119 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 126
               obj['is_total'] = 0
123 127
               this.userList.push(obj)
124
-              total = total + response.data.data.list[i].count
128
+              total = total + arrList[i].count
125 129
             }
126 130
             this.userList.push({
127 131
               is_total: 1,
128 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
   }