Преглед на файлове

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

csx преди 2 години
родител
ревизия
5605608804

+ 8 - 0
src/api/his/his_tools.js Целия файл

@@ -30,3 +30,11 @@ export function GetDetailPatients(params) {
30 30
     params: params
31 31
   })
32 32
 }
33
+
34
+export function getHisOrderList(params) {
35
+  return request({
36
+    url: '/api/his/gethisorderlist',
37
+    method: 'Get',
38
+    params: params
39
+  })
40
+}

+ 6 - 0
src/router/modules/hisTool.js Целия файл

@@ -108,5 +108,11 @@ export default {
108 108
       is_menu: false,
109 109
       meta: { title: 'gatherPrint', noCache: true }
110 110
     }
111
+    // {
112
+    //   path: '/hisTool/export',
113
+    //   component: () => import('@/xt_pages/outpatientTool/export'),
114
+    //   name: 'export',
115
+    //   meta: { title: 'export', noCache: true }
116
+    // }
111 117
   ]
112 118
 }

+ 22 - 22
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Целия файл

@@ -220,7 +220,7 @@
220 220
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
221 221
                             </el-form-item>
222 222
 
223
-                           
223
+
224 224
 
225 225
                           </div>
226 226
 
@@ -246,14 +246,14 @@
246 246
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
247 247
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
248 248
                             </el-form-item>
249
-                          
249
+
250 250
                             <el-form-item v-else :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
251 251
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
252 252
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
253 253
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
254 254
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
255 255
                             </el-form-item>
256
-                            
256
+
257 257
                         </div>
258 258
 
259 259
                     </el-col>
@@ -412,7 +412,7 @@
412 412
                     </el-col>
413 413
                     <el-col
414 414
                             :span="8"
415
-                            v-if="anticoagulant.gaijiliang != -1 && isShows('钙剂量')"
415
+                            v-if="isShows('钙剂量')"
416 416
                     >
417 417
                         <el-form-item label="钙剂量(ml) : ">
418 418
                             <el-input
@@ -1662,7 +1662,7 @@
1662 1662
         this.isVisibility = true
1663 1663
       },
1664 1664
       handleAdviceCommit() {
1665
-       
1665
+
1666 1666
           let results = []
1667 1667
           for (let i = 0; i < this.targetAdvices.length; i++) {
1668 1668
             for (let a = 0; a < this.checkedCities.length; a++) {
@@ -1680,7 +1680,7 @@
1680 1680
           var date = new Date()
1681 1681
           var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
1682 1682
           var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
1683
-         
1683
+
1684 1684
           if (results.length > 0) {
1685 1685
             if(!this.isLoading){
1686 1686
               if (this.is_pre == 1) {
@@ -1691,10 +1691,10 @@
1691 1691
                 }
1692 1692
 
1693 1693
                 var arr = this.dialysisPrescription
1694
-               
1694
+
1695 1695
 
1696 1696
                 const ParamsQuery = arr
1697
-                
1697
+
1698 1698
 
1699 1699
                 ParamsQuery['patient'] = this.patient.id
1700 1700
                 ParamsQuery['record_date'] = this.record_date
@@ -1729,7 +1729,7 @@
1729 1729
                       duration: 2000
1730 1730
                     })
1731 1731
                     var date = new Date()
1732
-                    
1732
+
1733 1733
                     const params = {
1734 1734
                       advices: results,
1735 1735
                       advice_date: this.start_time.split(' ')[0],
@@ -1745,7 +1745,7 @@
1745 1745
                     }else{
1746 1746
                       patient_id = this.$route.query.patient_id
1747 1747
                     }
1748
-                  
1748
+
1749 1749
                     CreateGroupAdvice(patient_id, 0, params).then(
1750 1750
                       rs => {
1751 1751
                         var resp = rs.data
@@ -1775,9 +1775,9 @@
1775 1775
                   return
1776 1776
                 }
1777 1777
                 var arr = this.dialysisPrescription
1778
-                
1778
+
1779 1779
                 const ParamsQuery = arr
1780
-              
1780
+
1781 1781
                 ParamsQuery['patient'] = this.patient.id
1782 1782
                 ParamsQuery['record_date'] = this.record_date
1783 1783
                 ParamsQuery['mode'] = 1
@@ -1940,7 +1940,7 @@
1940 1940
 
1941 1941
           this.isShowRemindAdvice = false
1942 1942
           this.isVisibility = true
1943
-        
1943
+
1944 1944
       },
1945 1945
       handleAdviceCancle() {
1946 1946
         this.isShowRemindAdvice = false
@@ -1950,7 +1950,7 @@
1950 1950
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1951 1951
       },
1952 1952
       show(pre, schedual, last, his_is_open,is_advice_open) {
1953
-        
1953
+
1954 1954
         if (pre != undefined) {
1955 1955
           if (pre.oxygen_uptake == 1) {
1956 1956
             this.oxygenShow = true
@@ -2106,7 +2106,7 @@
2106 2106
         console.log("last2323232323232332",last)
2107 2107
         if (this.predialysis == null || this.predialysis.id == 0) {
2108 2108
           if (last != null) {
2109
-            
2109
+
2110 2110
             this.dialysisPrescription.niprocart = last.niprocart
2111 2111
             this.dialysisPrescription.jms = last.jms
2112 2112
             this.dialysisPrescription.fistula_needle_set = last.fistula_needle_set
@@ -2181,7 +2181,7 @@
2181 2181
           this.dialysisPrescription.anticoagulant_zongliang = ""
2182 2182
           this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) +  parseInt(this.dialysisPrescription.anticoagulant_weichi)
2183 2183
         }
2184
-     
2184
+
2185 2185
 
2186 2186
       },
2187 2187
 
@@ -2224,7 +2224,7 @@
2224 2224
               const ParamsQuery = arr
2225 2225
               // console.log('night', ParamsQuery)
2226 2226
               ParamsQuery['patient'] = this.patient.id
2227
-             
2227
+
2228 2228
               ParamsQuery['record_date'] = this.record_date
2229 2229
               ParamsQuery['mode'] = '1'
2230 2230
               ParamsQuery['patient_id'] = this.patient.id
@@ -2320,7 +2320,7 @@
2320 2320
                 ParamsQuery['mode'] = '1'
2321 2321
                 ParamsQuery['patient_id'] = this.patient.id
2322 2322
                 console.log('第三')
2323
-              
2323
+
2324 2324
                 postPrescription(ParamsQuery).then(response => {
2325 2325
                   if (response.data.state == 0) {
2326 2326
                     this.$message.error(response.data.msg)
@@ -2599,7 +2599,7 @@
2599 2599
                   ParamsQuery['mode'] = '1'
2600 2600
                   ParamsQuery['patient_id'] = this.patient.id
2601 2601
                   console.log('第八')
2602
-                  
2602
+
2603 2603
                   postPrescription(ParamsQuery).then(response => {
2604 2604
                     if (response.data.state == 0) {
2605 2605
                       this.$message.error(response.data.msg)
@@ -2639,7 +2639,7 @@
2639 2639
               ParamsQuery['record_date'] = this.record_date
2640 2640
               ParamsQuery['mode'] = '2'
2641 2641
               ParamsQuery['patient_id'] = this.patient.id
2642
-            
2642
+
2643 2643
               if (
2644 2644
                 this.$store.getters.xt_user.user.id !=
2645 2645
                 this.dialysisPrescription.creater
@@ -3192,7 +3192,7 @@
3192 3192
       isShows(name) {
3193 3193
         var filedList = store.getters.xt_user.fileds
3194 3194
         for (let i = 0; i < filedList.length; i++) {
3195
-         
3195
+
3196 3196
           if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
3197 3197
 
3198 3198
             return true
@@ -3572,7 +3572,7 @@
3572 3572
         if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
3573 3573
           this.dialysisPrescription.anticoagulant_zongliang = ''
3574 3574
         }
3575
-       
3575
+
3576 3576
         if(this.$store.getters.xt_user.template_info.template_id == 41 && this.dialysisPrescription.anticoagulant == 2){
3577 3577
          this.dialysisPrescription.anticoagulant_zongliang = ""
3578 3578
          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) +  parseInt(this.dialysisPrescription.anticoagulant_weichi)

+ 1 - 2
src/xt_pages/dialysis/dialysisPrintOrder.vue Целия файл

@@ -1451,8 +1451,7 @@ export default {
1451 1451
         this.org_template_info.template_id == 11 ||
1452 1452
         this.org_template_info.template_id == 49 ||
1453 1453
         this.org_template_info.template_id == 50 ||
1454
-        this.org_template_info.template_id == 51 ||
1455
-        this.org_template_info.template_id == 54
1454
+        this.org_template_info.template_id == 51
1456 1455
       ) {
1457 1456
         printJS({
1458 1457
           printable: "dialysis-print-box-1",

+ 3 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderFiftyFour.vue Целия файл

@@ -113,7 +113,7 @@
113 113
                 prescription.displace_liqui_value
114 114
                   ? prescription.displace_liqui_value
115 115
                   : "/"
116
-              }}ml&nbsp; )
116
+              }}L&nbsp; )
117 117
               <label-box
118 118
                 :isChecked="prescription.mode_id == 32 ? true : false"
119 119
                 showValue="HDP"
@@ -247,7 +247,7 @@
247 247
                   prescription.dialysate_flow ? prescription.dialysate_flow : ""
248 248
                 }}
249 249
               </span>
250
-              ml/h;
250
+              ml/min;
251 251
             </td>
252 252
             <td width="200" style="padding-left: 10px">
253 253
               医师签名:
@@ -276,7 +276,7 @@
276 276
                     {{
277 277
                       prescription.calcium ? prescription.calcium : ""
278 278
                     }} </span
279
-                  >mmol/L&nbsp; 碳酸氢
279
+                  >mmol/L&nbsp; 碳酸氢
280 280
                   <span style="width: 50px; display: inline-block">
281 281
                     {{
282 282
                       prescription.bicarbonate ? prescription.bicarbonate : ""
@@ -1339,7 +1339,6 @@ export default {
1339 1339
           }
1340 1340
 
1341 1341
           var tableAdvice = this.advices;
1342
-          // console.log("医生", tableAdvice);
1343 1342
           if (tableAdvice.length === 0) {
1344 1343
             var obj = { advice_name: "", start_time: "" };
1345 1344
             var obj1 = { advice_name: "", start_time: "" };

+ 12 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Целия файл

@@ -46,7 +46,7 @@
46 46
           <div class="inline_block" style="margin-left: 10px">
47 47
             年龄:
48 48
             <div class="under_line" style="width: 30px; text-align: center">
49
-              {{ getAge(patientInfo) }}
49
+              {{ getAge(patientInfo) -  getoldAge()}}
50 50
             </div>
51 51
52 52
           </div>
@@ -2694,6 +2694,17 @@ export default {
2694 2694
     };
2695 2695
   },
2696 2696
   methods: {
2697
+    // 获取当前年份,用于年龄计算
2698
+    getoldAge(){
2699
+      let date = new Date()
2700
+      let year = date.getFullYear()
2701
+      let year_d = year-this.xtdate.split('-')[0]
2702
+      return year_d
2703
+    },
2704
+
2705
+
2706
+
2707
+
2697 2708
     checkData() {
2698 2709
       if (this.receiverTreatmentAccess.way == 0) {
2699 2710
         this.$message.error("入科方式未填");

+ 10 - 3
src/xt_pages/hospitalStation/invoicePrint.vue Целия файл

@@ -15,13 +15,20 @@
15 15
       <div class="dialysisPage">
16 16
         <printOne
17 17
           v-if="
18
-            org_id != 10215 && org_id != 10265 && org_id != 4 && org_id != 0 && org_id != 9675
18
+            org_id != 10215 &&
19
+            org_id != 10265 &&
20
+            org_id != 4 &&
21
+            org_id != 0 &&
22
+            org_id != 9675
19 23
           "
20 24
           :paramsObj="invoiceParams"
21 25
         ></printOne>
22
-        <printTwo v-if="org_id == 10215 " :paramsObj="invoiceParams"></printTwo>
26
+        <printTwo
27
+          v-if="org_id == 10215 || org_id == 0"
28
+          :paramsObj="invoiceParams"
29
+        ></printTwo>
23 30
         <printThree
24
-          v-if="org_id == 10265 || org_id == 4 || org_id == 9675 ||  org_id == 0"
31
+          v-if="org_id == 10265 || org_id == 4 || org_id == 9675"
25 32
           :paramsObj="invoiceParams"
26 33
         ></printThree>
27 34
       </div>

Файловите разлики са ограничени, защото са твърде много
+ 9 - 13
src/xt_pages/hospitalStation/invoiceTemplate/printTwo.vue


+ 3 - 1
src/xt_pages/hospitalStation/summary.vue Целия файл

@@ -306,6 +306,7 @@
306 306
       width="1200px"
307 307
       title="打印"
308 308
       :visible.sync="invoiceVisible"
309
+      destroy-on-close
309 310
     >
310 311
       <invoicePrint ref="print" :invoiceParams="invoiceParams"></invoicePrint>
311 312
     </el-dialog>
@@ -1122,6 +1123,7 @@ export default {
1122 1123
         setl_time: obj.setl_time,
1123 1124
       };
1124 1125
       this.invoiceParams = paramsObj;
1126
+      
1125 1127
       const loading = this.$loading({
1126 1128
           lock: true,
1127 1129
           text: '正在加载中...',
@@ -1129,8 +1131,8 @@ export default {
1129 1131
           background: 'rgba(0, 0, 0, 0.7)'
1130 1132
         });
1131 1133
         setTimeout(() => {
1132
-          loading.close();
1133 1134
           this.invoiceVisible = true;
1135
+          loading.close();
1134 1136
         }, 1000);
1135 1137
     },
1136 1138
     shouJuPrint(obj) {

+ 631 - 0
src/xt_pages/outpatientTool/export.vue Целия файл

@@ -0,0 +1,631 @@
1
+<template>
2
+  <div class="main-contain new-main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div
7
+      class="app-container"
8
+      style="display: flex; flex: 1; padding: 10px 20px 0px 20px"
9
+    >
10
+      <div class="mainLeft">
11
+        <div>
12
+          <div
13
+            style="
14
+              margin: 10px 0;
15
+              display: flex;
16
+              justify-content: space-between;
17
+            "
18
+          >
19
+            <el-input
20
+              size="small"
21
+              style="width: 130px"
22
+              v-model="keywords"
23
+              class="filter-item"
24
+              placeholder="请输入患者名称"
25
+            />
26
+            <el-button
27
+              size="small"
28
+              class="filter-item"
29
+              type="primary"
30
+              @click="searchAction"
31
+              >搜索
32
+            </el-button>
33
+          </div>
34
+
35
+          <el-table
36
+            :row-class-name="tableRowClassName"
37
+            @row-click="onRowClick"
38
+            :data="patientTableData"
39
+            :height="tableHeight"
40
+            border
41
+            style="width: 100%"
42
+            :row-style="{ color: '#303133' }"
43
+            :header-cell-style="{
44
+              backgroundColor: 'rgb(245, 247, 250)',
45
+              color: '#606266',
46
+            }"
47
+            highlight-current-row
48
+            ref="singleTable"
49
+            @current-change="handleCurrentChange"
50
+          >
51
+            <el-table-column align="center" prop="name" label="姓名" wdith="89">
52
+              <template slot-scope="scope">{{ scope.row.name }}</template>
53
+            </el-table-column>
54
+          </el-table>
55
+        </div>
56
+      </div>
57
+      <div class="mainRight">
58
+        <el-date-picker
59
+          v-model="chargeDate"
60
+          type="daterange"
61
+          value-format="yyyy-MM-dd"
62
+          range-separator="至"
63
+          start-placeholder="开始日期"
64
+          @change="changeDate"
65
+          end-placeholder="结束日期"
66
+        >
67
+        </el-date-picker>
68
+        <el-table
69
+        :data="tableList"
70
+         border
71
+        style="width: 100%">
72
+         <el-table-column prop="date" label="姓名"  width="100" align="center">
73
+           <template slot-scope="scope" >
74
+            {{ scope.row.name }}
75
+           </template>
76
+        </el-table-column>
77
+        <el-table-column  prop="date"  label="身份证"  width="200" align="center">
78
+           <template slot-scope="scope" >
79
+            {{ scope.row.id_card_no }}
80
+           </template> 
81
+        </el-table-column>
82
+        <el-table-column prop="name"  label="医保类型" width="100" align="center">
83
+          <template slot-scope="scope" >
84
+            <span v-if="scope.row.insutype == 0">居民</span>
85
+            <span v-if="scope.row.insutype == 310">职工</span>
86
+            <span v-if="scope.row.insutype == 390">居民</span>
87
+           </template>  
88
+        </el-table-column>
89
+        <el-table-column  prop="address" label="年"  width="50" align="center">
90
+          <template slot-scope="scope" >
91
+            {{getTime(scope.row.settle_accounts_date)}}
92
+         </template>  
93
+        </el-table-column>
94
+         <el-table-column prop="address" label="月"  width="50"  align="center">
95
+          <template slot-scope="scope">
96
+            {{getTimeOne(scope.row.settle_accounts_date)}}
97
+           </template>  
98
+        </el-table-column>
99
+         <el-table-column prop="address" label="收费项目"  width="100" align="center">
100
+           <template slot-scope="scope" >
101
+            <!-- {{getTime(scope.row.settle_accounts_date)}} -->
102
+            <span v-if="scope.row.med_chrgitm_type == '01'">床位费</span>
103
+            <span v-if="scope.row.med_chrgitm_type == '02'">诊察费</span>
104
+            <span v-if="scope.row.med_chrgitm_type == '03'">检查费</span>
105
+            <span v-if="scope.row.med_chrgitm_type == '04'">化验费</span>
106
+            <span v-if="scope.row.med_chrgitm_type == '05'">治疗费</span>
107
+            <span v-if="scope.row.med_chrgitm_type == '06'">手术费</span>
108
+            <span v-if="scope.row.med_chrgitm_type == '08'">材料费</span>
109
+            <span v-if="scope.row.med_chrgitm_type == '09'">西药费</span>
110
+            <span v-if="scope.row.med_chrgitm_type == '11'">中成费</span>
111
+            <span v-if="scope.row.med_chrgitm_type == '14'">其他费</span>
112
+           </template>  
113
+        </el-table-column>
114
+         <el-table-column prop="address" label="数量"  width="100" align="center">
115
+           <template slot-scope="scope" >
116
+            {{getCount(scope.row.child)}}
117
+           </template>  
118
+          </el-table-column>
119
+       
120
+         <el-table-column  prop="address"  label="金额"  width="130" align="center">
121
+         <template slot-scope="scope" >
122
+            {{getAllPrice(scope.row.child)}}
123
+           </template>  
124
+        </el-table-column>
125
+         </el-table>
126
+      </div>
127
+    </div>
128
+  </div>
129
+</template>
130
+
131
+<script>
132
+import { GetDetailPatients,getHisOrderList } from "@/api/his/his_tools";
133
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
134
+const moment = require("moment");
135
+import { uParseTime } from '@/utils/tools'
136
+export default {
137
+  components: {
138
+    BreadCrumb,
139
+  },
140
+  data() {
141
+    return {
142
+      currentRowIndex: 0,
143
+      patientTableData: [],
144
+      tableHeight: 400,
145
+      crumbs: [
146
+        { path: false, name: "His工具" },
147
+        { path: false, name: "明细汇总统计" },
148
+      ],
149
+      titleType: "明细",
150
+      patient_id: 0,
151
+      keywords: "",
152
+      tableList:[],
153
+     chargeDate: [
154
+        moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
155
+        moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
156
+      ],
157
+      start_time:"",
158
+      end_time:""
159
+    };
160
+  },
161
+
162
+  // beforeRouteEnter(to, from, next){
163
+  //     if(from.path == '/hisTool/detailPrint'){
164
+  //       next((vm) => {
165
+  //         vm.titleType = "明细"
166
+  //       })
167
+  //     }else if(from.path == '/hisTool/gatherPrint'){
168
+  //       vm.titleType = "汇总"
169
+  //       next((vm) => {
170
+  //         vm.titleType = "汇总"
171
+  //       })
172
+  //     }else{
173
+  //       next()
174
+  //     }
175
+  // },
176
+
177
+  //判断列表页是否刷新
178
+  beforeRouteLeave(to, from, next) {
179
+    console.log(to, "beforeRouteEnter");
180
+    if (to.path != "/hisTool/detailPrint"&&to.path != "/hisTool/gatherPrint") {
181
+      this.$store.getters.pagedata.list.table_id = 0
182
+      next()
183
+    } else {
184
+     next()
185
+    }
186
+  },
187
+
188
+  watch:{
189
+    'titleType':{
190
+      handler(val){
191
+        this.$store.commit('SET_PAGENAME',val)
192
+      }
193
+    }
194
+  },
195
+
196
+  methods: {
197
+    getPatientList() {
198
+      var params = {
199
+        keyword: this.keywords,
200
+      };
201
+      GetDetailPatients(params).then((response) => {
202
+        if (response.data.state == 0) {
203
+          this.$message.error(response.data.msg);
204
+          return false;
205
+        } else {
206
+          this.patientTableData = response.data.data.patient;
207
+          this.patient_id = this.patientTableData[0].id;
208
+          if (this.$store.getters.pagedata.list.table_id == 0) {
209
+            this.$refs.singleTable.setCurrentRow(this.patientTableData[0]);
210
+          } else {
211
+            this.$refs.singleTable.setCurrentRow(
212
+              this.patientTableData[
213
+                this.$store.getters.pagedata.list.table_id
214
+              ]
215
+            );
216
+          }
217
+        }
218
+      });
219
+    },
220
+
221
+    tableRowClassName({ row, rowIndex }) {
222
+      row.row_index = rowIndex;
223
+    },
224
+
225
+    onRowClick(row, event, column) {
226
+      this.currentRowIndex = row.row_index;
227
+      this.$store.commit("SET_PAGEDATA", {
228
+        table_id: this.currentRowIndex,
229
+      });
230
+      // console.log(this.$store.getters.pagedata.list.table_id, "列表行id");
231
+    },
232
+    searchAction() {
233
+      this.getPatientList();
234
+    },
235
+    handleCurrentChange(row) {
236
+      this.patient_id = row.id;
237
+      this.tableList = []
238
+      this.getHisOrderList(row.id)
239
+    },
240
+    getHisOrderList(id){
241
+       var params = {
242
+        patient_id:id,
243
+        start_time:this.start_time,
244
+        end_time:this.end_time,
245
+       } 
246
+     console.log("params223332233232",params)
247
+     getHisOrderList(params).then(response=>{
248
+       if(response.data.state == 1){
249
+        //  var list = response.data.data.list
250
+        //  console.log("list23232232323",list)
251
+         var groupList = response.data.data.groupList
252
+          
253
+         var arr = []
254
+         for(let i=0;i<groupList.length;i++){
255
+            //已经结算
256
+           if(groupList[i].order.order_status == 2){
257
+              arr.push(groupList[i])
258
+           }
259
+         }
260
+         console.log("已结算数据",arr)
261
+         if(arr.length > 0){
262
+         let objInfo = {};
263
+          if(arr.length > 0) {
264
+             arr.forEach((item, index) => {
265
+              let { med_chrgitm_type } = item;
266
+              if (!objInfo[med_chrgitm_type]) {
267
+                objInfo[med_chrgitm_type] = {
268
+                  med_chrgitm_type:item.med_chrgitm_type,
269
+                  child: [],
270
+                  count: item.cnt,
271
+                  pric:item.pric,
272
+                  order_id:item.order_id,
273
+                  name:item.patient.name,
274
+                  id_card_no:item.patient.id_card_no,
275
+                  insutype:item.order.insutype,
276
+                  settle_accounts_date:item.order.settle_accounts_date,
277
+                  det_item_fee_sumamt:item.det_item_fee_sumamt,
278
+                };
279
+              }
280
+            });
281
+
282
+            let newArr = Object.values(objInfo);
283
+            console.log("newAR23232323232323323",newArr.length)
284
+
285
+            if(newArr.length > 0){
286
+             console.log("尽力33232233232",newArr)
287
+              for(let i=0;i<newArr.length;i++){
288
+                for(let j=0;j<arr.length;j++){
289
+                   if(newArr[i].med_chrgitm_type == arr[j].med_chrgitm_type){
290
+                      newArr[i].child.push(arr[j])
291
+                   }
292
+                }
293
+              }
294
+            }
295
+            console.log("分类后的数据",newArr)
296
+            this.tableList = newArr
297
+          }
298
+          
299
+         }
300
+
301
+         //console.log("grouplist2323322",groupList)
302
+         
303
+       }
304
+     })
305
+    },
306
+    changeDate(){
307
+      this.start_time = this.chargeDate[0];
308
+      this.end_time = this.chargeDate[1];  
309
+      this.getHisOrderList(this.patient_id) 
310
+    },
311
+   getTime(val) {
312
+     if(val < 0){
313
+       return ""
314
+      }
315
+     if(val == ""){
316
+       return ""
317
+      }else {
318
+      return uParseTime(val, '{y}')
319
+      }
320
+    },
321
+   getTimeOne(val) {
322
+     if(val < 0){
323
+       return ""
324
+      }
325
+     if(val == ""){
326
+       return ""
327
+      }else {
328
+      return uParseTime(val, '{m}')
329
+      }
330
+    },
331
+    getCount(val){
332
+      console.log("valr233232323",val)
333
+      var count = 0
334
+      for(let i=0;i<val.length;i++){
335
+        count +=val[i].cnt
336
+      }
337
+      if(count >0){
338
+        return count
339
+      }else{
340
+        return ""
341
+      }
342
+    },
343
+    getAllPrice(val){
344
+      var total_price = 0
345
+      for(let i=0;i<val.length;i++){
346
+        total_price +=val[i].cnt * val[i].pric
347
+      }
348
+      if(total_price >0){
349
+        return total_price.toFixed(2)
350
+      }else{
351
+        return ""
352
+      }
353
+    }
354
+  },
355
+  created() {
356
+
357
+    let type = this.$store.getters.pagedata.pagestate
358
+    if(type == ""){
359
+      this.titleType = "明细"
360
+    }else{
361
+      this.titleType = type
362
+    }
363
+    const tableHeight = document.body.clientHeight - 290;
364
+    this.tableHeight = tableHeight;
365
+    this.start_time = moment(new Date()).add("year", 0).format("YYYY-MM-DD")
366
+    this.end_time = moment(new Date()).add("year", 0).format("YYYY-MM-DD")
367
+    this.getPatientList();
368
+    
369
+  },
370
+
371
+  mounted() {}
372
+};
373
+</script>
374
+
375
+<style lang="scss" scoped>
376
+.new-main-contain {
377
+  height: 100%;
378
+  display: flex;
379
+  flex-direction: column;
380
+}
381
+
382
+.app-container {
383
+  height: 100%;
384
+}
385
+
386
+.mainCell {
387
+  height: 36px;
388
+  display: flex;
389
+  align-items: center;
390
+}
391
+
392
+.mainLeft {
393
+  width: 200px;
394
+  height: 100%;
395
+  display: flex;
396
+  flex-direction: column;
397
+
398
+  .el-radio {
399
+    margin-right: 5px;
400
+  }
401
+}
402
+.mainRight {
403
+  margin-left: 10px;
404
+  flex: 1;
405
+  height: 100%;
406
+  display: flex;
407
+  flex-direction: column;
408
+  overflow-y: auto;
409
+
410
+  .cellSpan {
411
+    min-width: 80px;
412
+    display: inline-block;
413
+    margin-right: 10px;
414
+  }
415
+}
416
+.mainCenter {
417
+  display: flex;
418
+  flex: 1;
419
+}
420
+
421
+.centerLeft {
422
+  flex: 1;
423
+  display: flex;
424
+  flex-direction: column;
425
+  position: relative;
426
+
427
+  .el-form-item {
428
+    width: 32%;
429
+    margin-right: 1%;
430
+    float: left;
431
+  }
432
+
433
+  .el-form-item__label {
434
+    text-align: left;
435
+  }
436
+}
437
+.backColor {
438
+  background: #f6f8f9;
439
+  height: 5px;
440
+  margin-bottom: 5px;
441
+}
442
+
443
+.tabsBox {
444
+  position: relative;
445
+  height: 76%;
446
+  overflow-y: auto;
447
+  margin-bottom: 60px;
448
+
449
+  .el-tabs__item {
450
+    padding: 0 10px;
451
+  }
452
+}
453
+.preTabs {
454
+  height: 100%;
455
+  display: flex;
456
+  flex-direction: column;
457
+
458
+  .el-tabs__content {
459
+    flex: 1;
460
+    overflow-y: auto;
461
+  }
462
+}
463
+
464
+.costBox {
465
+  width: 100%;
466
+  height: 60px;
467
+  background: #fff;
468
+  position: absolute;
469
+  bottom: 0;
470
+  display: flex;
471
+  align-items: center;
472
+}
473
+
474
+.addTab {
475
+  position: absolute;
476
+  right: 0;
477
+  top: 14px;
478
+  z-index: 20;
479
+}
480
+
481
+.centerRight {
482
+  width: 300px;
483
+  margin-left: 10px;
484
+  display: flex;
485
+  flex-direction: column;
486
+  position: relative;
487
+}
488
+
489
+.rightTab {
490
+  height: 40px;
491
+  width: 100%;
492
+  border: 1px solid #d2d2d2;
493
+  box-sizing: border-box;
494
+
495
+  p {
496
+    width: 50%;
497
+    height: 40px;
498
+    line-height: 40px;
499
+    text-align: center;
500
+    background: #eee;
501
+    float: left;
502
+  }
503
+
504
+  > p:last-child {
505
+    border-left: 1px solid #d2d2d2;
506
+    float: right;
507
+  }
508
+
509
+  .activeP {
510
+    background: #409eff;
511
+    color: #fff;
512
+  }
513
+}
514
+.comfirmBox {
515
+  width: 100%;
516
+  height: 60px;
517
+  background: #fff;
518
+  position: absolute;
519
+  bottom: 0;
520
+  display: flex;
521
+  align-items: center;
522
+  justify-content: space-between;
523
+}
524
+
525
+.mainHeader {
526
+  width: 100%;
527
+  background: #fff;
528
+  position: fixed;
529
+  z-index: 100;
530
+  height: 36px;
531
+}
532
+
533
+.titleBox {
534
+  position: fixed;
535
+  z-index: 99;
536
+  background: #fff;
537
+}
538
+
539
+.fixedCell {
540
+  position: fixed;
541
+  z-index: 99;
542
+  right: 30px;
543
+  background: #fff;
544
+  width: 300px;
545
+  display: flex;
546
+  justify-content: space-between;
547
+}
548
+</style>
549
+
550
+<style lang="scss">
551
+.centerLeft {
552
+  .el-form-item__label {
553
+    text-align: left;
554
+  }
555
+}
556
+.tabsBox {
557
+  .el-tabs__item {
558
+    padding: 0 10px;
559
+  }
560
+
561
+  .el-tabs--bottom
562
+    .el-tabs--left
563
+    > .el-tabs__header
564
+    .el-tabs__item:nth-child(2),
565
+  .el-tabs--bottom
566
+    .el-tabs--right
567
+    > .el-tabs__header
568
+    .el-tabs__item:nth-child(2),
569
+  .el-tabs--bottom.el-tabs--border-card
570
+    > .el-tabs__header
571
+    .el-tabs__item:nth-child(2),
572
+  .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2),
573
+  .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2),
574
+  .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2),
575
+  .el-tabs--top.el-tabs--border-card
576
+    > .el-tabs__header
577
+    .el-tabs__item:nth-child(2),
578
+  .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
579
+    padding: 0 10px;
580
+  }
581
+
582
+  .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
583
+  .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
584
+  .el-tabs--bottom.el-tabs--border-card
585
+    > .el-tabs__header
586
+    .el-tabs__item:last-child,
587
+  .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child,
588
+  .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
589
+  .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
590
+  .el-tabs--top.el-tabs--border-card
591
+    > .el-tabs__header
592
+    .el-tabs__item:last-child,
593
+  .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
594
+    padding: 0 10px;
595
+  }
596
+
597
+  .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
598
+    padding: 0 10px;
599
+  }
600
+}
601
+.centerRight {
602
+  .el-tabs__nav-scroll {
603
+    display: flex;
604
+  }
605
+
606
+  .el-tabs__nav {
607
+    margin: 0 auto;
608
+  }
609
+
610
+  .el-table th .cell,
611
+  .el-table td .cell {
612
+    padding: 0 2px;
613
+  }
614
+}
615
+.preTabs {
616
+  .el-tabs__content {
617
+  }
618
+}
619
+.rightTabs {
620
+  height: 100%;
621
+
622
+  .el-tabs__content {
623
+  }
624
+}
625
+.centerDialog {
626
+  .el-dialog__body {
627
+    max-height: calc(100vh - 100px) !important;
628
+    padding: 0 20px;
629
+  }
630
+}
631
+</style>

+ 66 - 63
src/xt_pages/stock/drugs/components/drugOutDetail.vue Целия файл

@@ -22,7 +22,7 @@
22 22
       type="primary"
23 23
       >汇总导出
24 24
     </el-button>
25
-   
25
+
26 26
     <div class="cell clearfix">
27 27
        <label class="title"><span class="name">仓库</span> :</label>
28 28
       <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
@@ -32,7 +32,7 @@
32 32
             :label="option.storehouse_name"
33 33
             :value="option.id">
34 34
           </el-option>
35
-      </el-select>  
35
+      </el-select>
36 36
       <el-input
37 37
         size="small"
38 38
         style="width: 200px;"
@@ -76,10 +76,10 @@
76 76
           value-format="yyyy-MM-dd"
77 77
           @change="endTimeChange"
78 78
         ></el-date-picker>
79
-     
79
+
80 80
     </div>
81 81
 
82
-  
82
+
83 83
     <el-row :gutter="12" style="margin-top: 10px">
84 84
       <el-table
85 85
         :data="tableData"
@@ -122,7 +122,7 @@
122 122
           </template>
123 123
         </el-table-column>
124 124
 
125
-       
125
+
126 126
         <el-table-column label="操作时间" align="center">
127 127
           <template slot-scope="scope">
128 128
            <span>{{getTime(scope.row.ctime)}}</span>
@@ -140,7 +140,7 @@
140 140
         </el-table-column>
141 141
         <el-table-column label="出货价" align="center">
142 142
           <template slot-scope="scope">
143
-           <span v-if="org_id == 9919">{{scope.row.last_price}} </span> 
143
+           <span v-if="org_id == 9919">{{scope.row.last_price}} </span>
144 144
            <span v-else>
145 145
              <span v-if="scope.row.price >0"> {{scope.row.price}}</span>
146 146
             <span v-if="scope.row.price  == 0"> {{getPrice(scope.row.drug_id)}}</span>
@@ -149,20 +149,20 @@
149 149
         </el-table-column>
150 150
         <el-table-column label="数量" align="center">
151 151
           <template slot-scope="scope">
152
-            {{scope.row.count}} 
152
+            {{scope.row.count}}
153 153
           </template>
154 154
         </el-table-column>
155 155
          <el-table-column label="单位" align="center">
156 156
           <template slot-scope="scope">
157
-            {{scope.row.count_unit}} 
157
+            {{scope.row.count_unit}}
158 158
           </template>
159 159
         </el-table-column>
160 160
         <el-table-column label="总价" align="center">
161 161
           <template slot-scope="scope">
162 162
             <span v-if="scope.row.is_total !=1">
163
-              <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
164
-              <span v-if="org_id == 10210 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
165
-              <span v-if="org_id == 9671 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span> 
163
+              <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span>
164
+              <span v-if="org_id == 10210 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span>
165
+              <span v-if="org_id == 9671 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span>
166 166
               <span v-if ="org_id!=9919 && org_id!=10210 && org_id!=9671">
167 167
                  {{scope.row.total_price}}
168 168
                </span>
@@ -200,7 +200,7 @@ export default {
200 200
 
201 201
   created() {
202 202
     this.org_id = this.$store.getters.xt_user.org.id
203
-   
203
+
204 204
     var nowDate = new Date();
205 205
     var nowYear = nowDate.getFullYear();
206 206
     var nowMonth = nowDate.getMonth() + 1;
@@ -224,19 +224,19 @@ export default {
224 224
     var start_time = window.sessionStorage.getItem('start_out_time')
225 225
      var end_time =  window.sessionStorage.getItem('end_out_time')
226 226
     if(start_time!=null){
227
-       this.start_time = start_time   
227
+       this.start_time = start_time
228 228
     }
229 229
     if(end_time!=null){
230
-     
230
+
231 231
       this.end_time = end_time
232 232
     }
233
-    
233
+
234 234
     this.getDrugOutOrderPrint()
235 235
     this.GetConfigInfo();
236 236
     this.fetchAllAdminUsers();
237 237
     this.getlist()
238 238
     this.getBaseDrugLibList()
239
- 
239
+
240 240
   },
241 241
   data() {
242 242
     return {
@@ -327,7 +327,7 @@ export default {
327 327
     },
328 328
     fetchAllAdminUsers() {
329 329
       fetchAllAdminUsers().then(response => {
330
-       
330
+
331 331
         if (response.data.state == 1) {
332 332
           this.adminUserOptions = response.data.data.users;
333 333
         }
@@ -384,7 +384,7 @@ export default {
384 384
         }
385 385
       });
386 386
     },
387
-   
387
+
388 388
     getTime: function(val) {
389 389
       if (val == 0) {
390 390
         return "";
@@ -407,7 +407,7 @@ export default {
407 407
          page:this.page,
408 408
          limit:this.limit,
409 409
          storehouse_id:this.storehouse_id,
410
-      }  
410
+      }
411 411
       getDrugOutDetail(params).then(response=>{
412 412
         this.tableData = []
413 413
         this.tableList = []
@@ -443,29 +443,29 @@ export default {
443 443
                  }
444 444
 
445 445
                 total_price += order[i].total_price
446
-                
446
+
447 447
                }
448 448
 
449 449
                if(order[i].price ==0 ){
450 450
                  if(order[i].count_unit == order[i].min_unit && order[i].max_unit!=order[i].min_unit){
451 451
                     order[i].total_price = order[i].count * this.getPrice(order[i].drug_id)
452
-                  
452
+
453 453
                     order[i].price = this.getPrice(order[i].drug_id)
454 454
                  }
455
-                
455
+
456 456
                 if(order[i].count_unit == order[i].max_unit){
457 457
                    if(order[i].is_sys == 0){
458
-                     order[i].total_price += order[i].count * this.getPrice(order[i].drug_id) 
458
+                     order[i].total_price += order[i].count * this.getPrice(order[i].drug_id)
459 459
                    }else{
460 460
                      order[i].total_price += order[i].count * this.getPrice(order[i].drug_id) * order[i].min_number
461 461
                    }
462 462
                    order[i].price = this.getPrice(order[i].drug_id)
463 463
                 }
464 464
                 total_price +=order[i].total_price
465
-               } 
466
-               
465
+               }
466
+
467 467
              }
468
-            
468
+
469 469
           }
470 470
            console.log("toal_p3232332332233232",total_price)
471 471
            order.push({
@@ -475,11 +475,11 @@ export default {
475 475
             ctime:"",
476 476
             total_price:total_price,
477 477
           });
478
-         
478
+
479 479
           for(let i=0;i<order.length;i++){
480 480
             order[i].total_price = order[i].total_price.toFixed(2)
481 481
           }
482
-       
482
+
483 483
           console.log("233223322323322332232323",order)
484 484
           this.tableData = order
485 485
 
@@ -523,10 +523,10 @@ export default {
523 523
                 }
524 524
               }
525 525
              }
526
-            
526
+
527 527
           })
528 528
           let list = Object.values(objInfo);
529
-          
529
+
530 530
           for(let i=0;i<order.length;i++){
531 531
             list.map(item=>{
532 532
               if(order[i].drug_id == item.drug_id){
@@ -534,8 +534,8 @@ export default {
534 534
               }
535 535
             })
536 536
           }
537
-          
538
-         
537
+
538
+
539 539
           for(let i=0;i<list.length;i++){
540 540
             for(let j=0;j<list[i].child.length;j++){
541 541
               if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
@@ -547,16 +547,16 @@ export default {
547 547
            for(let i=0;i<list.length;i++){
548 548
               list[i].total_price = list[i].count * list[i].price
549 549
             }
550
-          
551
-          this.tableList = list 
550
+
551
+          this.tableList = list
552 552
           var total = response.data.data.total
553 553
           this.total = total
554
-        } 
555
-      }) 
554
+        }
555
+      })
556 556
     },
557 557
 
558 558
    select(){
559
-       
559
+
560 560
    },
561 561
 
562 562
     getAdminUser(id){
@@ -570,13 +570,13 @@ export default {
570 570
     },
571 571
 
572 572
      exportList(){
573
-    
573
+
574 574
         for(let i=0;i<this.tablePrint.length;i++){
575 575
           this.tablePrint[i].index = i+1
576 576
         }
577 577
         for(let i=0;i<this.tablePrint.length;i++){
578 578
            if(this.org_id == 9919){
579
-           
579
+
580 580
              this.tablePrint[i].count = this.getCountSix(this.tablePrint[i].drug_id,this.tablePrint[i].child)
581 581
              this.tablePrint[i].total_price = this.getCountSenven(this.tablePrint.drug_id,this.tablePrint[i].child,this.tablePrint[i].price)
582 582
              this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
@@ -585,11 +585,11 @@ export default {
585 585
               this.tablePrint[i].count = this.getCount(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_unit,this.tablePrint[i].min_number)
586 586
               this.tablePrint[i].total_price = this.getTotalPrice(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price)
587 587
               this.tablePrint[i].unit = this.tablePrint[i].dose + this.tablePrint[i].dose_unit + "*" + this.tablePrint[i].min_number +this.tablePrint[i].min_unit +"/"+this.tablePrint[i].max_unit
588
-              this.tablePrint[i].total = this.getTotalPriceOne(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price) 
588
+              this.tablePrint[i].total = this.getTotalPriceOne(this.tablePrint[i].child,this.tablePrint[i].max_unit,this.tablePrint[i].min_number,this.tablePrint[i].min_price)
589 589
            }
590 590
         }
591
-  
592
-       
591
+
592
+
593 593
        import('@/vendor/Export2Excel').then(excel => {
594 594
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
595 595
        const filterVal = ['index','drug_name', 'unit', 'min_unit','count','min_price','total_price','remark']
@@ -600,8 +600,8 @@ export default {
600 600
        obj.total_price = obj.total_price.toFixed(2)
601 601
        this.tablePrint.push(obj)
602 602
        const data = this.formatJson(filterVal, this.tablePrint)
603
-  
604
-       
603
+
604
+
605 605
        excel.export_json_to_excel({
606 606
            header: tHeader,
607 607
            data,
@@ -610,7 +610,7 @@ export default {
610 610
           this.downloadLoading = false
611 611
         })
612 612
        },
613
-      
613
+
614 614
      formatJson(filterVal, jsonData) {
615 615
         return jsonData.map(v => filterVal.map(j => v[j]));
616 616
      },
@@ -641,28 +641,31 @@ export default {
641 641
               }else{
642 642
                 this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
643 643
               }
644
-              
644
+
645 645
             }else{
646 646
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
647 647
               if(this.tableData[i].count_unit == this.tableData[i].min_unit && this.tableData[i].max_unit!=this.tableData[i].min_unit){
648 648
                  this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
649 649
               }
650
-              if(this.tableData[i].count_unit == this.tableData[i].max_unit){
650
+              if(this.tableData[i].count_unit == this.tableData[i].max_unit && this.tableData[i].max_unit !=this.tableData[i].min_unit){
651
+                this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)*this.tableData[i].min_number
652
+              }
653
+              if(this.tableData[i].count_unit == this.tableData[i].max_unit && this.tableData[i].max_unit ==this.tableData[i].min_unit){
651 654
                 this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)*this.tableData[i].min_number
652 655
               }
653 656
             }
654 657
          }
655 658
        }
656 659
        const data = this.formatJson(filterVal, this.tableData)
657
-  
658
-     
660
+
661
+
659 662
        excel.export_json_to_excel({
660 663
            header: tHeader,
661 664
            data,
662 665
            filename: '药品出库明细'
663 666
          })
664 667
           this.downloadLoading = false
665
-      }) 
668
+      })
666 669
     },
667 670
 
668 671
     getBaseDrugLibList() {
@@ -685,7 +688,7 @@ export default {
685 688
             for (let i = 0; i < response.data.data.list.length; i++) {
686 689
               this.drugList.push(response.data.data.list[i])
687 690
             }
688
- 
691
+
689 692
           }
690 693
         })
691 694
       },
@@ -694,7 +697,7 @@ export default {
694 697
          start_time:this.start_time,
695 698
          end_time:this.end_time,
696 699
          order_type:2,
697
-      }  
700
+      }
698 701
      getDrugOutOrderPrint(params).then(response=>{
699 702
         if(response.data.state == 1){
700 703
             var list = response.data.data.list
@@ -744,7 +747,7 @@ export default {
744 747
               }
745 748
             })
746 749
             }
747
-           
750
+
748 751
             let newArr = Object.values(objInfo);
749 752
             for(let i=0;i<newArr.length;i++){
750 753
               for(let j=0;j<list.length;j++){
@@ -754,7 +757,7 @@ export default {
754 757
               }
755 758
             }
756 759
            this.tablePrint = newArr
757
-          
760
+
758 761
         }
759 762
      })
760 763
     },
@@ -793,11 +796,11 @@ export default {
793 796
           }else{
794 797
             arr[i].count = arr[i].count
795 798
           }
796
-        }  
799
+        }
797 800
         for(let j=0;j<arr.length;j++){
798 801
           total +=arr[j].count
799 802
         }
800
-        
803
+
801 804
         return (total*min_price).toFixed(2)
802 805
       },
803 806
 
@@ -809,30 +812,30 @@ export default {
809 812
           }else{
810 813
             arr[i].count = arr[i].count
811 814
           }
812
-        }  
815
+        }
813 816
         for(let j=0;j<arr.length;j++){
814 817
           total +=arr[j].count
815 818
         }
816
-     
819
+
817 820
         return total*min_price
818 821
       },
819 822
       getCountSix(drug_id,val){
820
-     
821
-        var count = 0 
823
+
824
+        var count = 0
822 825
         for(let i=0;i<val.length;i++){
823 826
           count+= val[i].count
824 827
         }
825 828
         return count
826 829
       },
827 830
       getCountSenven(drug_id,val,price){
828
-        var count = 0 
831
+        var count = 0
829 832
         for(let i=0;i<val.length;i++){
830 833
           count+= val[i].count
831 834
         }
832 835
         return (count*price).toFixed(2)
833 836
       },
834 837
       getCountSenvenOne(drug_id,val,price){
835
-        var count = 0 
838
+        var count = 0
836 839
         for(let i=0;i<val.length;i++){
837 840
           count+= val[i].count
838 841
         }
@@ -872,7 +875,7 @@ export default {
872 875
      changeHouseList(){
873 876
        this.houseList = []
874 877
        this.getlist()
875
-     } 
878
+     }
876 879
   }
877 880
 };
878 881
 </script>

+ 41 - 0
src/xt_pages/stock/drugs/drugStockInOrder.vue Целия файл

@@ -77,6 +77,23 @@
77 77
             @change="endTimeChange"
78 78
           ></el-date-picker>
79 79
         </div>
80
+        <div style="margin-left: 10px">
81
+          <span>审核状态:</span>
82
+          <el-select
83
+            v-model="check_id"
84
+            style="width: 140px; margin-right: 10px"
85
+            placeholder="请选择"
86
+            @change="changeTypeName"
87
+          >
88
+            <el-option
89
+              v-for="item in checkList"
90
+              :key="item.id"
91
+              :label="item.name"
92
+              :value="item.id"
93
+            >
94
+            </el-option>
95
+          </el-select>
96
+        </div>
80 97
       </div>
81 98
 
82 99
       <div class="cell clearfix">
@@ -469,6 +486,7 @@ export default {
469 486
         loading: false,
470 487
         warehouseInfoDate: [],
471 488
       },
489
+      check_id: 0,
472 490
 
473 491
       startTime: "",
474 492
       dialogVisible: false,
@@ -484,6 +502,29 @@ export default {
484 502
   },
485 503
 
486 504
   methods: {
505
+    changeTypeName() {
506
+      this.getlist();
507
+    },
508
+    getlist() {
509
+      var params = {
510
+        check_id: this.check_id,
511
+        start_time: this.start_time,
512
+        end_time: this.end_time,
513
+        keyword: this.keywords,
514
+        page: this.page,
515
+        limit: this.limit,
516
+      };
517
+      getAllSecondOrderList(params).then((response) => {
518
+        if (response.data.state == 1) {
519
+          var list = response.data.data.list;
520
+          this.tableList = list;
521
+          var total = response.data.data.total;
522
+          this.total = total;
523
+          this.houseList = response.data.data.houseList;
524
+          this.doctorList = response.data.data.doctorList;
525
+        }
526
+      });
527
+    },
487 528
     search: function () {
488 529
       const Params = {
489 530
         page: this.page,

+ 42 - 0
src/xt_pages/stock/drugs/drugStockOutOrder.vue Целия файл

@@ -76,6 +76,23 @@
76 76
             @change="endTimeChange"
77 77
           ></el-date-picker>
78 78
         </div>
79
+         <div style="margin-left: 10px">
80
+          <span>审核状态:</span>
81
+          <el-select
82
+            v-model="check_id"
83
+            style="width: 140px; margin-right: 10px"
84
+            placeholder="请选择"
85
+            @change="changeTypeName"
86
+          >
87
+            <el-option
88
+              v-for="item in checkList"
89
+              :key="item.id"
90
+              :label="item.name"
91
+              :value="item.id"
92
+            >
93
+            </el-option>
94
+          </el-select>
95
+        </div>
79 96
       </div>
80 97
 
81 98
       <div class="cell clearfix">
@@ -530,6 +547,7 @@ export default {
530 547
       ],
531 548
       page: 1,
532 549
       limit: 5,
550
+      check_id: 0,
533 551
       checked: false,
534 552
       total: 0,
535 553
       pageTotal: 0,
@@ -591,6 +609,30 @@ export default {
591 609
     };
592 610
   },
593 611
   methods: {
612
+      changeTypeName() {
613
+      this.getlist();
614
+    },
615
+    getlist() {
616
+      var params = {
617
+        check_id: this.check_id,
618
+        start_time: this.start_time,
619
+        end_time: this.end_time,
620
+        keyword: this.keywords,
621
+        page: this.page,
622
+        limit: this.limit,
623
+      };
624
+      getAllSecondOrderList(params).then((response) => {
625
+        if (response.data.state == 1) {
626
+          var list = response.data.data.list;
627
+          this.tableList = list;
628
+          var total = response.data.data.total;
629
+          this.total = total;
630
+          this.houseList = response.data.data.houseList;
631
+          this.doctorList = response.data.data.doctorList;
632
+        }
633
+      });
634
+    },
635
+
594 636
     search: function () {
595 637
       const Params = {
596 638
         page: this.page,

+ 42 - 0
src/xt_pages/stock/stockInOrder.vue Целия файл

@@ -71,6 +71,24 @@
71 71
             @change="endTimeChange"
72 72
           ></el-date-picker>
73 73
         </div>
74
+        <div style="margin-left: 10px">
75
+          <span>审核状态:</span>
76
+          <el-select
77
+            v-model="check_id"
78
+            style="width: 140px; margin-right: 10px"
79
+            placeholder="请选择"
80
+            @change="changeTypeName"
81
+          >
82
+            <el-option
83
+              v-for="item in checkList"
84
+              :key="item.id"
85
+              :label="item.name"
86
+              :value="item.id"
87
+            >
88
+            </el-option>
89
+          </el-select>
90
+        </div>
91
+ 
74 92
       </div>
75 93
 
76 94
 
@@ -811,11 +829,35 @@ export default {
811 829
       checkAllStatus:false,
812 830
       list:[],
813 831
       storehouse_id:0,
832
+      check_id: 0,
814 833
     };
815 834
 
816 835
 
817 836
   },
818 837
   methods: {
838
+          changeTypeName() {
839
+      this.getlist();
840
+    },
841
+    getlist() {
842
+      var params = {
843
+        check_id: this.check_id,
844
+        start_time: this.start_time,
845
+        end_time: this.end_time,
846
+        keyword: this.keywords,
847
+        page: this.page,
848
+        limit: this.limit,
849
+      };
850
+      getAllSecondOrderList(params).then((response) => {
851
+        if (response.data.state == 1) {
852
+          var list = response.data.data.list;
853
+          this.tableList = list;
854
+          var total = response.data.data.total;
855
+          this.total = total;
856
+          this.houseList = response.data.data.houseList;
857
+          this.doctorList = response.data.data.doctorList;
858
+        }
859
+      });
860
+    },
819 861
      changeCheck() {
820 862
       this.$refs.multipleTable.clearSelection();
821 863
       if (this.checkAllStatus) {

+ 2 - 1
src/xt_pages/stock/stockInOrderDetailPrint.vue Целия файл

@@ -48,7 +48,7 @@
48 48
                             <tbody>
49 49
                                 <tr v-for='(item,index) in it.child' :key="index">
50 50
                                     <td style="line-height:18px;"><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
51
-                                    <td style="line-height:18px;">{{ item.license_number }}</td>
51
+                                    <td style="line-height:18px;">{{item.register_number}} <span v-if="item.license_number !=''">/</span> {{item.license_number}}</td>
52 52
                                     <td style="line-height:18px;"><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
53 53
                                     <td style="line-height:18px;">{{ getManufacturer(item.good_id) }}</td>
54 54
                                     <td style="line-height:18px;">{{ getDeatl(item.dealer) }}</td>
@@ -215,6 +215,7 @@ export default {
215 215
                 }
216 216
               }
217 217
              }
218
+             
218 219
              this.warehousingInfo = warehousing
219 220
           
220 221
             }

Файловите разлики са ограничени, защото са твърде много
+ 1215 - 999
src/xt_pages/stock/stockOutOrder.vue


+ 468 - 470
src/xt_pages/stock/testOrderQuery.vue Целия файл

@@ -1,494 +1,492 @@
1
-<template>
2
-  <div class="main-contain">
3
-    <div class="position">
4
-      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
-    </div>
6
-    <div class="app-container">
7
-      <div
8
-        style="
9
-          justify-content: space-between;
10
-          margin: 0px 0 12px 0;
11
-          display: flex;
12
-          align-items: center;
13
-        "
14
-      >
15
-        <div>
16
-          <el-date-picker
17
-            size="small"
18
-            v-model="start_time"
19
-            prefix-icon="el-icon-date"
20
-            :editable="false"
21
-            style="width: 196px"
22
-            type="date"
23
-            placeholder="选择日期时间"
24
-            align="right"
25
-            format="yyyy-MM-dd"
26
-            value-format="yyyy-MM-dd"
27
-            @change="startTimeChange"
28
-          ></el-date-picker
29
-          >-
30
-          <el-date-picker
31
-            size="small"
32
-            v-model="end_time"
33
-            prefix-icon="el-icon-date"
34
-            :editable="false"
35
-            style="width: 196px"
36
-            type="date"
37
-            placeholder="选择日期时间"
38
-            align="right"
39
-            format="yyyy-MM-dd"
40
-            value-format="yyyy-MM-dd"
41
-            @change="endTimeChange"
42
-          ></el-date-picker>
43
-          <span>审核状态:</span>
44
-          <el-select
45
-            v-model="check_id"
46
-            style="width: 140px; margin-right: 10px"
47
-            placeholder="请选择"
48
-            @change="changeTypeName"
49
-          >
50
-            <el-option
51
-              v-for="item in checkList"
52
-              :key="item.id"
53
-              :label="item.name"
54
-              :value="item.id"
55
-            >
56
-            </el-option>
57
-          </el-select>
58
-          <el-input
59
-            size="small"
60
-            style="width: 200px; margin-left: 10px"
61
-            class="filter-item"
62
-            v-model.trim="keywords"
63
-            placeholder="单据编号,仓库名称"
64
-          />
65
-          <el-button
66
-            size="small"
67
-            class="filter-item"
68
-            type="primary"
69
-            icon="el-icon-search"
70
-            @click="search"
71
-            >搜索</el-button
72
-          >
73
-        </div>
74
-        <div>
75
-          <el-button size="small" type="primary" @click="toAdd">新增</el-button>
76
-        </div>
77
-      </div>
1
+// <template>
2
+//   <div class="main-contain">
3
+//     <div class="position">
4
+//       <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+//     </div>
6
+//     <div class="app-container">
7
+//       <div
8
+//         style="
9
+//           justify-content: space-between;
10
+//           margin: 0px 0 12px 0;
11
+//           display: flex;
12
+//           align-items: center;
13
+//         "
14
+//       >
15
+//         <div>
16
+//           <el-date-picker
17
+//             size="small"
18
+//             v-model="start_time"
19
+//             prefix-icon="el-icon-date"
20
+//             :editable="false"
21
+//             style="width: 196px"
22
+//             type="date"
23
+//             placeholder="选择日期时间"
24
+//             align="right"
25
+//             format="yyyy-MM-dd"
26
+//             value-format="yyyy-MM-dd"
27
+//             @change="startTimeChange"
28
+//           ></el-date-picker
29
+//           >-
30
+//           <el-date-picker
31
+//             size="small"
32
+//             v-model="end_time"
33
+//             prefix-icon="el-icon-date"
34
+//             :editable="false"
35
+//             style="width: 196px"
36
+//             type="date"
37
+//             placeholder="选择日期时间"
38
+//             align="right"
39
+//             format="yyyy-MM-dd"
40
+//             value-format="yyyy-MM-dd"
41
+//             @change="endTimeChange"
42
+//           ></el-date-picker>
43
+//           <span>审核状态:</span>
44
+//           <el-select
45
+//             v-model="check_id"
46
+//             style="width: 140px; margin-right: 10px"
47
+//             placeholder="请选择"
48
+//             @change="changeTypeName"
49
+//           >
50
+//             <el-option
51
+//               v-for="item in checkList"
52
+//               :key="item.id"
53
+//               :label="item.name"
54
+//               :value="item.id"
55
+//             >
56
+//             </el-option>
57
+//           </el-select>
58
+//           <el-input
59
+//             size="small"
60
+//             style="width: 200px; margin-left: 10px"
61
+//             class="filter-item"
62
+//             v-model.trim="keywords"
63
+//             placeholder="单据编号,仓库名称"
64
+//           />
65
+//           <el-button
66
+//             size="small"
67
+//             class="filter-item"
68
+//             type="primary"
69
+//             icon="el-icon-search"
70
+//             @click="search"
71
+//             >搜索</el-button
72
+//           >
73
+//         </div>
74
+//         <div>
75
+//           <el-button size="small" type="primary" @click="toAdd">新增</el-button>
76
+//         </div>
77
+//       </div>
78 78
 
79
-      <el-table
80
-        :row-style="{ color: '#303133' }"
81
-        :header-cell-style="{
82
-          backgroundColor: 'rgb(245, 247, 250)',
83
-          color: '#606266',
84
-        }"
85
-        :data="tableList"
86
-        :class="signAndWeighBoxPatients"
87
-        border
88
-      >
89
-        <el-table-column label="单据编号" align="center">
90
-          <template slot-scope="scope">
91
-            {{scope.row.second_order_number}}
92
-          </template>
93
-        </el-table-column>
94
-        <el-table-column label="单据日期" align="center">
95
-          <template slot-scope="scope">
96
-            {{getTime(scope.row.record_date)}}
97
-          </template>
98
-        </el-table-column>
79
+//       <el-table
80
+//         :row-style="{ color: '#303133' }"
81
+//         :header-cell-style="{
82
+//           backgroundColor: 'rgb(245, 247, 250)',
83
+//           color: '#606266',
84
+//         }"
85
+//         :data="tableList"
86
+//         :class="signAndWeighBoxPatients"
87
+//         border
88
+//       >
89
+//         <el-table-column label="单据编号" align="center">
90
+//           <template slot-scope="scope">
91
+//             {{scope.row.second_order_number}}
92
+//           </template>
93
+//         </el-table-column>
94
+//         <el-table-column label="单据日期" align="center">
95
+//           <template slot-scope="scope">
96
+//             {{getTime(scope.row.record_date)}}
97
+//           </template>
98
+//         </el-table-column>
99 99
        
100
-        <el-table-column label="调出仓库" align="center" width="150">
101
-          <template slot-scope="scope">
102
-            {{getHouseName(scope.row.storehouse_out_id)}}
103
-          </template>
104
-        </el-table-column>
105
-        <el-table-column label="调入仓库" align="center">
106
-          <template slot-scope="scope">
107
-            {{getHouseName(scope.row.storehouse_in_id)}}
108
-          </template>
109
-        </el-table-column>
100
+//         <el-table-column label="调出仓库" align="center" width="150">
101
+//           <template slot-scope="scope">
102
+//             {{getHouseName(scope.row.storehouse_out_id)}}
103
+//           </template>
104
+//         </el-table-column>
105
+//         <el-table-column label="调入仓库" align="center">
106
+//           <template slot-scope="scope">
107
+//             {{getHouseName(scope.row.storehouse_in_id)}}
108
+//           </template>
109
+//         </el-table-column>
110 110
 
111
-        <el-table-column label="制单人" align="center">
112
-          <template slot-scope="scope">
113
-            {{getDocName(scope.row.creater)}}
114
-          </template>
115
-        </el-table-column>
116
-        <el-table-column label="审核人" align="center">
117
-          <template slot-scope="scope">
118
-           {{getDocName(scope.row.checker)}}
119
-          </template>
120
-        </el-table-column>
111
+//         <el-table-column label="制单人" align="center">
112
+//           <template slot-scope="scope">
113
+//             {{getDocName(scope.row.creater)}}
114
+//           </template>
115
+//         </el-table-column>
116
+//         <el-table-column label="审核人" align="center">
117
+//           <template slot-scope="scope">
118
+//            {{getDocName(scope.row.checker)}}
119
+//           </template>
120
+//         </el-table-column>
121 121
 
122
-        <el-table-column label="审核时间" align="center">
123
-          <template slot-scope="scope">
124
-          {{getTime(scope.row.checker)}}
125
-          </template>
126
-        </el-table-column>
122
+//         <el-table-column label="审核时间" align="center">
123
+//           <template slot-scope="scope">
124
+//           {{getTime(scope.row.checker)}}
125
+//           </template>
126
+//         </el-table-column>
127 127
 
128 128
     
129
-        <el-table-column label="操作" align="center" width="300px">
130
-          <template slot-scope="scope">
131
-            <el-button
132
-              icon="el-icon-edit-outline"
133
-              size="small"
134
-              type="primary"
135
-              @click="toClick(scope.row.id)"
136
-              >编辑
137
-            </el-button>
138
-             <el-button
139
-              icon="el-icon-edit-outline"
140
-              size="small"
141
-              type="primary"
142
-              @click="toDetail(scope.row.id)"
143
-              >详情
144
-            </el-button>
145
-            <el-button
146
-              icon="el-icon-delete"
147
-              size="small"
148
-              type="danger"
149
-              @click="toDelete(scope.row, scope.$index)"
150
-              >删除
151
-            </el-button>
152
-          </template>
153
-        </el-table-column>
154
-      </el-table>
155
-      <el-pagination
156
-        @size-change="handleSizeChange"
157
-        @current-change="handleCurrentChange"
158
-        :page-sizes="[10, 50, 100, 200, 500, 1000]"
159
-        :page-size="10"
160
-        background
161
-        align="right"
162
-        style="margin-top: 20px"
163
-        layout="total, sizes, prev, pager, next, jumper"
164
-        :total="total"
165
-      >
166
-      </el-pagination>
167
-    </div>
168
-  </div>
169
-</template>
129
+//         <el-table-column label="操作" align="center" width="300px">
130
+//           <template slot-scope="scope">
131
+//             <el-button
132
+//               icon="el-icon-edit-outline"
133
+//               size="small"
134
+//               type="primary"
135
+//               @click="toClick(scope.row.id)"
136
+//               >编辑
137
+//             </el-button>
138
+//              <el-button
139
+//               icon="el-icon-edit-outline"
140
+//               size="small"
141
+//               type="primary"
142
+//               @click="toDetail(scope.row.id)"
143
+//               >详情
144
+//             </el-button>
145
+//             <el-button
146
+//               icon="el-icon-delete"
147
+//               size="small"
148
+//               type="danger"
149
+//               @click="toDelete(scope.row, scope.$index)"
150
+//               >删除
151
+//             </el-button>
152
+//           </template>
153
+//         </el-table-column>
154
+//       </el-table>
155
+//       <el-pagination
156
+//         @size-change="handleSizeChange"
157
+//         @current-change="handleCurrentChange"
158
+//         :page-sizes="[10, 50, 100, 200, 500, 1000]"
159
+//         :page-size="10"
160
+//         background
161
+//         align="right"
162
+//         style="margin-top: 20px"
163
+//         layout="total, sizes, prev, pager, next, jumper"
164
+//         :total="total"
165
+//       >
166
+//       </el-pagination>
167
+//     </div>
168
+//   </div>
169
+// </template>
170 170
 
171
-<script>
172
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
171
+// <script>
172
+// import BreadCrumb from "@/xt_pages/components/bread-crumb";
173 173
 
174
-import {
175
-  getAllSecondOrderList
176
-} from "@/api/seconde";
177
-import { uParseTime } from "@/utils/tools";
178
-export default {
179
-  name: "stockIn",
180
-  components: {},
181
-  components: {
182
-    BreadCrumb,
183
-  },
184
-  data() {
185
-    return {
186
-      isActive: false,
187
-      Color_txt: true,
188
-      crumbs: [
189
-        { path: false, name: "采购管理" },
190
-        { path: "/supply/query", name: "采购订单" },
191
-      ],
192
-      keywords: "",
193
-      total: 0,
194
-      multipleSelection: [],
195
-      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
196
-      start_time: "",
197
-      end_time: "",
198
-      page: 1,
199
-      limit: 10,
200
-      goodType: [],
201
-      goodInfo: [],
202
-      org_id: 0,
203
-      types: [],
204
-      tableList: [{}],
205
-      type_name: "",
206
-      checkList: [
207
-        { id: 0, name: "请选择" },
208
-        { id: 1, name: "已审核" },
209
-        { id: 2, name: "未审核" },
210
-      ],
211
-      supplyList: [],
212
-      check_id: 0,
213
-      doctorList: [],
214
-      houseList:[],
215
-    };
216
-  },
217
-  methods: {
218
-    toAdd() {
219
-      this.$router.push({ path: "/purchase/order/add" });
220
-    },
221
-    changeTypeName() {
222
-      this.getlist();
223
-    },
224
-    startTimeChange() {
225
-      this.getlist();
226
-    },
227
-    endTimeChange() {
228
-      this.getlist();
229
-    },
230
-    search() {
231
-      this.getlist();
232
-    },
233
-    handleSizeChange(val) {
234
-      this.limit = val;
235
-      this.getlist();
236
-    },
237
-    handleCurrentChange(val) {
238
-      this.page = val;
239
-      this.getlist();
240
-    },
241
-    getTimes(time) {
242
-      if (time === "") {
243
-        return "";
244
-      }
245
-      return uParseTime(time, "{y}-{m}-{d}");
246
-    },
247
-    getlist() {
248
-      var params = {
249
-        check_id: this.check_id,
250
-        start_time: this.start_time,
251
-        end_time: this.end_time,
252
-        keyword: this.keywords,
253
-        page: this.page,
254
-        limit: this.limit,
255
-      };
256
-      console.log("params2332232332", params);
257
-      getAllSecondOrderList(params).then((response) => {
258
-        if (response.data.state == 1) {
259
-          var list = response.data.data.list;
260
-          console.log("list2323322332323232232323",list)
261
-          this.tableList = list;
262
-          var total = response.data.data.total;
263
-          this.total = total;
264
-          this.houseList = response.data.data.houseList
265
-          this.doctorList = response.data.data.doctorList
266
-        }
267
-      });
268
-    },
269
-    getName(id) {
270
-      var name = "";
271
-      for (let i = 0; i < this.supplyList.length; i++) {
272
-        if (id == this.supplyList[i].id) {
273
-          name = this.supplyList[i].supplier_name;
274
-        }
275
-      }
276
-      return name;
277
-    },
278
-    getDocName(id) {
279
-      var user_name = "";
280
-      for (let i = 0; i < this.doctorList.length; i++) {
281
-        if (id == this.doctorList[i].admin_user_id) {
282
-          user_name = this.doctorList[i].user_name;
283
-        }
284
-      }
285
-      return user_name;
286
-    },
287
-    getAllBuyPrice(arr) {
288
-      var buy_price = 0;
289
-      if (arr != undefined && arr.length > 0) {
290
-        for (let i = 0; i < arr.length; i++) {
291
-          buy_price += arr[i].count * arr[i].price;
292
-        }
293
-      }
294
-      return buy_price.toFixed(2);
295
-    },
296
-    getAllCount(arr) {
297
-      var count = 0;
298
-      if (arr != undefined && arr.length > 0) {
299
-        for (let i = 0; i < arr.length; i++) {
300
-          count += parseInt(arr[i].count);
301
-        }
302
-      }
303
-      if (count == 0) {
304
-        return "";
305
-      }
306
-      if (count > 0) {
307
-        return count;
308
-      }
309
-    },
310
-    toClick(id) {
311
-      window.sessionStorage.setItem('purchase_start_time',this.start_time)
312
-      window.sessionStorage.setItem('purchase_end_time',this.end_time)
313
-      this.$router.push({ path: "/stock/in/test/edit?id=" + id });
314
-    },
315
-    toDetail(id){
316
-      this.$router.push({ path: "/stock/in/test/detail?id=" + id });
317
-    },
318
-    toDelete(val, index) {
319
-      if (val.is_check == 1) {
320
-        this.$message.error("已审核单据,不能删除!");
321
-        return false;
322
-      }
323
-      if (val.orderOut.length > 0) {
324
-        this.$message.error("已关联单据,不能删除!");
325
-        return false;
326
-      }
327
-      this.$confirm("确认删除吗?", "删除", {
328
-        confirmButtonText: "确 定",
329
-        cancelButtonText: "取 消",
330
-        type: "warning",
331
-      }) .then(() => {
332
-          deletePurchaseOrder(val.id).then((response) => {
333
-            if (response.data.state == 1) {
334
-              var msg = response.data.data.msg;
335
-              this.tableList.splice(index, 1);
336
-              this.getlist()
337
-              this.$message.success("删除成功");
338
-            } else {
339
-              this.$message.error("删除失败");
340
-            }
341
-          });
342
-        }).catch(() => {});
343
-    },
344
-    // 动态改变表格样式
345
-    Color_Change() {
346
-      this.Color_txt = true;
347
-      console.log(this.Color_txt, "op");
348
-    },
174
+// import {
175
+//   getAllSecondOrderList
176
+// } from "@/api/seconde";
177
+// import { uParseTime } from "@/utils/tools";
178
+// export default {
179
+//   name: "stockIn",
180
+//   components: {},
181
+//   components: {
182
+//     BreadCrumb,
183
+//   },
184
+//   data() {
185
+//     return {
186
+//       isActive: false,
187
+//       Color_txt: true,
188
+//       crumbs: [
189
+//         { path: false, name: "采购管理" },
190
+//         { path: "/supply/query", name: "采购订单" },
191
+//       ],
192
+//       keywords: "",
193
+//       total: 0,
194
+//       multipleSelection: [],
195
+//       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
196
+//       start_time: "",
197
+//       end_time: "",
198
+//       page: 1,
199
+//       limit: 10,
200
+//       goodType: [],
201
+//       goodInfo: [],
202
+//       org_id: 0,
203
+//       types: [],
204
+//       tableList: [{}],
205
+//       type_name: "",
206
+//       checkList: [
207
+//         { id: 0, name: "请选择" },
208
+//         { id: 1, name: "已审核" },
209
+//         { id: 2, name: "未审核" },
210
+//       ],
211
+//       supplyList: [],
212
+//       check_id: 0,
213
+//       doctorList: [],
214
+//       houseList:[],
215
+//     };
216
+//   },
217
+//   methods: {
218
+//     toAdd() {
219
+//       this.$router.push({ path: "/purchase/order/add" });
220
+//     },
221
+//     changeTypeName() {
222
+//       this.getlist();
223
+//     },
224
+//     startTimeChange() {
225
+//       this.getlist();
226
+//     },
227
+//     endTimeChange() {
228
+//       this.getlist();
229
+//     },
230
+//     search() {
231
+//       this.getlist();
232
+//     },
233
+//     handleSizeChange(val) {
234
+//       this.limit = val;
235
+//       this.getlist();
236
+//     },
237
+//     handleCurrentChange(val) {
238
+//       this.page = val;
239
+//       this.getlist();
240
+//     },
241
+//     getTimes(time) {
242
+//       if (time === "") {
243
+//         return "";
244
+//       }
245
+//       return uParseTime(time, "{y}-{m}-{d}");
246
+//     },
247
+//     getlist() {
248
+//       var params = {
249
+//         check_id: this.check_id,
250
+//         start_time: this.start_time,
251
+//         end_time: this.end_time,
252
+//         keyword: this.keywords,
253
+//         page: this.page,
254
+//         limit: this.limit,
255
+//       };
256
+//       getAllSecondOrderList(params).then((response) => {
257
+//         if (response.data.state == 1) {
258
+//           var list = response.data.data.list;
259
+//           this.tableList = list;
260
+//           var total = response.data.data.total;
261
+//           this.total = total;
262
+//           this.houseList = response.data.data.houseList
263
+//           this.doctorList = response.data.data.doctorList
264
+//         }
265
+//       });
266
+//     },
267
+//     getName(id) {
268
+//       var name = "";
269
+//       for (let i = 0; i < this.supplyList.length; i++) {
270
+//         if (id == this.supplyList[i].id) {
271
+//           name = this.supplyList[i].supplier_name;
272
+//         }
273
+//       }
274
+//       return name;
275
+//     },
276
+//     getDocName(id) {
277
+//       var user_name = "";
278
+//       for (let i = 0; i < this.doctorList.length; i++) {
279
+//         if (id == this.doctorList[i].admin_user_id) {
280
+//           user_name = this.doctorList[i].user_name;
281
+//         }
282
+//       }
283
+//       return user_name;
284
+//     },
285
+//     getAllBuyPrice(arr) {
286
+//       var buy_price = 0;
287
+//       if (arr != undefined && arr.length > 0) {
288
+//         for (let i = 0; i < arr.length; i++) {
289
+//           buy_price += arr[i].count * arr[i].price;
290
+//         }
291
+//       }
292
+//       return buy_price.toFixed(2);
293
+//     },
294
+//     getAllCount(arr) {
295
+//       var count = 0;
296
+//       if (arr != undefined && arr.length > 0) {
297
+//         for (let i = 0; i < arr.length; i++) {
298
+//           count += parseInt(arr[i].count);
299
+//         }
300
+//       }
301
+//       if (count == 0) {
302
+//         return "";
303
+//       }
304
+//       if (count > 0) {
305
+//         return count;
306
+//       }
307
+//     },
308
+//     toClick(id) {
309
+//       window.sessionStorage.setItem('purchase_start_time',this.start_time)
310
+//       window.sessionStorage.setItem('purchase_end_time',this.end_time)
311
+//       this.$router.push({ path: "/stock/in/test/edit?id=" + id });
312
+//     },
313
+//     toDetail(id){
314
+//       this.$router.push({ path: "/stock/in/test/detail?id=" + id });
315
+//     },
316
+//     toDelete(val, index) {
317
+//       if (val.is_check == 1) {
318
+//         this.$message.error("已审核单据,不能删除!");
319
+//         return false;
320
+//       }
321
+//       if (val.orderOut.length > 0) {
322
+//         this.$message.error("已关联单据,不能删除!");
323
+//         return false;
324
+//       }
325
+//       this.$confirm("确认删除吗?", "删除", {
326
+//         confirmButtonText: "确 定",
327
+//         cancelButtonText: "取 消",
328
+//         type: "warning",
329
+//       }) .then(() => {
330
+//           deletePurchaseOrder(val.id).then((response) => {
331
+//             if (response.data.state == 1) {
332
+//               var msg = response.data.data.msg;
333
+//               this.tableList.splice(index, 1);
334
+//               this.getlist()
335
+//               this.$message.success("删除成功");
336
+//             } else {
337
+//               this.$message.error("删除失败");
338
+//             }
339
+//           });
340
+//         }).catch(() => {});
341
+//     },
342
+//     // 动态改变表格样式
343
+//     Color_Change() {
344
+//       this.Color_txt = true;
345
+//       console.log(this.Color_txt, "op");
346
+//     },
349 347
 
350
-    Color_Changeleave() {
351
-      this.Color_txt = false;
352
-      console.log(this.Color_txt, "false");
353
-    },
354
-    getTime(time) {
355
-      if (time === '') {
356
-      return ''
357
-      }
358
-      return uParseTime(time, '{y}-{m}-{d}')
359
-     },
360
-    getHouseName(id){
361
-      var storehouse_name = ""
362
-      for(let i=0;i<this.houseList.length;i++){
363
-         if(id == this.houseList[i].id){
364
-           storehouse_name = this.houseList[i].storehouse_name
365
-         }
366
-      }
367
-      return storehouse_name
368
-    },
369
-   getDocName(id){
370
-      var user_name = ""
371
-      for(let i=0;i<this.doctorList.length;i++){
372
-        if(id == this.doctorList[i].admin_user_id){
373
-          user_name = this.doctorList[i].user_name
374
-        }
375
-      }
376
-      return user_name
377
-     },
378
-  },
379
-  created() {
348
+//     Color_Changeleave() {
349
+//       this.Color_txt = false;
350
+//       console.log(this.Color_txt, "false");
351
+//     },
352
+//     getTime(time) {
353
+//       if (time === '') {
354
+//       return ''
355
+//       }
356
+//       return uParseTime(time, '{y}-{m}-{d}')
357
+//      },
358
+//     getHouseName(id){
359
+//       var storehouse_name = ""
360
+//       for(let i=0;i<this.houseList.length;i++){
361
+//          if(id == this.houseList[i].id){
362
+//            storehouse_name = this.houseList[i].storehouse_name
363
+//          }
364
+//       }
365
+//       return storehouse_name
366
+//     },
367
+//    getDocName(id){
368
+//       var user_name = ""
369
+//       for(let i=0;i<this.doctorList.length;i++){
370
+//         if(id == this.doctorList[i].admin_user_id){
371
+//           user_name = this.doctorList[i].user_name
372
+//         }
373
+//       }
374
+//       return user_name
375
+//      },
376
+//   },
377
+//   created() {
380 378
  
381
-    var now = new Date(); //当前日期
382
-    var nowMonth = now.getMonth(); //当前月
383
-    var nowYear = now.getFullYear(); //当前年
384
-    //本月的开始时间
385
-    var monthStartDate = new Date(nowYear, nowMonth, 1);
386
-    this.start_time = this.getTimes(monthStartDate);
387
-    this.end_time = this.getTimes(new Date());
379
+//     var now = new Date(); //当前日期
380
+//     var nowMonth = now.getMonth(); //当前月
381
+//     var nowYear = now.getFullYear(); //当前年
382
+//     //本月的开始时间
383
+//     var monthStartDate = new Date(nowYear, nowMonth, 1);
384
+//     this.start_time = this.getTimes(monthStartDate);
385
+//     this.end_time = this.getTimes(new Date());
388 386
 
389
-    this.org_id = this.$store.getters.xt_user.org_id;
390
-    var start_time =  window.sessionStorage.getItem('purchase_start_time')
387
+//     this.org_id = this.$store.getters.xt_user.org_id;
388
+//     var start_time =  window.sessionStorage.getItem('purchase_start_time')
391 389
     
392
-    var end_time =  window.sessionStorage.getItem('purchase_end_time')
390
+//     var end_time =  window.sessionStorage.getItem('purchase_end_time')
393 391
    
394
-    if(start_time !=null){
395
-      this.start_time = ""
396
-      this.start_time = start_time
397
-    }
398
-    if(end_time!=null){
399
-      this.end_time = ""
400
-      this.end_time = end_time
401
-    }
402
-    window.sessionStorage.removeItem('purchase_start_time')
403
-    window.sessionStorage.removeItem('purchase_end_time')
392
+//     if(start_time !=null){
393
+//       this.start_time = ""
394
+//       this.start_time = start_time
395
+//     }
396
+//     if(end_time!=null){
397
+//       this.end_time = ""
398
+//       this.end_time = end_time
399
+//     }
400
+//     window.sessionStorage.removeItem('purchase_start_time')
401
+//     window.sessionStorage.removeItem('purchase_end_time')
404 402
    
405 403
 
406
-    this.getlist();
404
+//     this.getlist();
407 405
    
408
-  },
409
-};
410
-</script>
411
-<style lang="scss">
412
-.cluster-rs {
413
-  text-align: center;
414
-}
415
-.annotation-rs {
416
-  width: 100%;
417
-  height: 100%;
418
-  border: none;
419
-  td {
420
-    width: 155px;
421
-    padding: 5px;
422
-    border-right: none;
423
-    text-align: center;
424
-    vertical-align: middle;
425
-  }
426
-}
427
-tr:last-child {
428
-  td {
429
-    border-bottom: none;
430
-  }
431
-}
432
-</style>
406
+//   },
407
+// };
408
+// </script>
409
+// <style lang="scss" scoped>
410
+// .cluster-rs {
411
+//   text-align: center;
412
+// }
413
+// .annotation-rs {
414
+//   width: 100%;
415
+//   height: 100%;
416
+//   border: none;
417
+//   td {
418
+//     width: 155px;
419
+//     padding: 5px;
420
+//     border-right: none;
421
+//     text-align: center;
422
+//     vertical-align: middle;
423
+//   }
424
+// }
425
+// tr:last-child {
426
+//   td {
427
+//     border-bottom: none;
428
+//   }
429
+// }
430
+// </style>
433 431
 
434
-<style rel="stylesheet/css" lang="scss" scoped>
435
-.information {
436
-  border: 1px #dcdfe6 solid;
437
-  padding: 30px 20px 30px 20px;
432
+// <style rel="stylesheet/css" lang="scss" scoped>
433
+// .information {
434
+//   border: 1px #dcdfe6 solid;
435
+//   padding: 30px 20px 30px 20px;
438 436
 
439
-  .border {
440
-    border-bottom: 1px #dcdfe6 solid;
441
-    margin: 0px 0 20px 0;
442
-  }
443
-}
437
+//   .border {
438
+//     border-bottom: 1px #dcdfe6 solid;
439
+//     margin: 0px 0 20px 0;
440
+//   }
441
+// }
444 442
 
445
-.title {
446
-  background: #409eff;
447
-  height: 44px;
448
-  line-height: 44px;
449
-  padding: 0 0 0 10px;
450
-  color: #fff;
451
-  margin: 0 0 10px 0;
452
-}
443
+// .title {
444
+//   background: #409eff;
445
+//   height: 44px;
446
+//   line-height: 44px;
447
+//   padding: 0 0 0 10px;
448
+//   color: #fff;
449
+//   margin: 0 0 10px 0;
450
+// }
453 451
 
454
-.edit_separater {
455
-  border-top: 1px solid rgb(233, 233, 233);
456
-  margin-top: 15px;
457
-  margin-bottom: 15px;
458
-}
459
-/deep/ .el-table__body-wrapper::-webkit-scrollbar {
460
-  width: 10px;
461
-  height: 10px;
462
-}
463
-</style>
452
+// .edit_separater {
453
+//   border-top: 1px solid rgb(233, 233, 233);
454
+//   margin-top: 15px;
455
+//   margin-bottom: 15px;
456
+// }
457
+// /deep/ .el-table__body-wrapper::-webkit-scrollbar {
458
+//   width: 10px;
459
+//   height: 10px;
460
+// }
461
+// </style>
464 462
 
465
-<style>
466
-.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
467
-  font-size: 12px;
468
-}
463
+// <style scoped>
464
+// .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
465
+//   font-size: 12px;
466
+// }
469 467
 
470
-.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
471
-  background: #6fb5fa;
472
-}
468
+// .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
469
+//   background: #6fb5fa;
470
+// }
473 471
 
474
-.count {
475
-  color: #bd2c00;
476
-}
477
-.el-table td,
478
-.el-table th.is-leaf,
479
-.el-table--border,
480
-.el-table--group {
481
-  border-color: #d0d3da;
482
-}
483
-.el-table--border::after,
484
-.el-table--group::after,
485
-.el-table::before {
486
-  background-color: #d0d3da;
487
-}
472
+// .count {
473
+//   color: #bd2c00;
474
+// }
475
+// .el-table td,
476
+// .el-table th.is-leaf,
477
+// .el-table--border,
478
+// .el-table--group {
479
+//   border-color: #d0d3da;
480
+// }
481
+// .el-table--border::after,
482
+// .el-table--group::after,
483
+// .el-table::before {
484
+//   background-color: #d0d3da;
485
+// }
488 486
 
489
-.color {
490
-  background: none !important;
491
-  display: flex;
492
-  flex-direction: column;
493
-}
494
-</style>
487
+// .color {
488
+//   background: none !important;
489
+//   display: flex;
490
+//   flex-direction: column;
491
+// }
492
+// </style>