瀏覽代碼

8月15日

XMLWAN 2 年之前
父節點
當前提交
030b7b8166

+ 446 - 0
src/xt_pages/dialysis/details/consumable/dialysisDrug.vue 查看文件

@@ -0,0 +1,446 @@
1
+<template>
2
+  <div class="page_consumables">
3
+    <div class="cell clearfix">
4
+      <label class="title"> <span class="name">排班班次</span> : </label>
5
+      <div class="time">
6
+        <ul class>
7
+          <li
8
+            :class="item.value == schedulType ? 'active' : ''"
9
+            @click="selectSchedulType(item.value)"
10
+            v-for="item in schedulArr"
11
+            :key="item.value"
12
+          >
13
+            {{ item.label }}
14
+          </li>
15
+        </ul>
16
+      </div>
17
+
18
+      <label class="title"><span class="name">日期查询</span> : </label>
19
+      <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
20
+                      :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
21
+                      format="yyyy-MM-dd"
22
+                      value-format="yyyy-MM-dd"
23
+                      placeholder="选择日期时间" align="right"></el-date-picker>
24
+      <el-input size="small" style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
25
+                class="filter-item" v-model="query.keywords"/>
26
+      <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
27
+    </div>
28
+    <div class="cell clearfix" style="justify-content: space-between;">
29
+      <div style="display:flex;">
30
+        <label class="title"> <span class="name">分区</span> : </label>
31
+        <div class="time">
32
+          <ul class>
33
+            <li
34
+              :class="item.id == partitionType ? 'active' : ''"
35
+              @click="selectPartitionType(item.id)"
36
+              v-for="item in partitionArr"
37
+              :key="item.id"
38
+            >
39
+              {{ item.name }}
40
+            </li>
41
+          </ul>
42
+        </div>
43
+      </div>
44
+      <div>
45
+        <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
46
+        <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47
+      </div>
48
+    </div>
49
+    <div class="cell clearfix" style="justify-content: space-between;">
50
+      <div style="display:flex;">
51
+        <label class="title"> <span class="name">出库状态</span> : </label>
52
+        <div class="time">
53
+          <ul class>
54
+            <li
55
+              :class="item.id == goodType ? 'active' : ''"
56
+              @click="selectGoodType(item.id)"
57
+              v-for="item in goodList"
58
+              :key="item.id"
59
+            >
60
+              {{ item.name }}
61
+            </li>
62
+          </ul>
63
+        </div>
64
+      </div>
65
+    </div>
66
+    <div>
67
+      <el-table
68
+        :data="list"
69
+        border
70
+        :row-style="{ color: '#303133' }"
71
+        :header-cell-style="{
72
+          backgroundColor: 'rgb(245, 247, 250)',
73
+          color: '#606266'
74
+        }"
75
+      >
76
+        <el-table-column
77
+          align="center"
78
+          type="selection"
79
+          width="55">
80
+        </el-table-column>
81
+        <el-table-column
82
+          align="center"
83
+          prop="name"
84
+          v-for="(item,index) in good_types"
85
+          :key="index"
86
+          :label="item"
87
+        >
88
+          <template slot-scope="scope">
89
+            <span>{{scope.row.good_type[index].name}}</span>
90
+          </template>
91
+
92
+        </el-table-column>
93
+
94
+      </el-table>
95
+    </div>
96
+
97
+    <el-pagination
98
+      @size-change="handleSizeChange"
99
+      @current-change="handleCurrentChange"
100
+      :page-sizes="[10, 50, 100]"
101
+      :page-size="10"
102
+      background
103
+      align="right"
104
+      style="margin-top:20px;"
105
+      layout="total, sizes, prev, pager, next, jumper"
106
+      :total="total"
107
+    >
108
+    </el-pagination>
109
+
110
+   
111
+  </div>
112
+</template>
113
+
114
+
115
+<script>
116
+  import { GetAllZone,GetDialysisgoods } from '@/api/dialysis'
117
+
118
+  import { uParseTime } from "@/utils/tools";
119
+
120
+  export default {
121
+    components: {
122
+      
123
+    },
124
+    data() {
125
+      return {
126
+        query:{
127
+          total:"",
128
+          schedule_date:"",
129
+          schedule_type:0,
130
+          partition_id:0,
131
+          page:1,
132
+          limit:10,
133
+          keywords:"",
134
+          good_type:0,
135
+        },
136
+        schedulType: 0,
137
+        schedulArr: [
138
+          { value: 0, label: '全部' },
139
+          { value: 1, label: '上午' },
140
+          { value: 2, label: '下午' },
141
+          { value: 3, label: '晚上' }
142
+        ],
143
+        selected_date: "",
144
+        partitionArr: [],
145
+        goodList:[
146
+          { id: 0, name: '全部' },
147
+          { id: 1, name: '已出库' },
148
+          { id: 2, name: '未出库' },
149
+        ],
150
+        partitionType: 0,
151
+        goodType:0,
152
+        tableData: [{
153
+          date: '2016-05-03',
154
+          name: '王小虎',
155
+          address: '上海市普陀区金沙江路 1518 弄'
156
+        }
157
+        ],
158
+        search_input: '',
159
+        searchAction: '',
160
+        allGoodInfo:[],
161
+        list:[],
162
+        new_list:[],
163
+
164
+        good_types: [],
165
+        arrKey:[],
166
+        arrList:[],
167
+        total:0,
168
+
169
+      }
170
+    },
171
+    created() {
172
+      this.getAllZone()
173
+      let date = uParseTime(new Date(), "{y}-{m}-{d}")
174
+      var newDate = new Date();
175
+      var y = newDate.getFullYear();
176
+      var m = newDate.getMonth() + 1;
177
+      var d = newDate.getDate();
178
+      var schedule_date =
179
+        y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
180
+
181
+      this.selected_date = date
182
+      this.query.schedule_date = schedule_date
183
+      this.query.schedule_type = 0
184
+      this.query.partition_id = 0
185
+      this.query.page = 1
186
+      this.GetDialysisgoods()
187
+    },
188
+    methods: {
189
+
190
+      handleSizeChange(val) {
191
+        this.query.limit = val;
192
+        this.GetDialysisgoods();
193
+      },
194
+      handleCurrentChange(val) {
195
+        this.query.page = val;
196
+        this.GetDialysisgoods();
197
+      },
198
+
199
+      calCount(query_warehouseout_info) {
200
+        let total = 0
201
+        var array = []
202
+        array = query_warehouseout_info
203
+        for (let i = 0; i < array.length; i++) {
204
+          total = total + array[i].count
205
+        }
206
+        return total
207
+
208
+      },
209
+      getGoodUserInfo(good_type_id,good_user,last_good_user) {
210
+        var arrlist =[]
211
+        if (good_user != null && good_user.length > 0) {
212
+          let desc = ""
213
+          for (let b = 0; b < good_user.length; b++){
214
+            if(good_type_id == good_user[b].good_type_id)
215
+              desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
216
+          }
217
+          arrlist.push(desc)
218
+          return desc
219
+        }
220
+        return ""
221
+
222
+        // else if (good_user != null && good_user.length <= 0) {
223
+        //   if (last_good_user != null && last_good_user.length > 0) {
224
+        //     let desc = ""
225
+        //     for (let b = 0; b < last_good_user.length; b++){
226
+        //       if(good_type_id == last_good_user[b].good_type_id)
227
+        //         desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
228
+        //     }
229
+        //     console.log(desc)
230
+        //
231
+        //     return desc
232
+        //
233
+        //   }
234
+        //   return ""
235
+        // }
236
+      },
237
+      GetDialysisgoods() {
238
+        GetDialysisgoods(this.query).then(response => {
239
+          if (response.data.state == 0) {
240
+            this.$message.error(response.data.msg)
241
+            return false
242
+          } else {
243
+
244
+            this.list = []
245
+            this.good_types = []
246
+            this.allGoodInfo = []
247
+
248
+            var res = response.data
249
+            this.total = res.data.total
250
+            this.good_types.push("姓名")
251
+            var arr = []
252
+            arr.push("name")
253
+            for (let a = 0; a <  res.data.good_type.length; a++){
254
+              Object.keys(res.data.good_type[a]).map(item => {
255
+                if(item == 'type_name'){
256
+                  arr.push('name')
257
+                }
258
+              })
259
+              this.good_types.push(res.data.good_type[a].type_name)
260
+            }
261
+
262
+            this.arrKey.push(...arr)
263
+
264
+            this.allGoodInfo = res.data.dialysis_goods
265
+
266
+            for(let i = 0; i < res.data.dialysis_goods.length; i++){
267
+              let arr =[]
268
+              let obj = {
269
+                id:0,
270
+                name:  res.data.dialysis_goods[i].patient.name,
271
+              }
272
+              arr.push(obj)
273
+
274
+              for (let a = 0; a <  res.data.good_type.length; a++){
275
+                let obj = {
276
+                  id:res.data.good_type[a].id,
277
+                  name:""
278
+
279
+                }
280
+                arr.push(obj)
281
+              }
282
+
283
+
284
+
285
+              let newObj = {
286
+                "good_type":arr,
287
+                "good_user":res.data.dialysis_goods[i].good_user,
288
+                "last_good_user":res.data.dialysis_goods[i].last_good_user,
289
+                "good_user_detail":res.data.dialysis_goods[i].good_user_detail,
290
+                "last_good_user_detail":res.data.dialysis_goods[i].last_good_user_detail,
291
+              }
292
+
293
+              this.list.push(newObj)
294
+            }
295
+
296
+
297
+           for (let a = 0; a <  this.list.length; a++){
298
+              for (let b = 0; b <  this.list[a].good_type.length; b++){
299
+
300
+                if(this.list[a].good_type[b].id > 0){
301
+                  this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
302
+                }
303
+
304
+              }
305
+            }
306
+
307
+          //  console.log("99999999",this.list)
308
+           let a = []
309
+          this.list.map(item => {
310
+            a.push(item.good_type)
311
+          })
312
+          // console.log('aaaaaaaaa',a)
313
+          let b = []
314
+
315
+          a.map(item => {
316
+            let obj = []
317
+            item.map((it,index) => {
318
+              let i = 0
319
+              let c = {}
320
+              let str = 'name' + index
321
+              c[str] = it.name
322
+              obj.push(c)
323
+
324
+            })
325
+
326
+            b.push(obj)
327
+          })
328
+          var temp = []
329
+          // console.log('bbbbbbbbbb',b)
330
+          for(let i=0;i<b.length;i++){
331
+            var objC = {...b[i]}
332
+            temp.push(objC)
333
+          }
334
+
335
+          // console.log("temp--------",temp)
336
+          var tempTwo = []
337
+          temp.map(item => {
338
+            let obj = []
339
+            Object.values(item).map(it => {
340
+              obj.push(it)
341
+            })
342
+            let obj2 = {}
343
+            obj.map((i,ind) => {
344
+
345
+              let str = 'name' + ind
346
+              obj2[str] = i[str]
347
+            })
348
+            tempTwo.push(obj2)
349
+            // console.log(325556574342354234234,tempTwo)
350
+          })
351
+
352
+          this.arrList.push(...tempTwo)
353
+          console.log("cccccccc",this.arrList)
354
+          }
355
+        })
356
+      },
357
+      selectSchedulType(scheduleType) {
358
+        this.schedulType = scheduleType
359
+        this.query.schedule_type = scheduleType
360
+        this.query.page = 1
361
+        this.GetDialysisgoods()
362
+
363
+      },
364
+      selectPartitionType(partitionType) {
365
+        this.partitionType = partitionType
366
+        this.query.partition_id = partitionType
367
+        this.query.page = 1
368
+
369
+        this.GetDialysisgoods()
370
+
371
+      },
372
+      selectGoodType(goodType){
373
+        this.goodType = goodType
374
+        this.query.good_type = goodType
375
+        this.GetDialysisgoods()
376
+      },
377
+      getAllZone: function() {
378
+        GetAllZone().then(response => {
379
+          if (response.data.state == 0) {
380
+            this.$message.error(response.data.msg)
381
+            return false
382
+          } else {
383
+            this.partitionArr = response.data.data.zone
384
+            this.partitionArr.unshift({ id: 0, name: '全部' })
385
+          }
386
+        })
387
+      },
388
+      statistics() {
389
+        this.$refs.consumables.show()
390
+      },
391
+      handleScheduleDateChange(val) {
392
+        this.query.schedule_date = val
393
+        this.query.page = 1
394
+        this.GetDialysisgoods()
395
+      },
396
+      search() {
397
+        this.query.page = 1
398
+        this.GetDialysisgoods()
399
+      },
400
+
401
+       exportList(){
402
+         import('@/vendor/Export2Excel').then(excel => {
403
+
404
+
405
+
406
+         var arrTwo = []
407
+         for(let i=0;i<this.arrKey.length;i++){
408
+            arrTwo.push('name'+i)
409
+         }
410
+         console.log("arrKey88888",arrTwo)
411
+
412
+        //  console.log("9999999",this.list)
413
+         const tHeader = this.good_types
414
+         const filterVal = arrTwo
415
+         console.log("thedad",tHeader)
416
+         console.log("filterval",filterVal)
417
+         console.log("33333",this.arrList)
418
+         const data = this.formatJson(filterVal,this.arrList)
419
+         console.log("data",data)
420
+
421
+         excel.export_json_to_excel({
422
+           header: tHeader,
423
+           data,
424
+           filename: '透析耗材查询'
425
+         })
426
+          this.downloadLoading = false
427
+        })
428
+       },
429
+      formatJson(filterVal, jsonData) {
430
+        return jsonData.map(v => filterVal.map(j => v[j]));
431
+      },
432
+
433
+    }
434
+  }
435
+</script>
436
+
437
+
438
+<style lang="scss" scoped>
439
+  .page_consumables {
440
+
441
+  .clearfix:after {
442
+    content: none;
443
+  }
444
+
445
+  }
446
+</style>

+ 712 - 0
src/xt_pages/dialysis/details/consumable/dialysisGood.vue 查看文件

@@ -0,0 +1,712 @@
1
+<template>
2
+  <div class="page_consumables">
3
+    <div class="cell clearfix">
4
+      <label class="title"> <span class="name">排班班次</span> : </label>
5
+      <div class="time">
6
+        <ul class>
7
+          <li
8
+            :class="item.value == schedulType ? 'active' : ''"
9
+            @click="selectSchedulType(item.value)"
10
+            v-for="item in schedulArr"
11
+            :key="item.value"
12
+          >
13
+            {{ item.label }}
14
+          </li>
15
+        </ul>
16
+      </div>
17
+
18
+      <label class="title"><span class="name">日期查询</span> : </label>
19
+      <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
20
+                      :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
21
+                      format="yyyy-MM-dd"
22
+                      value-format="yyyy-MM-dd"
23
+                      placeholder="选择日期时间" align="right"
24
+                      :picker-options="pickerOptions"></el-date-picker>
25
+      <el-input size="small" style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
26
+                class="filter-item" v-model="query.keywords"/>
27
+      <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
28
+    </div>
29
+    <div class="cell clearfix" style="justify-content: space-between;">
30
+      <div style="display:flex;">
31
+        <label class="title"> <span class="name">分区</span> : </label>
32
+        <div class="time">
33
+          <ul class>
34
+            <li
35
+              :class="item.id == partitionType ? 'active' : ''"
36
+              @click="selectPartitionType(item.id)"
37
+              v-for="item in partitionArr"
38
+              :key="item.id"
39
+            >
40
+              {{ item.name }}
41
+            </li>
42
+          </ul>
43
+        </div>
44
+      </div>
45
+      <div>
46
+        <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
47
+        <el-button size="small" type="primary" @click="statistics">统计表</el-button>
48
+      </div>
49
+    </div>
50
+    <!-- <div class="cell clearfix" style="justify-content: space-between;">
51
+      <div style="display:flex;">
52
+        <label class="title"> <span class="name">出库状态</span> : </label>
53
+        <div class="time">
54
+          <ul class>
55
+            <li
56
+              :class="item.id == goodType ? 'active' : ''"
57
+              @click="selectGoodType(item.id)"
58
+              v-for="item in goodList"
59
+              :key="item.id"
60
+            >
61
+              {{ item.name }}
62
+            </li>
63
+          </ul>
64
+        </div>
65
+      </div>
66
+    </div> -->
67
+    <div>
68
+      <el-table
69
+        :data="list"
70
+        border
71
+        :row-style="{ color: '#303133' }"
72
+        :header-cell-style="{
73
+          backgroundColor: 'rgb(245, 247, 250)',
74
+          color: '#606266'
75
+        }"
76
+      >
77
+        <el-table-column
78
+          align="center"
79
+          type="selection"
80
+          width="55">
81
+        </el-table-column>
82
+         <el-table-column  align="center" width="55" label="序号">
83
+           <template slot-scope="scope">
84
+             {{scope.$index + 1}}
85
+           </template>
86
+        </el-table-column>
87
+        <el-table-column  align="center"  width="55" label="透析机号">
88
+         <template slot-scope="scope">
89
+             {{scope.row.device_number.number}}
90
+           </template>
91
+        </el-table-column>
92
+        <el-table-column  align="center"  width="55" label="姓名">
93
+           <template slot-scope="scope">
94
+            {{scope.row.patient.name}}
95
+           </template>
96
+        </el-table-column>
97
+       
98
+        <el-table-column  align="center"  width="55" label="透析号">
99
+           <template slot-scope="scope">
100
+            {{scope.row.patient.dialysis_no}}
101
+           </template>
102
+        </el-table-column>
103
+        
104
+        <el-table-column
105
+          align="center"
106
+          prop="name"
107
+          v-for="(item,index) in rowList"
108
+          :key="item.id"
109
+          :label="item.filed_name_cn"
110
+        >
111
+          <template slot-scope="scope">
112
+             <!-- <span>{{scope.row.good_type[index].name}}</span> -->
113
+             {{getName(scope.row.rowList[index].filed_name_cn,scope.row.dialysis_solution)}}
114
+          </template>
115
+
116
+        </el-table-column>
117
+
118
+      </el-table>
119
+    </div>
120
+
121
+    <el-pagination
122
+      @size-change="handleSizeChange"
123
+      @current-change="handleCurrentChange"
124
+      :page-sizes="[10, 50, 100]"
125
+      :page-size="10"
126
+      background
127
+      align="right"
128
+      style="margin-top:20px;"
129
+      layout="total, sizes, prev, pager, next, jumper"
130
+      :total="total"
131
+    >
132
+    </el-pagination>
133
+
134
+   
135
+  </div>
136
+</template>
137
+
138
+
139
+<script>
140
+  import { GetAllZone,getPatientDialysisSolutionGroupList } from '@/api/dialysis'
141
+
142
+  import { uParseTime } from "@/utils/tools";
143
+  import { getDataConfig } from '@/utils/data'
144
+  export default {
145
+    components: {
146
+      
147
+    },
148
+    data() {
149
+      return {
150
+        query:{
151
+          total:"",
152
+          schedule_date:"",
153
+          schedule_type:0,
154
+          partition_id:0,
155
+          page:1,
156
+          limit:10,
157
+          keywords:"",
158
+          good_type:0,
159
+        },
160
+        schedulType: 0,
161
+        schedulArr: [
162
+          { value: 0, label: '全部' },
163
+          { value: 1, label: '上午' },
164
+          { value: 2, label: '下午' },
165
+          { value: 3, label: '晚上' }
166
+        ],
167
+        selected_date: "",
168
+        partitionArr: [],
169
+        goodList:[
170
+          { id: 0, name: '全部' },
171
+          { id: 1, name: '已出库' },
172
+          { id: 2, name: '未出库' },
173
+        ],
174
+        partitionType: 0,
175
+        goodType:0,
176
+        tableData: [{
177
+          date: '2016-05-03',
178
+          name: '王小虎',
179
+          address: '上海市普陀区金沙江路 1518 弄'
180
+        }
181
+        ],
182
+        search_input: '',
183
+        searchAction: '',
184
+        allGoodInfo:[],
185
+        list:[],
186
+        new_list:[],
187
+
188
+        good_types: [],
189
+        arrKey:[],
190
+        arrList:[],
191
+        total:0,
192
+        pickerOptions:{ //禁用当前日期之前的日期
193
+           disabledDate(v) {
194
+            //Date.now()是javascript中的内置函数,它返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。
195
+            return v.getTime() < new Date().getTime() - 86400000;
196
+          },
197
+        },
198
+        rowList:[],
199
+        dialysate_formulation:[],
200
+        body_fluid_option:[],
201
+        displace_liqui_part_option:[],
202
+        blood_access_option:[],
203
+        hemodialysisPipelinesOptions:[]
204
+      }
205
+    },
206
+    created() {
207
+      this.dialysate_formulation =  getDataConfig(  
208
+          'hemodialysis',
209
+          'dialysate_formulation'
210
+      )
211
+      this.body_fluid_option = this.$store.getters.body_fluid
212
+      this.displace_liqui_part_option = this.$store.getters.displace_liqui
213
+      this.blood_access_option = this.$store.getters.blood_access
214
+      this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
215
+      this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
216
+      var filedList = this.$store.getters.xt_user.fileds
217
+      for (let i = 0; i < filedList.length; i++) {
218
+        if ( filedList[i].module == 1 && filedList[i].is_show == 1) {
219
+          this.rowList.push(filedList[i])
220
+        }
221
+      }
222
+      console.log("行33333333333333",this.rowList)
223
+      this.getAllZone()
224
+      let date = uParseTime(new Date(), "{y}-{m}-{d}")
225
+      var newDate = new Date();
226
+      var y = newDate.getFullYear();
227
+      var m = newDate.getMonth() + 1;
228
+      var d = newDate.getDate();
229
+      var schedule_date =
230
+        y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
231
+
232
+      this.selected_date = date
233
+      this.query.schedule_date = schedule_date
234
+      this.query.schedule_type = 0
235
+      this.query.partition_id = 0
236
+      this.query.page = 1
237
+      this.getlist()
238
+    },
239
+    methods: {
240
+      getlist(){
241
+        getPatientDialysisSolutionGroupList(this.query).then(response=>{
242
+           if(response.data.state == 1){
243
+             var list = response.data.data.list
244
+             console.log("list23322323ow",list)
245
+             console.log("rowlist22222wode",this.rowList)
246
+             if(list!=null){
247
+               for(let i=0;i<list.length;i++){
248
+                 list[i].rowList = []
249
+                 list[i].rowList = this.rowList
250
+               }
251
+             }
252
+             console.log("h哈哈哈哈哈哈哈",list)
253
+             this.list = list
254
+             var total = response.data.data.total
255
+             this.total = total
256
+           }
257
+        })
258
+      },
259
+      handleSizeChange(val) {
260
+        this.query.limit = val;
261
+        this.GetDialysisgoods();
262
+      },
263
+      handleCurrentChange(val) {
264
+        this.query.page = val;
265
+        this.GetDialysisgoods();
266
+      },
267
+
268
+      calCount(query_warehouseout_info) {
269
+        let total = 0
270
+        var array = []
271
+        array = query_warehouseout_info
272
+        for (let i = 0; i < array.length; i++) {
273
+          total = total + array[i].count
274
+        }
275
+        return total
276
+
277
+      },
278
+      getGoodUserInfo(good_type_id,good_user,last_good_user) {
279
+        var arrlist =[]
280
+        if (good_user != null && good_user.length > 0) {
281
+          let desc = ""
282
+          for (let b = 0; b < good_user.length; b++){
283
+            if(good_type_id == good_user[b].good_type_id)
284
+              desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
285
+          }
286
+          arrlist.push(desc)
287
+          return desc
288
+        }
289
+        return ""
290
+      },
291
+
292
+      selectSchedulType(scheduleType) {
293
+        this.schedulType = scheduleType
294
+        this.query.schedule_type = scheduleType
295
+        this.query.page = 1
296
+        
297
+
298
+      },
299
+      selectPartitionType(partitionType) {
300
+        this.partitionType = partitionType
301
+        this.query.partition_id = partitionType
302
+        this.query.page = 1
303
+
304
+       
305
+
306
+      },
307
+      selectGoodType(goodType){
308
+        this.goodType = goodType
309
+        this.query.good_type = goodType
310
+       
311
+      },
312
+      getAllZone: function() {
313
+        GetAllZone().then(response => {
314
+          if (response.data.state == 0) {
315
+            this.$message.error(response.data.msg)
316
+            return false
317
+          } else {
318
+            this.partitionArr = response.data.data.zone
319
+            this.partitionArr.unshift({ id: 0, name: '全部' })
320
+          }
321
+        })
322
+      },
323
+      statistics() {
324
+        this.$refs.consumables.show()
325
+      },
326
+      handleScheduleDateChange(val) {
327
+        this.query.schedule_date = val
328
+        this.query.page = 1
329
+       
330
+      },
331
+      search() {
332
+        this.query.page = 1
333
+       
334
+      },
335
+
336
+      exportList(){
337
+         import('@/vendor/Export2Excel').then(excel => {
338
+
339
+
340
+
341
+         var arrTwo = []
342
+         for(let i=0;i<this.arrKey.length;i++){
343
+            arrTwo.push('name'+i)
344
+         }
345
+         console.log("arrKey88888",arrTwo)
346
+
347
+         const tHeader = this.good_types
348
+         const filterVal = arrTwo
349
+         console.log("thedad",tHeader)
350
+         console.log("filterval",filterVal)
351
+         console.log("33333",this.arrList)
352
+         const data = this.formatJson(filterVal,this.arrList)
353
+         console.log("data",data)
354
+
355
+         excel.export_json_to_excel({
356
+           header: tHeader,
357
+           data,
358
+           filename: '透析耗材查询'
359
+         })
360
+          this.downloadLoading = false
361
+        })
362
+       },
363
+      formatJson(filterVal, jsonData) {
364
+        return jsonData.map(v => filterVal.map(j => v[j]));
365
+      },
366
+      getName(filed_name_cn,val){
367
+        if(filed_name_cn == "透析模式"){
368
+          return this.getModeName(val.mode_id)
369
+        }
370
+        if(filed_name_cn == "血流量"){
371
+          if(val.blood_flow_volume > 0){
372
+           return val.blood_flow_volume
373
+          }else{
374
+           return ""
375
+          }
376
+          
377
+        }
378
+        if(filed_name_cn == "目标超滤量"){
379
+          return ""
380
+        }
381
+        if(filed_name_cn == "透析液配方"){
382
+          return this.getDialysateFormulation(val.dialysate_formulation)
383
+        }
384
+        if(filed_name_cn == "抗凝剂"){
385
+          return this.getAnticoagulant(val.anticoagulant)
386
+        }
387
+        if(filed_name_cn == "首剂"){
388
+          return val.anticoagulant_shouji
389
+        }
390
+        if(filed_name_cn == "维持"){
391
+          return val.anticoagulant_weichi
392
+        }
393
+        if(filed_name_cn == "总量"){
394
+          return val.anticoagulant_zongliang
395
+        }
396
+        if(filed_name_cn == "置换量"){
397
+           return val.replacement_total
398
+        }
399
+        if(filed_name_cn == "钾"){
400
+          return val.kalium
401
+        }
402
+        if(filed_name_cn == "钠"){
403
+           return val.sodium
404
+        }
405
+        if(filed_name_cn == "钙"){
406
+           return val.calcium
407
+        }
408
+        if(filed_name_cn == "碳酸氢盐"){
409
+           return val.bicarbonate
410
+        }
411
+        if(filed_name_cn == "透析液流量"){
412
+            return val.dialysate_flow
413
+        }
414
+        if(filed_name_cn == "透析液温度"){
415
+           return val.dialysate_temperature
416
+        }
417
+        if(filed_name_cn == "电导度"){
418
+           return val.conductivity
419
+        }
420
+        if(filed_name_cn == "透析器/灌流器"){
421
+           return val.dialyzer_perfusion_apparatus
422
+        }
423
+        if(filed_name_cn == "钙名称"){
424
+          return val.anticoagulant_gaimingcheng
425
+        }
426
+       if(filed_name_cn == "钙剂量"){
427
+           return val.anticoagulant_gaijiliang
428
+        }
429
+       if(filed_name_cn == "体液过多症状"){
430
+          return this.getBodyFluid(val.body_fluid)
431
+        }
432
+        if(filed_name_cn == "透析前使用特殊药物"){
433
+          return val.special_medicine
434
+        }
435
+       if(filed_name_cn == "透析前使用其他特殊药物"){
436
+         return val.special_medicine_other
437
+        }
438
+        if(filed_name_cn == "置换液"){
439
+          return this.getDisplace(val.displace_liqui_part) 
440
+        }
441
+        if(filed_name_cn == "血管通路"){
442
+          return this.getBloodAccess(val.blood_access)
443
+        }
444
+        if(filed_name_cn == "体液过多其他症状"){
445
+          return val.body_fluid_other
446
+        }  
447
+        if(filed_name_cn == "透析时长"){
448
+          return   val.dialysis_duration_hour + "小时" + val.dialysis_duration_minute + "分钟"
449
+        }
450
+        if(filed_name_cn == "置换液总量"){
451
+         return val.displace_liqui_value
452
+        }
453
+        if(filed_name_cn == "透析器"){
454
+          return val.dialysis_dialyszers
455
+        }
456
+        if(filed_name_cn == "注射器"){
457
+           return ""
458
+        }
459
+        if(filed_name_cn == "抗凝提前停止"){
460
+          return ""
461
+        }
462
+        if(filed_name_cn == "肝素钠"){
463
+           return ""
464
+        }
465
+        if(filed_name_cn == "鱼精蛋白"){
466
+           return ""
467
+        }
468
+        if(filed_name_cn == "下机前推住鱼精蛋白"){
469
+            return ""
470
+        }
471
+        if(filed_name_cn == "无肝素钠备注"){
472
+           return ""
473
+        }
474
+        if(filed_name_cn == "灌流器"){
475
+          return val.dialysis_irrigation
476
+        }
477
+        if(filed_name_cn == "抗凝剂商品名称"){
478
+          return ""
479
+        }
480
+        if(filed_name_cn == "置换速度"){
481
+          return  ""
482
+        }
483
+        if(filed_name_cn == "病情"){
484
+          return ""
485
+        }
486
+        if(filed_name_cn == "葡萄糖"){
487
+           return val.glucose
488
+        }
489
+        if(filed_name_cn == "单超时长"){
490
+           return  ""
491
+        }
492
+        if(filed_name_cn == "单超脱水"){
493
+           return ""
494
+        }
495
+        if(filed_name_cn == "置换流量"){
496
+          return  ""
497
+        }
498
+        if(filed_name_cn == "血浆分离器"){
499
+           return val.plasma_separator
500
+        }
501
+       if(filed_name_cn == "透析管路"){
502
+          return this.getHemodialysisPipelines(val.hemodialysis_pipelines)
503
+        }
504
+       if(filed_name_cn == "透析管路支数"){
505
+          return ""
506
+        }
507
+       if(filed_name_cn == "穿刺针"){
508
+          return val.puncture_needle
509
+        }
510
+       if(filed_name_cn == "穿刺针支数"){
511
+          return val.puncture_needle_count
512
+        }
513
+       if(filed_name_cn == "促红素"){
514
+          return val.epo_count
515
+        }
516
+        if(filed_name_cn == "促红素支数"){
517
+          return val.epo_count
518
+        }
519
+        if(filed_name_cn == "最大超滤率"){
520
+          return val.max_ultrafiltration_rate
521
+        }
522
+      },
523
+      getModeName(id){
524
+        var name = ""
525
+        if(id == 1){
526
+          name = "HD"
527
+        }
528
+        if(id == 2){
529
+          name = "HDF"
530
+        }
531
+        if(id == 3){
532
+          name = "HD+HP"
533
+        }
534
+        if(id == 4){
535
+          name = "HP"
536
+        }
537
+        if(id == 5){
538
+          name = "HF"
539
+        }
540
+        if(id == 6){
541
+          name = "SCUF"
542
+        }
543
+        if(id == 7){
544
+          name = "IUF"
545
+        }
546
+        if(id == 8){
547
+          name = "HFHD"
548
+        }
549
+        if(id == 9){
550
+          name = "HFHD+HP"
551
+        }
552
+        if(id == 10){
553
+          name = "PHF"
554
+        }
555
+        if(id == 11){
556
+          name = "HFR"
557
+        }
558
+        if(id == 12){
559
+          name = "HDF+HP"
560
+        }
561
+        if(id == 13){
562
+          name = "CRRT"
563
+        }
564
+        if(id == 14){
565
+          name = "腹水回输"
566
+        }
567
+        if(id == 19){
568
+          name = "IUF+HD"
569
+        }
570
+        if(id == 20){
571
+          name = "UF"
572
+        }
573
+        if(id == 21){
574
+          name = "HD+"
575
+        }
576
+        if(id == 22){
577
+          name = "血浆胆红素吸附+HDF"
578
+        }
579
+        if(id == 23){
580
+          name = "血浆胆红素吸附"
581
+        }
582
+        if(id == 24){
583
+          name = "I-HDF"
584
+        }
585
+        if(id == 25){
586
+          name = "HD高通"
587
+        }
588
+        if(id == 26){
589
+          name = "CVVH"
590
+        }
591
+         if(id == 27){
592
+          name = "CVVHD"
593
+        }
594
+         if(id == 28){
595
+          name = "CVVHDF"
596
+        }
597
+         if(id == 29){
598
+          name = "PE"
599
+        }
600
+         if(id == 30){
601
+          name = "血浆胆红素吸附+HP"
602
+        }
603
+         if(id == 31){
604
+          name = "HPD"
605
+        }
606
+         if(id == 32){
607
+          name = "HDP"
608
+        }
609
+        return name
610
+      },
611
+      getDialysateFormulation(id){
612
+      var name = ""
613
+      for(let i=0;i<this.dialysate_formulation.length;i++){
614
+        if(id == this.dialysate_formulation[i].id){
615
+          name = this.dialysate_formulation[i].name
616
+        }
617
+      }
618
+      return name
619
+    },
620
+    getAnticoagulant(id){
621
+      var name = ""
622
+      if(id == 1){
623
+         name = "无肝素"
624
+      }
625
+      if(id == 2){
626
+        name = "普通肝素"
627
+      }
628
+      if(id == 3){
629
+        name = "低分子肝素"
630
+      }
631
+      if(id == 4){
632
+        name = "阿加曲班"
633
+      }
634
+      if(id == 5){
635
+         name ="枸橼酸钠"
636
+      }
637
+      if(id == 6){
638
+        name = "低分子肝素钙"
639
+      }
640
+      if(id == 7){
641
+        name = "低分子肝素钠"
642
+      }
643
+      if(id ==8){
644
+        name = "依诺肝素"
645
+      }
646
+      if(id ==9){
647
+        name = "达肝素"
648
+      }
649
+      if(id ==10){
650
+        name = "体外抗凝"
651
+      }
652
+      if(id ==11){
653
+        name = "那曲肝素"
654
+      }
655
+      if(id ==12){
656
+        name = "无抗凝剂"
657
+      }
658
+     if(id ==13){
659
+        name = "那曲肝素钙"
660
+      }
661
+      return name
662
+    },
663
+    getBodyFluid(id){
664
+     var name = ""
665
+     for(let i=0;i<this.body_fluid_option.length;i++){
666
+       if(id == this.body_fluid_option[i].id){
667
+          name = this.body_fluid_option[i].name
668
+       }
669
+     }
670
+     return name
671
+    },
672
+    getDisplace(id){
673
+      var name = ""
674
+      for(let i=0;i<this.displace_liqui_part_option.length;i++){
675
+        if(id == this.displace_liqui_part_option[i].id){
676
+           name = this.displace_liqui_part_option[i].name
677
+        } 
678
+      }
679
+      return name
680
+    },
681
+    getBloodAccess(id){
682
+      var name = ""
683
+      for(let i=0;i<this.blood_access_option.length;i++){
684
+        if(id == this.blood_access_option[i].id){
685
+           name = this.blood_access_option[i].name
686
+        }
687
+      }
688
+      return name
689
+    },
690
+     getHemodialysisPipelines(id){
691
+      var name = ""
692
+      for(let i=0;i<this.hemodialysisPipelinesOptions.length;i++){
693
+        if(id == this.hemodialysisPipelinesOptions[i].id){
694
+            name = this.hemodialysisPipelinesOptions[i].name
695
+        }
696
+      }
697
+      return name
698
+    }
699
+    }
700
+  }
701
+</script>
702
+
703
+
704
+<style lang="scss" scoped>
705
+  .page_consumables {
706
+
707
+  .clearfix:after {
708
+    content: none;
709
+  }
710
+
711
+  }
712
+</style>

+ 446 - 0
src/xt_pages/dialysis/details/consumable/dialysisParameter.vue 查看文件

@@ -0,0 +1,446 @@
1
+<template>
2
+  <div class="page_consumables">
3
+    <div class="cell clearfix">
4
+      <label class="title"> <span class="name">排班班次</span> : </label>
5
+      <div class="time">
6
+        <ul class>
7
+          <li
8
+            :class="item.value == schedulType ? 'active' : ''"
9
+            @click="selectSchedulType(item.value)"
10
+            v-for="item in schedulArr"
11
+            :key="item.value"
12
+          >
13
+            {{ item.label }}
14
+          </li>
15
+        </ul>
16
+      </div>
17
+
18
+      <label class="title"><span class="name">日期查询</span> : </label>
19
+      <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
20
+                      :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
21
+                      format="yyyy-MM-dd"
22
+                      value-format="yyyy-MM-dd"
23
+                      placeholder="选择日期时间" align="right"></el-date-picker>
24
+      <el-input size="small" style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
25
+                class="filter-item" v-model="query.keywords"/>
26
+      <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
27
+    </div>
28
+    <div class="cell clearfix" style="justify-content: space-between;">
29
+      <div style="display:flex;">
30
+        <label class="title"> <span class="name">分区</span> : </label>
31
+        <div class="time">
32
+          <ul class>
33
+            <li
34
+              :class="item.id == partitionType ? 'active' : ''"
35
+              @click="selectPartitionType(item.id)"
36
+              v-for="item in partitionArr"
37
+              :key="item.id"
38
+            >
39
+              {{ item.name }}
40
+            </li>
41
+          </ul>
42
+        </div>
43
+      </div>
44
+      <div>
45
+        <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button>
46
+        <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47
+      </div>
48
+    </div>
49
+    <div class="cell clearfix" style="justify-content: space-between;">
50
+      <div style="display:flex;">
51
+        <label class="title"> <span class="name">出库状态</span> : </label>
52
+        <div class="time">
53
+          <ul class>
54
+            <li
55
+              :class="item.id == goodType ? 'active' : ''"
56
+              @click="selectGoodType(item.id)"
57
+              v-for="item in goodList"
58
+              :key="item.id"
59
+            >
60
+              {{ item.name }}
61
+            </li>
62
+          </ul>
63
+        </div>
64
+      </div>
65
+    </div>
66
+    <div>
67
+      <el-table
68
+        :data="list"
69
+        border
70
+        :row-style="{ color: '#303133' }"
71
+        :header-cell-style="{
72
+          backgroundColor: 'rgb(245, 247, 250)',
73
+          color: '#606266'
74
+        }"
75
+      >
76
+        <el-table-column
77
+          align="center"
78
+          type="selection"
79
+          width="55">
80
+        </el-table-column>
81
+        <el-table-column
82
+          align="center"
83
+          prop="name"
84
+          v-for="(item,index) in good_types"
85
+          :key="index"
86
+          :label="item"
87
+        >
88
+          <template slot-scope="scope">
89
+            <span>{{scope.row.good_type[index].name}}</span>
90
+          </template>
91
+
92
+        </el-table-column>
93
+
94
+      </el-table>
95
+    </div>
96
+
97
+    <el-pagination
98
+      @size-change="handleSizeChange"
99
+      @current-change="handleCurrentChange"
100
+      :page-sizes="[10, 50, 100]"
101
+      :page-size="10"
102
+      background
103
+      align="right"
104
+      style="margin-top:20px;"
105
+      layout="total, sizes, prev, pager, next, jumper"
106
+      :total="total"
107
+    >
108
+    </el-pagination>
109
+
110
+   
111
+  </div>
112
+</template>
113
+
114
+
115
+<script>
116
+  import { GetAllZone,GetDialysisgoods } from '@/api/dialysis'
117
+
118
+  import { uParseTime } from "@/utils/tools";
119
+
120
+  export default {
121
+    components: {
122
+      
123
+    },
124
+    data() {
125
+      return {
126
+        query:{
127
+          total:"",
128
+          schedule_date:"",
129
+          schedule_type:0,
130
+          partition_id:0,
131
+          page:1,
132
+          limit:10,
133
+          keywords:"",
134
+          good_type:0,
135
+        },
136
+        schedulType: 0,
137
+        schedulArr: [
138
+          { value: 0, label: '全部' },
139
+          { value: 1, label: '上午' },
140
+          { value: 2, label: '下午' },
141
+          { value: 3, label: '晚上' }
142
+        ],
143
+        selected_date: "",
144
+        partitionArr: [],
145
+        goodList:[
146
+          { id: 0, name: '全部' },
147
+          { id: 1, name: '已出库' },
148
+          { id: 2, name: '未出库' },
149
+        ],
150
+        partitionType: 0,
151
+        goodType:0,
152
+        tableData: [{
153
+          date: '2016-05-03',
154
+          name: '王小虎',
155
+          address: '上海市普陀区金沙江路 1518 弄'
156
+        }
157
+        ],
158
+        search_input: '',
159
+        searchAction: '',
160
+        allGoodInfo:[],
161
+        list:[],
162
+        new_list:[],
163
+
164
+        good_types: [],
165
+        arrKey:[],
166
+        arrList:[],
167
+        total:0,
168
+
169
+      }
170
+    },
171
+    created() {
172
+      this.getAllZone()
173
+      let date = uParseTime(new Date(), "{y}-{m}-{d}")
174
+      var newDate = new Date();
175
+      var y = newDate.getFullYear();
176
+      var m = newDate.getMonth() + 1;
177
+      var d = newDate.getDate();
178
+      var schedule_date =
179
+        y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
180
+
181
+      this.selected_date = date
182
+      this.query.schedule_date = schedule_date
183
+      this.query.schedule_type = 0
184
+      this.query.partition_id = 0
185
+      this.query.page = 1
186
+      this.GetDialysisgoods()
187
+    },
188
+    methods: {
189
+
190
+      handleSizeChange(val) {
191
+        this.query.limit = val;
192
+        this.GetDialysisgoods();
193
+      },
194
+      handleCurrentChange(val) {
195
+        this.query.page = val;
196
+        this.GetDialysisgoods();
197
+      },
198
+
199
+      calCount(query_warehouseout_info) {
200
+        let total = 0
201
+        var array = []
202
+        array = query_warehouseout_info
203
+        for (let i = 0; i < array.length; i++) {
204
+          total = total + array[i].count
205
+        }
206
+        return total
207
+
208
+      },
209
+      getGoodUserInfo(good_type_id,good_user,last_good_user) {
210
+        var arrlist =[]
211
+        if (good_user != null && good_user.length > 0) {
212
+          let desc = ""
213
+          for (let b = 0; b < good_user.length; b++){
214
+            if(good_type_id == good_user[b].good_type_id)
215
+              desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
216
+          }
217
+          arrlist.push(desc)
218
+          return desc
219
+        }
220
+        return ""
221
+
222
+        // else if (good_user != null && good_user.length <= 0) {
223
+        //   if (last_good_user != null && last_good_user.length > 0) {
224
+        //     let desc = ""
225
+        //     for (let b = 0; b < last_good_user.length; b++){
226
+        //       if(good_type_id == last_good_user[b].good_type_id)
227
+        //         desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
228
+        //     }
229
+        //     console.log(desc)
230
+        //
231
+        //     return desc
232
+        //
233
+        //   }
234
+        //   return ""
235
+        // }
236
+      },
237
+      GetDialysisgoods() {
238
+        GetDialysisgoods(this.query).then(response => {
239
+          if (response.data.state == 0) {
240
+            this.$message.error(response.data.msg)
241
+            return false
242
+          } else {
243
+
244
+            this.list = []
245
+            this.good_types = []
246
+            this.allGoodInfo = []
247
+
248
+            var res = response.data
249
+            this.total = res.data.total
250
+            this.good_types.push("姓名")
251
+            var arr = []
252
+            arr.push("name")
253
+            for (let a = 0; a <  res.data.good_type.length; a++){
254
+              Object.keys(res.data.good_type[a]).map(item => {
255
+                if(item == 'type_name'){
256
+                  arr.push('name')
257
+                }
258
+              })
259
+              this.good_types.push(res.data.good_type[a].type_name)
260
+            }
261
+
262
+            this.arrKey.push(...arr)
263
+
264
+            this.allGoodInfo = res.data.dialysis_goods
265
+
266
+            for(let i = 0; i < res.data.dialysis_goods.length; i++){
267
+              let arr =[]
268
+              let obj = {
269
+                id:0,
270
+                name:  res.data.dialysis_goods[i].patient.name,
271
+              }
272
+              arr.push(obj)
273
+
274
+              for (let a = 0; a <  res.data.good_type.length; a++){
275
+                let obj = {
276
+                  id:res.data.good_type[a].id,
277
+                  name:""
278
+
279
+                }
280
+                arr.push(obj)
281
+              }
282
+
283
+
284
+
285
+              let newObj = {
286
+                "good_type":arr,
287
+                "good_user":res.data.dialysis_goods[i].good_user,
288
+                "last_good_user":res.data.dialysis_goods[i].last_good_user,
289
+                "good_user_detail":res.data.dialysis_goods[i].good_user_detail,
290
+                "last_good_user_detail":res.data.dialysis_goods[i].last_good_user_detail,
291
+              }
292
+
293
+              this.list.push(newObj)
294
+            }
295
+
296
+
297
+           for (let a = 0; a <  this.list.length; a++){
298
+              for (let b = 0; b <  this.list[a].good_type.length; b++){
299
+
300
+                if(this.list[a].good_type[b].id > 0){
301
+                  this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
302
+                }
303
+
304
+              }
305
+            }
306
+
307
+          //  console.log("99999999",this.list)
308
+           let a = []
309
+          this.list.map(item => {
310
+            a.push(item.good_type)
311
+          })
312
+          // console.log('aaaaaaaaa',a)
313
+          let b = []
314
+
315
+          a.map(item => {
316
+            let obj = []
317
+            item.map((it,index) => {
318
+              let i = 0
319
+              let c = {}
320
+              let str = 'name' + index
321
+              c[str] = it.name
322
+              obj.push(c)
323
+
324
+            })
325
+
326
+            b.push(obj)
327
+          })
328
+          var temp = []
329
+          // console.log('bbbbbbbbbb',b)
330
+          for(let i=0;i<b.length;i++){
331
+            var objC = {...b[i]}
332
+            temp.push(objC)
333
+          }
334
+
335
+          // console.log("temp--------",temp)
336
+          var tempTwo = []
337
+          temp.map(item => {
338
+            let obj = []
339
+            Object.values(item).map(it => {
340
+              obj.push(it)
341
+            })
342
+            let obj2 = {}
343
+            obj.map((i,ind) => {
344
+
345
+              let str = 'name' + ind
346
+              obj2[str] = i[str]
347
+            })
348
+            tempTwo.push(obj2)
349
+            // console.log(325556574342354234234,tempTwo)
350
+          })
351
+
352
+          this.arrList.push(...tempTwo)
353
+          console.log("cccccccc",this.arrList)
354
+          }
355
+        })
356
+      },
357
+      selectSchedulType(scheduleType) {
358
+        this.schedulType = scheduleType
359
+        this.query.schedule_type = scheduleType
360
+        this.query.page = 1
361
+        this.GetDialysisgoods()
362
+
363
+      },
364
+      selectPartitionType(partitionType) {
365
+        this.partitionType = partitionType
366
+        this.query.partition_id = partitionType
367
+        this.query.page = 1
368
+
369
+        this.GetDialysisgoods()
370
+
371
+      },
372
+      selectGoodType(goodType){
373
+        this.goodType = goodType
374
+        this.query.good_type = goodType
375
+        this.GetDialysisgoods()
376
+      },
377
+      getAllZone: function() {
378
+        GetAllZone().then(response => {
379
+          if (response.data.state == 0) {
380
+            this.$message.error(response.data.msg)
381
+            return false
382
+          } else {
383
+            this.partitionArr = response.data.data.zone
384
+            this.partitionArr.unshift({ id: 0, name: '全部' })
385
+          }
386
+        })
387
+      },
388
+      statistics() {
389
+        this.$refs.consumables.show()
390
+      },
391
+      handleScheduleDateChange(val) {
392
+        this.query.schedule_date = val
393
+        this.query.page = 1
394
+        this.GetDialysisgoods()
395
+      },
396
+      search() {
397
+        this.query.page = 1
398
+        this.GetDialysisgoods()
399
+      },
400
+
401
+       exportList(){
402
+         import('@/vendor/Export2Excel').then(excel => {
403
+
404
+
405
+
406
+         var arrTwo = []
407
+         for(let i=0;i<this.arrKey.length;i++){
408
+            arrTwo.push('name'+i)
409
+         }
410
+         console.log("arrKey88888",arrTwo)
411
+
412
+        //  console.log("9999999",this.list)
413
+         const tHeader = this.good_types
414
+         const filterVal = arrTwo
415
+         console.log("thedad",tHeader)
416
+         console.log("filterval",filterVal)
417
+         console.log("33333",this.arrList)
418
+         const data = this.formatJson(filterVal,this.arrList)
419
+         console.log("data",data)
420
+
421
+         excel.export_json_to_excel({
422
+           header: tHeader,
423
+           data,
424
+           filename: '透析耗材查询'
425
+         })
426
+          this.downloadLoading = false
427
+        })
428
+       },
429
+      formatJson(filterVal, jsonData) {
430
+        return jsonData.map(v => filterVal.map(j => v[j]));
431
+      },
432
+
433
+    }
434
+  }
435
+</script>
436
+
437
+
438
+<style lang="scss" scoped>
439
+  .page_consumables {
440
+
441
+  .clearfix:after {
442
+    content: none;
443
+  }
444
+
445
+  }
446
+</style>

+ 140 - 0
src/xt_pages/dialysis/details/consumable/index.vue 查看文件

@@ -0,0 +1,140 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+     
6
+    </div>
7
+     <div class="app-container ">
8
+        <el-tabs v-model="activeName" @tab-click="handleClick">
9
+            <el-tab-pane label="透析耗材" name="first">
10
+              <DialysisGood></DialysisGood>
11
+            </el-tab-pane>
12
+            <el-tab-pane label="药品" name="second">
13
+               <DialysisDrug ref="mychild"></DialysisDrug>
14
+           </el-tab-pane>
15
+            <el-tab-pane label="透析参数" name="third">
16
+               <DialysisParameter ref="mychildOne"></DialysisParameter>
17
+            </el-tab-pane>
18
+        
19
+        </el-tabs>
20
+     </div>
21
+  </div>
22
+</template>
23
+
24
+<script>
25
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
26
+import DialysisGood from "@/xt_pages/dialysis/details/consumable/dialysisGood"
27
+import DialysisDrug from "@/xt_pages/dialysis/details/consumable/dialysisDrug"
28
+import DialysisParameter from "@/xt_pages/dialysis/details/consumable/dialysisParameter"
29
+
30
+export default {
31
+  name: "stockNewQuery",
32
+  
33
+  components: {
34
+    BreadCrumb,
35
+    DialysisGood,
36
+    DialysisDrug,
37
+    DialysisParameter,
38
+  },
39
+  data() {
40
+    return {
41
+      crumbs: [
42
+        { path: false, name: "透前准备" },
43
+        { path: "/stock/query", name: "透前准备" }
44
+      ],
45
+      multipleSelection: [],
46
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
47
+      activeName: 'first'
48
+    };
49
+  },
50
+  methods:{
51
+    handleClick(val){
52
+      if(val.name == "second"){
53
+       this.$refs.mychild.open()
54
+      }   
55
+      if(val.name == "third"){
56
+       this.$refs.mychildOne.open()
57
+      }
58
+      if(val.name == "fourth"){
59
+        this.$refs.mychildtwo.open()
60
+      }
61
+    }
62
+  }
63
+};
64
+</script>
65
+
66
+<style rel="stylesheet/css" lang="scss" scoped>
67
+.information {
68
+  border: 1px #dcdfe6 solid;
69
+  padding: 30px 20px 30px 20px;
70
+
71
+  .border {
72
+    border-bottom: 1px #dcdfe6 solid;
73
+    margin: 0px 0 20px 0;
74
+  }
75
+}
76
+
77
+.title {
78
+  background: #409eff;
79
+  height: 44px;
80
+  line-height: 44px;
81
+  padding: 0 0 0 10px;
82
+  color: #fff;
83
+  margin: 0 0 10px 0;
84
+}
85
+
86
+.edit_separater {
87
+  border-top: 1px solid rgb(233, 233, 233);
88
+  margin-top: 15px;
89
+  margin-bottom: 15px;
90
+}
91
+</style>
92
+
93
+<style>
94
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
95
+  font-size: 12px;
96
+}
97
+
98
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
99
+  background: #6fb5fa;
100
+}
101
+
102
+.count {
103
+  color: #bd2c00;
104
+}
105
+.el-table td,
106
+.el-table th.is-leaf,
107
+.el-table--border,
108
+.el-table--group {
109
+  border-color: #d0d3da;
110
+}
111
+.el-table--border::after,
112
+.el-table--group::after,
113
+.el-table::before {
114
+  background-color: #d0d3da;
115
+}
116
+
117
+/* 合并表格线样式 */
118
+
119
+.spanClass .cell {
120
+  padding: 0 !important;
121
+}
122
+
123
+.spanClass .cell tr {
124
+  display: inline-block;
125
+  width: 100%;
126
+  /* height: 44px; */
127
+}
128
+
129
+.spanClass .cell tr td {
130
+  padding: 10px 0;
131
+  border-bottom: 1px solid #ebeef5;
132
+  display: block;
133
+  width: 100%;
134
+  min-height: 44px;
135
+}
136
+.spanClass .cell tr:last-of-type td{
137
+  border-bottom: none;
138
+}
139
+
140
+</style>

+ 281 - 0
src/xt_pages/stock/drugs/components/drugPatientQueryPrint.vue 查看文件

@@ -0,0 +1,281 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">患者药品使用查询表</span>
16
+                    </div>
17
+                   
18
+                    <div style="text-align:left;margin-bottom:20px;font-size: 18px;margin-bottom:-30px">
19
+                      <span>患者姓名:{{this.$route.query.patient_name}}</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20
+                      <span> 查询日期:{{start_time}} ~</span>{{end_time}}
21
+                    </div>
22
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
23
+                      打印时间:{{time_now}}
24
+                    </div>
25
+                    <div class="table_panel">
26
+                        <table class="table">
27
+                            <thead>
28
+                                <tr>
29
+                                  <td  width="80">序号</td>
30
+                                  <td  width="80">名称</td>
31
+                                  <td  width="80">生产厂家</td>
32
+                                  <td  width="80">规格&单位</td>
33
+                                  <td  width="80">数量</td>    
34
+                                                                 
35
+                                </tr>
36
+                              
37
+                               
38
+                            </thead>
39
+                            <tbody>
40
+                                <tr v-for="(item,index) in this.tableList" :key="index">
41
+                                 <td>{{index+1}}</td>
42
+                                 <td>{{item.drug_name}}</td>
43
+                                 <td>{{item.manufacturer}}</td>
44
+                                 <td>{{item.dose}}{{item.dose_unit}} * {{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</td>
45
+                                 <td>{{getCount(item.child,item.min_number,item.max_unit,item.min_unit)}}</td>
46
+                                </tr>  
47
+                            </tbody>
48
+                        </table>
49
+                    </div>
50
+                </div>
51
+            </div>
52
+        </div>
53
+    </div>
54
+</template>
55
+
56
+<script>
57
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
58
+import { getDrugWarehouseOutDetailByPatientId } from "@/api/drug/drug"
59
+import print from 'print-js'
60
+const moment = require('moment')
61
+export default {
62
+    components:{
63
+        BreadCrumb
64
+    },
65
+    data(){
66
+        return{
67
+          crumbs: [
68
+            { path: false, name: '库存管理' },
69
+            { path: false, name: '库存查询' },
70
+            { path: false, name: '库存查询打印' },
71
+          ],
72
+          start_time:"",
73
+          end_time:"",
74
+          drug_name:"",
75
+          drug_spec:"",
76
+          keyword:"",
77
+          tableData:[],
78
+          time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
79
+          type_name:"",
80
+          limit:"",
81
+          page:"",
82
+          loading:false,
83
+          tableList:[],
84
+          good_type:[],
85
+          manufacturerList:[],
86
+          countList:[],
87
+          outCountList:[],
88
+          autoCountList:[],
89
+          cancelCountList:[],
90
+          org_id:0,
91
+          patient_id:0,
92
+        }
93
+    },
94
+    methods:{
95
+      printAction: function() {
96
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
97
+          printJS({
98
+          printable: 'print_content',
99
+          type: 'html',
100
+          documentTitle: '  ',
101
+          style: style,
102
+          scanStyles: false
103
+          })
104
+      },
105
+      getlist(){
106
+        var params = {
107
+            patient_id:this.patient_id,
108
+            start_time:this.start_time,
109
+            end_time:this.end_time,
110
+            limit:this.limit,
111
+            page:this.page,
112
+        }
113
+        getDrugWarehouseOutDetailByPatientId(params).then(response=>{
114
+            if(response.data.state == 1){
115
+            this.manufacturerList = response.data.data.manufacturerList
116
+            var list = response.data.data.list
117
+            var outlist = response.data.data.outlist
118
+            if(list!=null && list.length > 0){
119
+                for(let i=0;i<list.length;i++){
120
+                if(list[i].count_unit == list[i].drug.max_unit){
121
+                    list[i].count = list[i].count * list[i].drug.min_number
122
+                }
123
+                }
124
+            }
125
+            let dataInfo = {}
126
+            list.forEach((item, index) => {
127
+                let { drug_id } = item
128
+                if (!dataInfo[drug_id]) {
129
+                dataInfo[drug_id] = {
130
+                    drug_id,
131
+                    child: [],
132
+                    dose:item.drug.dose,
133
+                    dose_unit:item.drug.dose_unit,
134
+                    min_number:item.drug.min_number,
135
+                    min_unit:item.drug.min_unit,
136
+                    max_unit:item.drug.max_unit,
137
+                    drug_name:item.drug.drug_name,
138
+                    manufacturer:this.getManufacturName(item.manufacturer),
139
+                }
140
+                }
141
+            })
142
+            let arr = Object.values(dataInfo)
143
+            arr.forEach((item,index)=>{
144
+                for(let i=0;i<outlist.length;i++){
145
+                if(item.drug_id == outlist[i].drug_id){
146
+                    item.child.push(outlist[i])
147
+                }
148
+                }
149
+            })
150
+          
151
+            this.tableList = arr
152
+            
153
+            }
154
+        })
155
+    },
156
+    getCount(val,min_number,max_unit,min_unit){
157
+        var total = 0
158
+        var min_str = ""
159
+        var max_str = ""
160
+        if(val!=null && val.length>0){
161
+        for(let i=0;i<val.length;i++){
162
+            total +=val[i].count
163
+        }
164
+        }
165
+        if (total < min_number) {
166
+        min_str = total + min_unit;
167
+        }
168
+        if (total == 0) {
169
+        min_str = "";
170
+        max_str = "";
171
+        }
172
+        if (total >= min_number) {
173
+        if (parseInt(total / min_number) != 0) {
174
+            max_str = parseInt(total / min_number) + max_unit;
175
+        }
176
+        if (total % min_number != 0) {
177
+            min_str = (total % min_number) + min_unit;
178
+        }
179
+        }
180
+        return max_str + min_str;  
181
+    },
182
+   getManufacturName(id){
183
+    
184
+    var manufacturer_name = ""
185
+    for(let i=0;i<this.manufacturerList.length;i++){
186
+        if(id == this.manufacturerList[i].id){
187
+        manufacturer_name = this.manufacturerList[i].manufacturer_name
188
+        } 
189
+    }
190
+
191
+    return manufacturer_name
192
+    },
193
+   },
194
+    created(){
195
+      this.org_id =  this.$store.getters.xt_user.org_id
196
+     
197
+      var starttime =  this.$route.query.start_time
198
+      this.start_time = starttime
199
+      var endtime =  this.$route.query.end_time
200
+      this.end_time = endtime
201
+      var patient_id = parseInt(this.$route.query.patient_id)
202
+      this.patient_id = patient_id
203
+      var keyword = this.$route.query.keyword
204
+      this.keyword = keyword
205
+      this.page = parseInt(this.$route.query.page)
206
+      this.limit = parseInt(this.$route.query.limit)
207
+      this.getlist()
208
+
209
+    }
210
+}
211
+</script>
212
+
213
+
214
+<style rel="stylesheet/scss" lang="scss" scoped>
215
+.print_main_content {
216
+  background-color: white;
217
+  max-width: 1500px;
218
+  margin: 0 auto;
219
+  padding: 0 0 20px 0;
220
+
221
+  .order_title_panl {
222
+    text-align: center;
223
+
224
+    .main_title {
225
+      font-size: 18px;
226
+      line-height: 40px;
227
+      font-weight: 500;
228
+    }
229
+  }
230
+  .table_panel {
231
+    .table {
232
+      width: 100%;
233
+      border: 1px solid;
234
+      border-collapse: collapse;
235
+      padding: 2px;
236
+      
237
+
238
+      thead {
239
+        tr {
240
+          td {
241
+            border: 1px solid;
242
+            text-align: center;
243
+            font-size: 18px;
244
+            padding: 15px 5px;
245
+          }
246
+        }
247
+      }
248
+      tbody {
249
+        tr {
250
+          td {
251
+            border: 1px solid;
252
+            text-align: center;
253
+            font-size: 18px;
254
+            padding: 10px 5px;
255
+            white-space: pre-line;
256
+            .proj {
257
+              padding: 5px 0;
258
+              text-align: left;
259
+
260
+              .proj_title {
261
+                font-size: 16px;
262
+                font-weight: 500;
263
+                line-height: 25px;
264
+              }
265
+
266
+              .proj_item {
267
+                font-size: 15px;
268
+                line-height: 20px;
269
+
270
+                .zone_name {
271
+                  font-weight: 500;
272
+                }
273
+              }
274
+            }
275
+          }
276
+        }
277
+      }
278
+    }
279
+  }
280
+}
281
+</style>

文件差異過大導致無法顯示
+ 1173 - 0
src/xt_pages/stock/drugs/components/drugQueryPrint.vue


+ 268 - 0
src/xt_pages/stock/drugs/components/expiryDateDrugQueryPrint.vue 查看文件

@@ -0,0 +1,268 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">药品有效期查询表</span>
16
+                    </div>
17
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18
+                      打印时间:{{time_now}}
19
+                    </div>
20
+                    <div class="table_panel">
21
+                        <table class="table">
22
+                            <thead>
23
+                                <tr>
24
+                                  <td width="80">序号</td>
25
+                                  <td width="80">药品类型</td>
26
+                                  <td width="80">药品名称</td>
27
+                                  <td width="80">规格&单位</td>
28
+                                  <td width="80">生产厂商</td>
29
+                                  <td width="80">进货价</td>    
30
+                                  <td width="80">库存</td>   
31
+                                  <td width="80">批号</td>  
32
+                                  <td width="80">有效期</td>  
33
+                                  <td width="80">剩余天数</td>                                             
34
+                                </tr>
35
+                            </thead>
36
+                            <tbody>
37
+                               <tr v-for="(item,index) in this.tableList" :key="index">
38
+                                  <td width="80">{{index + 1}}</td>
39
+                                  <td width="80">{{getDrugTypeName(item.XtBaseDrug.drug_type)}} </td>
40
+                                  <td width="80">{{item.XtBaseDrug.drug_name}}</td>    
41
+                                  <td width="80">{{item.XtBaseDrug.dose}}{{item.XtBaseDrug.dose_unit}}*{{item.XtBaseDrug.min_number}}{{item.XtBaseDrug.min_unit}}/{{item.XtBaseDrug.max_unit}}</td>
42
+                                  <td width="80">{{getManufacturName(item.manufacturer)}} </td>
43
+                                  <td width="80">{{item.price}}</td>    
44
+                                  <td width="80">
45
+                                     <span v-if="item.stock_max_number > 0">{{item.stock_max_number}}{{item.XtBaseDrug.max_unit}}</span>
46
+                                     <span v-if="item.stock_min_number >0">{{item.stock_min_number}}{{item.XtBaseDrug.min_unit}}</span>
47
+                                  </td>   
48
+                                  <td width="80">{{item.batch_number}}</td>  
49
+                                  <td width="80">{{getTime(item.expiry_date)}}</td>  
50
+                                  <td width="80">{{getDaysBetween(getTime(item.expiry_date),getTime(nowtime))}}</td>                                             
51
+                                </tr>
52
+                            </tbody>
53
+                        </table>
54
+                    </div>
55
+                </div>
56
+            </div>
57
+        </div>
58
+    </div>
59
+</template>
60
+
61
+<script>
62
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
63
+import { getStorehouseList,getDrugExpiryDateQuery } from "@/api/drug/drug"
64
+import print from 'print-js'
65
+import { uParseTime } from '@/utils/tools'
66
+const moment = require('moment')
67
+export default {
68
+    components:{
69
+        BreadCrumb
70
+    },
71
+    data(){
72
+        return{
73
+          crumbs: [
74
+            { path: false, name: '库存管理' },
75
+            { path: false, name: '库存查询' },
76
+            { path: false, name: '库存查询打印' },
77
+          ],
78
+          start_time:"",
79
+          end_time:"",
80
+          drug_name:"",
81
+          drug_spec:"",
82
+          keyword:"",
83
+          tableData:[],
84
+          time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
85
+          type_name:"",
86
+          limit:"",
87
+          page:"",
88
+          loading: false,
89
+          tableList:[],
90
+          good_type:[],
91
+          manufacturerList:[],
92
+          countList:[],
93
+          outCountList:[],
94
+          autoCountList:[],
95
+          cancelCountList:[],
96
+          org_id:0,
97
+          storehouse_id:0,
98
+          nowtime:"",
99
+          drugTypeList:[],
100
+          expiry_type:0,  
101
+        }
102
+    },
103
+    methods:{
104
+      printAction: function() {
105
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
106
+          printJS({
107
+          printable: 'print_content',
108
+          type: 'html',
109
+          documentTitle: '  ',
110
+          style: style,
111
+          scanStyles: false
112
+          })
113
+      },
114
+      getStorehouseList(){
115
+       getStorehouseList().then(response=>{
116
+         if(response.data.state == 1){
117
+           this.manufacturerList = response.data.data.manufacturerList
118
+           this.goodTypeList = response.data.data.goodTypeList
119
+         }
120
+      })
121
+    },
122
+    getlist(){
123
+        this.loading = true
124
+        var params = {
125
+          storehouse_id:this.storehouse_id,
126
+          expiry_type:this.expiry_type,
127
+          keyword:this.keyword,
128
+          page:this.page,
129
+          limit:this.limit,
130
+          start_time:this.start_time,
131
+        }
132
+      getDrugExpiryDateQuery(params).then(response=>{
133
+         if(response.data.state == 1){
134
+            this.loading = false
135
+            var list = response.data.data.list
136
+            this.tableList = list
137
+            var manufacturerList = response.data.data.manufacturerList
138
+            this.manufacturerList = manufacturerList
139
+            this.total = response.data.data.total
140
+            this.nowtime = response.data.data.nowtime
141
+            this.drugTypeList =  response.data.data.drugTypeList
142
+         }
143
+      })
144
+    },
145
+    getManufacturName(id){
146
+      var manufacturer_name = ""
147
+      for(let i=0;i<this.manufacturerList.length;i++){
148
+        if(id == this.manufacturerList[i].id){
149
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
150
+        }
151
+      }
152
+      return manufacturer_name
153
+    },
154
+    getDrugTypeName(id){
155
+        var name = ""
156
+        for(let i=0;i<this.drugTypeList.length;i++){
157
+        if(id == this.drugTypeList[i].value){
158
+            name = this.drugTypeList[i].name
159
+        }
160
+        }
161
+        return name
162
+    },
163
+    getTime(val) {
164
+      if(val < 0){
165
+        return ""
166
+        }
167
+        if(val == ""){
168
+            return ""
169
+        }else {
170
+            return uParseTime(val, '{y}-{m}-{d}')
171
+        }
172
+    },
173
+    getDaysBetween(dateString1, dateString2) {
174
+        let startDate = Date.parse(dateString1);
175
+        let endDate = Date.parse(dateString2);
176
+        return (startDate - endDate ) / (1 * 24 * 60 * 60 * 1000);
177
+    },
178
+   },
179
+    created(){
180
+      this.org_id =  this.$store.getters.xt_user.org_id
181
+     
182
+      var starttime =  this.$route.query.start_time
183
+      this.start_time = starttime
184
+      var endtime =  this.$route.query.end_time
185
+      this.end_time = endtime
186
+      var storehouse_id = parseInt(this.$route.query.storehouse_id)
187
+      this.storehouse_id = storehouse_id
188
+      var keyword = this.$route.query.keyword
189
+      this.keyword = keyword
190
+      this.page = parseInt(this.$route.query.page)
191
+      this.limit = parseInt(this.$route.query.limit)
192
+      this.expiry_type = parseInt(this.$route.query.expiry_type)
193
+      this.getStorehouseList()
194
+      this.getlist()
195
+
196
+    }
197
+}
198
+</script>
199
+
200
+
201
+<style rel="stylesheet/scss" lang="scss" scoped>
202
+.print_main_content {
203
+  background-color: white;
204
+  max-width: 1500px;
205
+  margin: 0 auto;
206
+  padding: 0 0 20px 0;
207
+
208
+  .order_title_panl {
209
+    text-align: center;
210
+
211
+    .main_title {
212
+      font-size: 18px;
213
+      line-height: 40px;
214
+      font-weight: 500;
215
+    }
216
+  }
217
+  .table_panel {
218
+    .table {
219
+      width: 100%;
220
+      border: 1px solid;
221
+      border-collapse: collapse;
222
+      padding: 2px;
223
+      
224
+
225
+      thead {
226
+        tr {
227
+          td {
228
+            border: 1px solid;
229
+            text-align: center;
230
+            font-size: 18px;
231
+            padding: 15px 5px;
232
+          }
233
+        }
234
+      }
235
+      tbody {
236
+        tr {
237
+          td {
238
+            border: 1px solid;
239
+            text-align: center;
240
+            font-size: 18px;
241
+            padding: 10px 5px;
242
+            white-space: pre-line;
243
+            .proj {
244
+              padding: 5px 0;
245
+              text-align: left;
246
+
247
+              .proj_title {
248
+                font-size: 16px;
249
+                font-weight: 500;
250
+                line-height: 25px;
251
+              }
252
+
253
+              .proj_item {
254
+                font-size: 15px;
255
+                line-height: 20px;
256
+
257
+                .zone_name {
258
+                  font-weight: 500;
259
+                }
260
+              }
261
+            }
262
+          }
263
+        }
264
+      }
265
+    }
266
+  }
267
+}
268
+</style>

文件差異過大導致無法顯示
+ 1143 - 0
src/xt_pages/stock/drugs/components/purchaseDrugQueryPrint.vue


+ 263 - 0
src/xt_pages/stock/query/expiryDateQueryPrint.vue 查看文件

@@ -0,0 +1,263 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">耗材有效期查询表</span>
16
+                    </div>
17
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
18
+                      打印时间:{{time_now}}
19
+                    </div>
20
+                    <div class="table_panel">
21
+                        <table class="table">
22
+                            <thead>
23
+                                <tr>
24
+                                  <td width="80">序号</td>
25
+                                  <td width="80">耗材类型</td>
26
+                                  <td width="80">耗材名称</td>
27
+                                  <td width="80">规格&单位</td>
28
+                                  <td width="80">生产厂商</td>
29
+                                  <td width="80">进货价</td>    
30
+                                  <td width="80">库存</td>   
31
+                                  <td width="80">批号</td>  
32
+                                  <td width="80">有效期</td>  
33
+                                  <td width="80">剩余天数</td>                                             
34
+                                </tr>
35
+                            </thead>
36
+                            <tbody>
37
+                               <tr v-for="(item,index) in this.tableList" :key="index">
38
+                                  <td width="80">{{index + 1}}</td>
39
+                                  <td width="80"> {{getGoodTypeName(item.GoodInfo.good_type_id)}}</td>
40
+                                  <td width="80"> {{item.GoodInfo.good_name}}</td>    
41
+                                  <td width="80"> {{item.GoodInfo.specification_name}}/{{item.GoodInfo.packing_unit}}</td>
42
+                                  <td width="80"> {{getManufacturName(item.manufacturer)}}</td>
43
+                                  <td width="80"> {{item.price}}</td>    
44
+                                  <td width="80"> {{item.stock_count}}</td>   
45
+                                  <td width="80"> {{item.number}}</td>  
46
+                                  <td width="80"> {{getTime(item.expiry_date)}}</td>  
47
+                                  <td width="80"> {{getDaysBetween(getTime(item.expiry_date),getTime(nowtime))}}</td>                                             
48
+                                </tr>
49
+                            </tbody>
50
+                        </table>
51
+                    </div>
52
+                </div>
53
+            </div>
54
+        </div>
55
+    </div>
56
+</template>
57
+
58
+<script>
59
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
60
+import { getStorehouseList,getGoodExpiryDateQuery } from "@/api/drug/drug"
61
+import print from 'print-js'
62
+import { uParseTime } from '@/utils/tools'
63
+const moment = require('moment')
64
+export default {
65
+    components:{
66
+        BreadCrumb
67
+    },
68
+    data(){
69
+        return{
70
+          crumbs: [
71
+            { path: false, name: '库存管理' },
72
+            { path: false, name: '库存查询' },
73
+            { path: false, name: '库存查询打印' },
74
+          ],
75
+          start_time:"",
76
+          end_time:"",
77
+          drug_name:"",
78
+          drug_spec:"",
79
+          keyword:"",
80
+          tableData:[],
81
+          time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
82
+          type_name:"",
83
+          limit:"",
84
+          page:"",
85
+          loading: false,
86
+          tableList:[],
87
+          good_type:[],
88
+          manufacturerList:[],
89
+          countList:[],
90
+          outCountList:[],
91
+          autoCountList:[],
92
+          cancelCountList:[],
93
+          org_id:0,
94
+          storehouse_id:0,
95
+          nowtime:"",
96
+          goodTypeList:[],
97
+          expiry_type:0,
98
+        }
99
+    },
100
+    methods:{
101
+      printAction: function() {
102
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
103
+          printJS({
104
+          printable: 'print_content',
105
+          type: 'html',
106
+          documentTitle: '  ',
107
+          style: style,
108
+          scanStyles: false
109
+          })
110
+      },
111
+      getStorehouseList(){
112
+       getStorehouseList().then(response=>{
113
+         if(response.data.state == 1){
114
+           this.manufacturerList = response.data.data.manufacturerList
115
+           this.goodTypeList = response.data.data.goodTypeList
116
+         }
117
+      })
118
+    },
119
+    getlist(){
120
+        this.loading = true
121
+        var params = {
122
+          storehouse_id:this.storehouse_id,
123
+          expiry_type:this.expiry_type,
124
+          keyword:this.keyword,
125
+          page:this.page,
126
+          limit:this.limit,
127
+          start_time:this.start_time,
128
+        }
129
+      getGoodExpiryDateQuery(params).then(response=>{
130
+         if(response.data.state == 1){
131
+           this.loading = false
132
+            var list = response.data.data.list
133
+            this.tableList = list
134
+            var manufacturerList = response.data.data.manufacturerList
135
+            this.manufacturerList = manufacturerList
136
+            this.nowtime = response.data.data.nowtime
137
+         }
138
+      })
139
+    },
140
+    getManufacturName(id){
141
+      var manufacturer_name = ""
142
+      for(let i=0;i<this.manufacturerList.length;i++){
143
+        if(id == this.manufacturerList[i].id){
144
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
145
+        }
146
+      }
147
+      return manufacturer_name
148
+    },
149
+    getGoodTypeName(id){
150
+     var type_name = ""
151
+     for(let i=0;i<this.goodTypeList.length;i++){
152
+       if(id == this.goodTypeList[i].id){
153
+         type_name = this.goodTypeList[i].type_name
154
+       }
155
+     }
156
+     return type_name
157
+   },
158
+   getTime(val) {
159
+    if(val < 0){
160
+    return ""
161
+    }
162
+    if(val == ""){
163
+        return ""
164
+    }else {
165
+        return uParseTime(val, '{y}-{m}-{d}')
166
+    }
167
+   },
168
+   getDaysBetween(dateString1, dateString2) {
169
+    let startDate = Date.parse(dateString1);
170
+    let endDate = Date.parse(dateString2);
171
+    return (startDate - endDate ) / (1 * 24 * 60 * 60 * 1000);
172
+   },
173
+   },
174
+    created(){
175
+      this.org_id =  this.$store.getters.xt_user.org_id
176
+     
177
+      var starttime =  this.$route.query.start_time
178
+      this.start_time = starttime
179
+      var endtime =  this.$route.query.end_time
180
+      this.end_time = endtime
181
+      var storehouse_id = parseInt(this.$route.query.storehouse_id)
182
+      this.storehouse_id = storehouse_id
183
+      this.expiry_type = parseInt(this.$route.query.expiry_type)
184
+      var keyword = this.$route.query.keyword
185
+      this.keyword = keyword
186
+      this.page = parseInt(this.$route.query.page)
187
+      this.limit = parseInt(this.$route.query.limit)
188
+      this.getStorehouseList()
189
+      this.getlist()
190
+
191
+    }
192
+}
193
+</script>
194
+
195
+
196
+<style rel="stylesheet/scss" lang="scss" scoped>
197
+.print_main_content {
198
+  background-color: white;
199
+  max-width: 1500px;
200
+  margin: 0 auto;
201
+  padding: 0 0 20px 0;
202
+
203
+  .order_title_panl {
204
+    text-align: center;
205
+
206
+    .main_title {
207
+      font-size: 18px;
208
+      line-height: 40px;
209
+      font-weight: 500;
210
+    }
211
+  }
212
+  .table_panel {
213
+    .table {
214
+      width: 100%;
215
+      border: 1px solid;
216
+      border-collapse: collapse;
217
+      padding: 2px;
218
+      
219
+
220
+      thead {
221
+        tr {
222
+          td {
223
+            border: 1px solid;
224
+            text-align: center;
225
+            font-size: 18px;
226
+            padding: 15px 5px;
227
+          }
228
+        }
229
+      }
230
+      tbody {
231
+        tr {
232
+          td {
233
+            border: 1px solid;
234
+            text-align: center;
235
+            font-size: 18px;
236
+            padding: 10px 5px;
237
+            white-space: pre-line;
238
+            .proj {
239
+              padding: 5px 0;
240
+              text-align: left;
241
+
242
+              .proj_title {
243
+                font-size: 16px;
244
+                font-weight: 500;
245
+                line-height: 25px;
246
+              }
247
+
248
+              .proj_item {
249
+                font-size: 15px;
250
+                line-height: 20px;
251
+
252
+                .zone_name {
253
+                  font-weight: 500;
254
+                }
255
+              }
256
+            }
257
+          }
258
+        }
259
+      }
260
+    }
261
+  }
262
+}
263
+</style>

+ 732 - 0
src/xt_pages/stock/query/goodNewQueryPrint.vue 查看文件

@@ -0,0 +1,732 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;" v-loading="loading">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">耗材管理查询表</span>
16
+                    </div>
17
+                   
18
+                   
19
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
20
+                      打印时间:{{time_now}}
21
+                    </div>
22
+                    <div class="table_panel">
23
+                        <table class="table">
24
+                            <thead>
25
+                                <tr>
26
+                                  <td  width="80">序号</td>
27
+                                  <td  width="80">耗材类型</td>
28
+                                  <td  width="80">耗材名称</td>
29
+                                  <td  width="80">规格&单位</td>
30
+                                  <td  width="80">生产厂商</td>    
31
+                                  <td  width="80">国家编码</td>    
32
+                                  <td  width="80">仓库名称</td>   
33
+                                  <td  width="80">入库数量</td>  
34
+                                  <td  width="80">出库数量</td> 
35
+                                  <td  width="80">退库数量</td>   
36
+                                  <td  width="80">实际出库</td> 
37
+                                  <td  width="80">剩余库存</td>
38
+                                  <td  width="80">总库存量</td>
39
+                                </tr>
40
+                            </thead>
41
+                            <tbody> 
42
+                                <tr v-for="(item,index) in tableList" :key="index">
43
+                                  <!-- 序号 -->
44
+                                  <td  width="80">{{index + 1}}</td>
45
+                                  <!-- 耗材类型 -->
46
+                                  <td  width="80">{{getGoodTypeName(item.good_type_id)}}</td>
47
+                                  <!-- 耗材名称 -->
48
+                                  <td  width="80">{{item.good_name}}</td>
49
+                                  <!-- 规格&单位 -->
50
+                                  <td  width="80"> {{item.specification_name}}/{{item.packing_unit}}</td>
51
+                                  <!--  生产厂商-->
52
+                                  <td  width="80"> {{getManufacturName(item.manufacturer)}}</td>    
53
+                                  <!-- 国家编码 -->
54
+                                  <td  width="80"> {{item.social_security_directory_code}}</td>   
55
+                                   <!-- 仓库名称 -->
56
+                                  <td  width="80" style="padding:0;text-align:center;">
57
+                                  
58
+                                     <div style="width:100%">
59
+                                      <tr v-for="(it,i) in item.xt_good_stock_info" :key="i" style="width:100%;border-bottom:1px;">
60
+                                        <td style="border:0;border-bottom:1px;width:100%">
61
+                                          {{getHouseName(it.storehouse_id)}}
62
+                                          
63
+                                        </td>
64
+                                      </tr>
65
+                                    </div>
66
+                                  </td>  
67
+                                  <!-- 入库数量 -->
68
+                                  <td  width="80" style="padding:0;text-align:center;">
69
+                                    <div style="width:100%">
70
+                                      <tr v-for="(it,i) in item.xt_good_stock_info" :key="i" style="width:100%;border-bottom:1px;">
71
+                                        <td style="border:0;border-bottom:1px;width:100%">
72
+                                            {{getGoodIn(item.xt_good_stock,it.storehouse_id)}}
73
+                                        </td>
74
+                                      </tr>
75
+                                    </div>
76
+                                  </td>  
77
+                                  <!-- 出库数量 -->
78
+                                   <td  width="80" style="padding:0;text-align:center;">
79
+                                    <div style="width:100%">
80
+                                      <tr v-for="(it,i) in item.xt_good_stock_info" :key="i" style="width:100%;border-bottom:1px;">
81
+                                        <td style="border:0;border-bottom:1px;width:100%">
82
+                                            {{getGoodAct(item.xt_good_stock,it.storehouse_id)}}
83
+                                        </td>
84
+                                      </tr>
85
+                                    </div>
86
+                                  </td>  
87
+                                  <!-- 退库数量 -->
88
+                                   <td  width="80" style="padding:0;text-align:center;">
89
+                                    <div style="width:100%">
90
+                                      <tr v-for="(it,i) in item.xt_good_stock_info" :key="i" style="width:100%;border-bottom:1px;">
91
+                                        <td style="border:0;border-bottom:1px;width:100%">
92
+                                            {{getGoodCancel(item.xt_good_stock,it.storehouse_id)}}
93
+                                       </td>
94
+                                      </tr>
95
+                                    </div>
96
+                                  </td>  
97
+                                  <!--实际出库  -->
98
+                                  <td  width="80" style="padding:0;text-align:center;">
99
+                                    <div style="width:100%">
100
+                                      <tr v-for="(it,i) in item.xt_good_stock_info" :key="i" style="width:100%;border-bottom:1px;">
101
+                                        <td style="border:0;border-bottom:1px;width:100%">
102
+                                              {{getGoodOut(item.xt_good_stock,it.storehouse_id)}}
103
+                                        </td>
104
+                                      </tr>
105
+                                    </div>
106
+                                  </td>  
107
+                                  <!-- 剩余库存 -->
108
+                                   <td  width="80" style="padding:0;text-align:center;">
109
+                                    <div style="width:100%">
110
+                                      <tr v-for="(it,i) in item.xt_good_stock_info" :key="i" style="width:100%;border-bottom:1px;">
111
+                                        <td style="border:0;border-bottom:1px;width:100%">
112
+                                            {{getGoodFlush(item.xt_good_stock,it.storehouse_id)}}
113
+                                        </td>
114
+                                      </tr>
115
+                                    </div>
116
+                                  </td>  
117
+                                  <!-- 总库存量 -->
118
+                                   <td  width="80" style="padding:0;text-align:center;">
119
+                                    <div style="width:100%">
120
+                                        <td style="border:0;border-bottom:1px;width:100%">
121
+                                             {{getSumCount(item.xt_good_stock,item.id)}}
122
+                                        </td>
123
+                                    </div>
124
+                                  </td>  
125
+                                </tr> 
126
+                            </tbody>
127
+                        </table>
128
+
129
+                     
130
+                    </div>
131
+                </div>
132
+            </div>
133
+        </div>
134
+    </div>
135
+</template>
136
+
137
+<script>
138
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
139
+import { getStorehouseList,getGoodNewQuery } from "@/api/drug/drug"
140
+import {
141
+  getStockDrugCount
142
+} from "@/api/stock";
143
+import print from 'print-js'
144
+const moment = require('moment')
145
+export default {
146
+    components:{
147
+        BreadCrumb
148
+    },
149
+    data(){
150
+        return{
151
+          crumbs: [
152
+            { path: false, name: '库存管理' },
153
+            { path: false, name: '库存查询' },
154
+            { path: false, name: '库存查询打印' },
155
+          ],
156
+          start_time:"",
157
+          end_time:"",
158
+          drug_name:"",
159
+          drug_spec:"",
160
+          keyword:"",
161
+          tableData:[],
162
+          time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
163
+          type_name:"",
164
+          limit:"",
165
+          page:"",
166
+          WarehouseInfo: {
167
+          loading: false,
168
+          warehouseInfoDate: [],
169
+         },
170
+          tableList:[],
171
+          manufacturerList:[],
172
+          countList:[],
173
+          outCountList:[],
174
+          autoCountList:[],
175
+          cancelCountList:[],
176
+          org_id:0,
177
+          patient_id:0,
178
+          storehouse_id:[],
179
+          loading:false,
180
+          good_type:0,
181
+          goodTypeList:[],
182
+          houseList:[],
183
+        }
184
+    },
185
+    methods:{
186
+      printAction: function() {
187
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
188
+          printJS({
189
+          printable: 'print_content',
190
+          type: 'html',
191
+          documentTitle: '  ',
192
+          style: style,
193
+          scanStyles: false
194
+          })
195
+      },
196
+    getStorehouseList(){
197
+      getStorehouseList().then(response=>{
198
+         if(response.data.state == 1){
199
+           var houseList = response.data.data.list
200
+           var obj = {id:0,storehouse_name:"全部"}
201
+           this.houseList.push(obj)
202
+           for(let i=0;i<houseList.length;i++){
203
+             this.houseList.push(houseList[i])
204
+           }
205
+           this.manufacturerList = response.data.data.manufacturerList
206
+           this.goodTypeList = response.data.data.goodTypeList
207
+           this.patientList = response.data.data.patientList
208
+         }
209
+      })
210
+    },
211
+    getlist(){
212
+       this.loading = true
213
+        var params = {
214
+          storehouse_id:this.storehouse_id,
215
+          good_type:this.good_type,
216
+          keyword:this.keyword,
217
+          page:this.page,
218
+          limit:this.limit,
219
+          start_time:this.start_time,
220
+          end_time:this.end_time,
221
+        }
222
+      getGoodNewQuery(params).then(response=>{
223
+         if(response.data.state == 1){
224
+            var list = response.data.data.stockList
225
+            this.loading = false
226
+            this.tableList = list
227
+            this.total = response.data.data.total
228
+           
229
+         }
230
+      })
231
+    },
232
+    getManufacturName(id){
233
+      var manufacturer_name = ""
234
+      for(let i=0;i<this.manufacturerList.length;i++){
235
+        if(id == this.manufacturerList[i].id){
236
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
237
+        }
238
+      }
239
+      return manufacturer_name
240
+    },
241
+    handleSizeChange(val) {
242
+      this.limit = val;
243
+      this.getlist()
244
+    },
245
+    handleCurrentChange(val) {
246
+      this.page = val;
247
+      this.getlist()
248
+    },
249
+    handleSizeChangeOne(val) {
250
+      this.limitone = val;
251
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
252
+    },
253
+    handleCurrentChangeOne(val) {
254
+      this.pageone = val;
255
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
256
+    },
257
+   seach(){
258
+    this.getlist()
259
+   },
260
+   getGoodTypeName(id){
261
+     var type_name = ""
262
+     for(let i=0;i<this.goodTypeList.length;i++){
263
+       if(id == this.goodTypeList[i].id){
264
+         type_name = this.goodTypeList[i].type_name
265
+       }
266
+     }
267
+     return type_name
268
+   },
269
+   getHouseName(id){
270
+     var storehouse_name = ""
271
+     for(let i=0;i<this.houseList.length;i++){
272
+       if(id == this.houseList[i].id){
273
+         storehouse_name = this.houseList[i].storehouse_name
274
+       }
275
+     }
276
+     return storehouse_name
277
+   },
278
+   getWareInfoCount(val,storehouse_id){
279
+     var count = 0
280
+     if(val!=null&&val.length > 0){
281
+       for(let i=0;i<val.length;i++){
282
+         if(val[i].storehouse_id == storehouse_id){
283
+             count +=val[i].warehousing_count
284
+         }
285
+       }
286
+     }
287
+     if(count > 0){
288
+       return count
289
+     }else{
290
+       return ""
291
+     }
292
+   },
293
+   getStockDrugCount(){
294
+      var params ={
295
+        keywords: this.keywords,
296
+        start_time:this.start_time,
297
+        end_time:this.end_time,
298
+      }
299
+    getStockDrugCount(params).then(response=>{
300
+         if(response.data.state == 1){
301
+           var outlist = response.data.data.outList
302
+           this.outCountList = outlist
303
+           var autoCount = response.data.data.autoCount
304
+           this.autoCountList = autoCount
305
+           var totalCount = response.data.data.totalCount
306
+           this.cancelCountList = totalCount
307
+         }
308
+      })
309
+    },
310
+    getWareInfoCountOne(val,storehouse_id){
311
+     var count = 0
312
+     if(val!=null&&val.length > 0){
313
+       for(let i=0;i<val.length;i++){
314
+         if(val[i].storehouse_id == storehouse_id){
315
+             count +=val[i].stock_count
316
+         }
317
+       }
318
+     }
319
+     if(count > 0){
320
+       return count
321
+     }else{
322
+       return ""
323
+     }
324
+   },
325
+   getOutCount(id){
326
+      var count = 0
327
+      for(let i=0;i<this.outCountList.length;i++){
328
+         if(id == this.outCountList[i].good_id){
329
+           count = this.outCountList[i].count
330
+         }
331
+      }
332
+     return count
333
+   },
334
+   getAutoCount(id){
335
+     var count= 0
336
+     for(let i=0;i<this.autoCountList.length;i++){
337
+       if(id == this.autoCountList[i].good_id){
338
+         count = this.autoCountList[i].count
339
+       }
340
+     }
341
+     return count
342
+   },
343
+   getCancelCount(id){
344
+     var count = 0
345
+     for(let i=0;i<this.cancelCountList.length;i++){
346
+       if(id == this.cancelCountList[i].good_id){
347
+          count = this.cancelCountList[i].count
348
+       }
349
+     }
350
+     return count
351
+   },
352
+   getCancelCountInfo(cancel_stock_info,storehouse_id){
353
+     var count = 0 
354
+     if(cancel_stock_info!=null && cancel_stock_info.length >0){
355
+        for(let i=0;i<cancel_stock_info.length;i++){
356
+          if(cancel_stock_info[i].storehouse_id == storehouse_id){
357
+              count += cancel_stock_info[i].count
358
+          }
359
+        }
360
+     }
361
+     return count
362
+   },
363
+   getWareOutInfoCount(warehouse_out_info,storehouse_id){
364
+     var count = 0
365
+     if(warehouse_out_info!=null && warehouse_out_info.length > 0){
366
+       for(let i=0;i<warehouse_out_info.length;i++){
367
+         if(storehouse_id == warehouse_out_info[i].storehouse_id){
368
+            count +=warehouse_out_info[i].count
369
+         }
370
+       }
371
+     }
372
+     return count
373
+   },
374
+   getInCount(id){
375
+      var count= 0
376
+     for(let i=0;i<this.countList.length;i++){
377
+      if(id == this.countList[i].good_id){
378
+          count = this.countList[i].count
379
+      }
380
+     }
381
+     return count
382
+    },
383
+    getOutCount(id){
384
+      var count = 0
385
+      for(let i=0;i<this.outCountList.length;i++){
386
+         if(id == this.outCountList[i].good_id){
387
+           count = this.outCountList[i].count
388
+         }
389
+      }
390
+     return count
391
+   },
392
+   getAutoCount(id){
393
+     var count= 0
394
+     for(let i=0;i<this.autoCountList.length;i++){
395
+       if(id == this.autoCountList[i].good_id){
396
+         count = this.autoCountList[i].count
397
+       }
398
+     }
399
+     return count
400
+   },
401
+   getCancelCount(id){
402
+     var count = 0
403
+     for(let i=0;i<this.cancelCountList.length;i++){
404
+       if(id == this.cancelCountList[i].good_id){
405
+          count = this.cancelCountList[i].count
406
+       }
407
+     }
408
+     return count
409
+   },
410
+   getStockCount(id){
411
+     var stock_count = 0
412
+     for(let i=0;i<this.countList.length;i++){
413
+       if(id == this.countList[i].good_id){
414
+         stock_count = this.countList[i].stock_count
415
+       }
416
+     }
417
+     return stock_count
418
+   },
419
+   getWareInfo(arr){
420
+     var total = 0
421
+     if(arr.length > 0){
422
+       for(let i=0;i<arr.length;i++){
423
+         total += parseInt(arr[i].warehousing_count)
424
+       }
425
+     }else{
426
+       total = ""
427
+     }
428
+     return total
429
+   },
430
+   getOverplus(arr){
431
+     var total = 0
432
+     if(arr.length > 0){
433
+      for(let i=0;i<arr.length;i++){
434
+        total += arr[i].stock_count
435
+      }
436
+     }else{
437
+       total = ""
438
+     }
439
+     return total
440
+   },
441
+   getCancelInfo(arr){
442
+     var total = 0
443
+     if(arr.length > 0){
444
+      for(let i=0;i<arr.length;i++){
445
+        total += arr[i].count
446
+      }
447
+     }else{
448
+       total = ""
449
+     }
450
+     return total
451
+   },
452
+   getOverFlushInfo(arr){
453
+     var total = 0
454
+     if(arr!=null&&arr.length >0){
455
+      for(let i=0;i<arr.length;i++){
456
+        total += arr[i].stock_count
457
+      }
458
+     }
459
+     return total
460
+   },
461
+  getTime(val) {
462
+    if(val < 0){
463
+      return ""
464
+    }
465
+   if(val == ""){
466
+     return ""
467
+   }else {
468
+    return uParseTime(val, '{y}-{m}-{d}')
469
+   }
470
+   },
471
+  getName(id){
472
+    var name = ""
473
+    for(let i=0;i<this.patientList.length;i++){
474
+      if(id == this.patientList[i].id){
475
+        name = this.patientList[i].name
476
+      }
477
+    }
478
+    return name
479
+  },
480
+  getCount(ctime){
481
+   var arr = []
482
+   var arrOut = []
483
+   var total_in = 0
484
+   var total_out = 0
485
+   for(let i=0;i<this.warehouseInfoByList.length;i++){
486
+      if(ctime >= this.warehouseInfoByList[i].ctime){
487
+         arr.push(this.warehouseInfoByList[i])
488
+      }
489
+   }
490
+   if(arr.length > 0){
491
+    for(let i=0;i<arr.length;i++){
492
+      total_in +=arr[i].warehousing_count
493
+    }
494
+   }
495
+   for(let i=0;i<this.warehouseOutByList.length;i++){
496
+     if(ctime <=this.warehouseOutByList[i].ctime){
497
+       arrOut.push(this.warehouseOutByList[i])
498
+     }
499
+   }
500
+   if(arrOut.length >0){
501
+    for(let i=0;i<arrOut.length;i++){
502
+      total_out +=arrOut[i].count
503
+    }
504
+   }
505
+   console.log("total23323223",total_in)
506
+   return total_in - total_out
507
+  },
508
+  getStockCountOne(warehouse_out_id,good_id,patient_id,sys_record_time){
509
+    var flush_count = 0
510
+    if(this.flushList!=null && this.flushList.length > 0){
511
+     for(let i=0;i<this.flushList.length;i++){
512
+      if(warehouse_out_id == this.flushList[i].warehouse_out_id && good_id == this.flushList[i].good_id && patient_id == this.flushList[i].patient_id && sys_record_time == this.flushList[i].system_time){
513
+         flush_count = this.flushList[i].flush_count
514
+      }
515
+     }
516
+    }
517
+    return flush_count
518
+  },
519
+  getCancelSotckInfo(arr){
520
+    var cancle_toal = 0
521
+    if(arr.length >0){
522
+        for(let z=0;z<arr.length;z++){
523
+        cancle_toal += arr[z].count
524
+        }
525
+    }
526
+    return cancle_toal
527
+   },
528
+   getStockOutFlow(arr,storehouse_id){
529
+       var count = 0
530
+       if(arr!=null && arr.length > 0){
531
+         for(let i=0;i<arr.length;i++){
532
+          if(arr[i].storehouse_id == storehouse_id){
533
+            count +=arr[i].count
534
+          }
535
+         
536
+         }
537
+       }
538
+       if(count > 0){
539
+          return count
540
+       }else{
541
+         return  0
542
+       }
543
+    },
544
+
545
+  //  修改后接口
546
+    getGoodIn(val,storehouse_id){
547
+      var sum_count = 0
548
+      if(val!=null && val!=undefined){
549
+        for(let i=0;i<val.length;i++){
550
+          if(storehouse_id == val[i].storehouse_id){
551
+             sum_count = val[i].stock_in_count
552
+          }
553
+        }
554
+      }
555
+      if(sum_count > 0){
556
+         return sum_count
557
+      }else{
558
+        return  0
559
+      }
560
+    },
561
+    getGoodOut(val,storehouse_id){
562
+      var sum_count = 0
563
+      if(val!=null && val!=undefined){
564
+        for(let i=0;i<val.length;i++){
565
+          if(storehouse_id == val[i].storehouse_id){
566
+             sum_count = val[i].stock_out_count
567
+          }
568
+        }
569
+      }
570
+      if(sum_count > 0){
571
+         return sum_count
572
+      }else{
573
+        return  0
574
+      }
575
+    },
576
+    getGoodCancel(val,storehouse_id){
577
+      var sum_count = 0
578
+      if(val!=null && val!=undefined){
579
+        for(let i=0;i<val.length;i++){
580
+          if(storehouse_id == val[i].storehouse_id){
581
+             sum_count = val[i].stock_cancel_count
582
+          }
583
+        }
584
+      }
585
+      if(sum_count > 0){
586
+         return sum_count
587
+      }else{
588
+        return  0
589
+      }
590
+    },
591
+    getGoodAct(val,storehouse_id){
592
+      var sum_count = 0
593
+      if(val!=null && val!=undefined){
594
+        for(let i=0;i<val.length;i++){
595
+          if(storehouse_id == val[i].storehouse_id){
596
+             sum_count = val[i].stock_act_out_count
597
+          }
598
+        }
599
+      }
600
+      if(sum_count > 0){
601
+         return sum_count
602
+      }else{
603
+        return  0
604
+      }
605
+    },
606
+    getGoodFlush(val,storehouse_id){
607
+      var sum_count = 0
608
+      if(val!=null && val!=undefined){
609
+        for(let i=0;i<val.length;i++){
610
+          if(storehouse_id == val[i].storehouse_id){
611
+             sum_count = val[i].flush_count
612
+          }
613
+        }
614
+      }
615
+      if(sum_count > 0){
616
+         return sum_count
617
+      }else{
618
+        return  0
619
+      }
620
+    },
621
+    getSumCount(val,good_id){
622
+      var sum_count = 0
623
+      var arr = []
624
+      if(val!=null && val!=undefined){
625
+        for(let i=0;i<val.length;i++){
626
+          if(good_id == val[i].good_id){
627
+            arr.push(val[i])
628
+          }
629
+        }
630
+      }
631
+      for(let i=0;i<arr.length;i++){
632
+        sum_count +=arr[i].flush_count
633
+      }
634
+      if(sum_count > 0){
635
+         return sum_count
636
+      }else{
637
+        return  0
638
+      }
639
+    }
640
+   },
641
+    created(){
642
+      this.org_id =  this.$store.getters.xt_user.org_id
643
+     
644
+      var starttime =  this.$route.query.start_time
645
+      this.start_time = starttime
646
+      var endtime =  this.$route.query.end_time
647
+      this.end_time = endtime
648
+      var storehouse_id = parseInt(this.$route.query.storehouse_id)
649
+      this.storehouse_id = storehouse_id
650
+      this.good_type = parseInt(this.$route.query.good_type)
651
+      var keyword = this.$route.query.keyword
652
+      this.keyword = keyword
653
+      this.page = parseInt(this.$route.query.page)
654
+      this.limit = parseInt(this.$route.query.limit)
655
+      this.getStorehouseList()
656
+      this.getlist()
657
+      
658
+
659
+    }
660
+}
661
+</script>
662
+
663
+
664
+<style rel="stylesheet/scss" lang="scss" scoped>
665
+.print_main_content {
666
+  background-color: white;
667
+  max-width: 1500px;
668
+  margin: 0 auto;
669
+  padding: 0 0 20px 0;
670
+
671
+  .order_title_panl {
672
+    text-align: center;
673
+
674
+    .main_title {
675
+      font-size: 18px;
676
+      line-height: 40px;
677
+      font-weight: 500;
678
+    }
679
+  }
680
+  .table_panel {
681
+    .table {
682
+      width: 100%;
683
+      border: 1px solid;
684
+      border-collapse: collapse;
685
+      padding: 2px;
686
+      
687
+
688
+      thead {
689
+        tr {
690
+          td {
691
+            border: 1px solid;
692
+            text-align: center;
693
+            font-size: 18px;
694
+            padding: 15px 5px;
695
+          }
696
+        }
697
+      }
698
+      tbody {
699
+        tr {
700
+          td {
701
+            border: 1px solid;
702
+            text-align: center;
703
+            font-size: 18px;
704
+            padding: 10px 5px;
705
+            white-space: pre-line;
706
+            .proj {
707
+              padding: 5px 0;
708
+              text-align: left;
709
+
710
+              .proj_title {
711
+                font-size: 16px;
712
+                font-weight: 500;
713
+                line-height: 25px;
714
+              }
715
+
716
+              .proj_item {
717
+                font-size: 15px;
718
+                line-height: 20px;
719
+
720
+                .zone_name {
721
+                  font-weight: 500;
722
+                }
723
+              }
724
+            }
725
+          }
726
+        }
727
+      }
728
+    }
729
+  }
730
+}
731
+</style>
732
+

+ 263 - 0
src/xt_pages/stock/query/patientQueryPrint.vue 查看文件

@@ -0,0 +1,263 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">患者耗材使用查询表</span>
16
+                    </div>
17
+                   
18
+                    <div style="text-align:left;margin-bottom:20px;font-size: 18px;margin-bottom:-30px">
19
+                      <span>患者姓名:{{this.$route.query.patient_name}}</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
20
+                      <span> 查询日期:{{start_time}} ~</span>{{end_time}}
21
+                    </div>
22
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
23
+                      打印时间:{{time_now}}
24
+                    </div>
25
+                    <div class="table_panel">
26
+                        <table class="table">
27
+                            <thead>
28
+                                <tr>
29
+                                  <td  width="80">序号</td>
30
+                                  <td  width="80">名称</td>
31
+                                  <td  width="80">生产厂家</td>
32
+                                  <td  width="80">规格&单位</td>
33
+                                  <td  width="80">数量</td>    
34
+                                                                 
35
+                                </tr>
36
+                              
37
+                               
38
+                            </thead>
39
+                            <tbody>
40
+                                <tr v-for="(item,index) in this.tableList" :key="index">
41
+                                 <td>{{index+1}}</td>
42
+                                 <td>{{item.good_name}}</td>
43
+                                 <td>{{item.manufacturer}}</td>
44
+                                 <td>{{item.specification_name}}/{{item.packing_unit}}</td>
45
+                                 <td>{{getCount(item.child)}}{{item.packing_unit}}</td>
46
+                                </tr>  
47
+                            </tbody>
48
+                        </table>
49
+                    </div>
50
+                </div>
51
+            </div>
52
+        </div>
53
+    </div>
54
+</template>
55
+
56
+<script>
57
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
58
+import { getWarehouseOutDetailByPatientId } from "@/api/drug/drug"
59
+import print from 'print-js'
60
+const moment = require('moment')
61
+export default {
62
+    components:{
63
+        BreadCrumb
64
+    },
65
+    data(){
66
+        return{
67
+          crumbs: [
68
+            { path: false, name: '库存管理' },
69
+            { path: false, name: '库存查询' },
70
+            { path: false, name: '库存查询打印' },
71
+          ],
72
+          start_time:"",
73
+          end_time:"",
74
+          drug_name:"",
75
+          drug_spec:"",
76
+          keyword:"",
77
+          tableData:[],
78
+          time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
79
+          type_name:"",
80
+          limit:"",
81
+          page:"",
82
+          WarehouseInfo: {
83
+          loading: false,
84
+          warehouseInfoDate: [],
85
+         },
86
+          tableList:[],
87
+          good_type:[],
88
+          manufacturerList:[],
89
+          countList:[],
90
+          outCountList:[],
91
+          autoCountList:[],
92
+          cancelCountList:[],
93
+          org_id:0,
94
+          patient_id:0,
95
+        }
96
+    },
97
+    methods:{
98
+      printAction: function() {
99
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
100
+          printJS({
101
+          printable: 'print_content',
102
+          type: 'html',
103
+          documentTitle: '  ',
104
+          style: style,
105
+          scanStyles: false
106
+          })
107
+      },
108
+     getlist(){
109
+        var params = {
110
+            patient_id:this.patient_id,
111
+            start_time:this.start_time,
112
+            end_time:this.end_time,
113
+            limit:this.limit,
114
+            page:this.page
115
+        }
116
+        getWarehouseOutDetailByPatientId(params).then(response=>{
117
+            if(response.data.state == 1){
118
+            var list = response.data.data.list
119
+            var outlist = response.data.data.outlist
120
+            this.manufacturerList = response.data.data.manufacturerList
121
+            let dataInfo = {}
122
+            if(list!=null && list.length > 0){
123
+              list.forEach((item, index) => {
124
+                let { good_id } = item
125
+                if (!dataInfo[good_id]) {
126
+                  dataInfo[good_id] = {
127
+                    good_id,
128
+                    child: [],
129
+                    specification_name:item.GoodInfo.specification_name,
130
+                    good_name:item.GoodInfo.good_name,
131
+                    packing_unit:item.GoodInfo.packing_unit,
132
+                    manufacturer:this.getManufacturName(item.manufacturer),
133
+                  }
134
+                }
135
+              })
136
+              let arr = Object.values(dataInfo)
137
+              console.log("ar232323232",arr)
138
+              arr.forEach((item,index)=>{
139
+                for(let i=0;i<outlist.length;i++){
140
+                  if(item.good_id == outlist[i].good_id){
141
+                    item.child.push(outlist[i])
142
+                  }
143
+                }
144
+              }) 
145
+              this.tableList = arr
146
+            }
147
+            this.total = response.data.data.total
148
+         
149
+            
150
+            }
151
+        })
152
+    },
153
+    getManufacturName(id){
154
+     var manufacturer_name = ""
155
+     for(let i=0;i<this.manufacturerList.length;i++){
156
+        if(id == this.manufacturerList[i].id){
157
+          manufacturer_name = this.manufacturerList[i].manufacturer_name
158
+        } 
159
+     }
160
+     return manufacturer_name
161
+   },
162
+   getCount(val){
163
+     var total_count = 0
164
+     if(val!=null && val.length > 0){
165
+        for(let i=0;i<val.length;i++){
166
+          total_count +=val[i].count
167
+        }
168
+      }
169
+      if(total_count > 0){
170
+        return total_count
171
+      }else{
172
+      return  0
173
+      }
174
+    }
175
+   },
176
+    created(){
177
+      this.org_id =  this.$store.getters.xt_user.org_id
178
+     
179
+      var starttime =  this.$route.query.start_time
180
+      this.start_time = starttime
181
+      var endtime =  this.$route.query.end_time
182
+      this.end_time = endtime
183
+      var patient_id = parseInt(this.$route.query.patient_id)
184
+      this.patient_id = patient_id
185
+      var keyword = this.$route.query.keyword
186
+      this.keyword = keyword
187
+      this.page = parseInt(this.$route.query.page)
188
+      this.limit = parseInt(this.$route.query.limit)
189
+      this.getlist()
190
+
191
+    }
192
+}
193
+</script>
194
+
195
+
196
+<style rel="stylesheet/scss" lang="scss" scoped>
197
+.print_main_content {
198
+  background-color: white;
199
+  max-width: 1500px;
200
+  margin: 0 auto;
201
+  padding: 0 0 20px 0;
202
+
203
+  .order_title_panl {
204
+    text-align: center;
205
+
206
+    .main_title {
207
+      font-size: 18px;
208
+      line-height: 40px;
209
+      font-weight: 500;
210
+    }
211
+  }
212
+  .table_panel {
213
+    .table {
214
+      width: 100%;
215
+      border: 1px solid;
216
+      border-collapse: collapse;
217
+      padding: 2px;
218
+      
219
+
220
+      thead {
221
+        tr {
222
+          td {
223
+            border: 1px solid;
224
+            text-align: center;
225
+            font-size: 18px;
226
+            padding: 15px 5px;
227
+          }
228
+        }
229
+      }
230
+      tbody {
231
+        tr {
232
+          td {
233
+            border: 1px solid;
234
+            text-align: center;
235
+            font-size: 18px;
236
+            padding: 10px 5px;
237
+            white-space: pre-line;
238
+            .proj {
239
+              padding: 5px 0;
240
+              text-align: left;
241
+
242
+              .proj_title {
243
+                font-size: 16px;
244
+                font-weight: 500;
245
+                line-height: 25px;
246
+              }
247
+
248
+              .proj_item {
249
+                font-size: 15px;
250
+                line-height: 20px;
251
+
252
+                .zone_name {
253
+                  font-weight: 500;
254
+                }
255
+              }
256
+            }
257
+          }
258
+        }
259
+      }
260
+    }
261
+  }
262
+}
263
+</style>

+ 734 - 0
src/xt_pages/stock/query/purchaseStockQueryPrint.vue 查看文件

@@ -0,0 +1,734 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;" v-loading="loading">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">药品进销存查询表</span>
16
+                    </div>
17
+                    <div style="text-align:left;margin-bottom:20px;font-size: 18px;margin-bottom:-30px">
18
+                      <span>查询日期:{{start_time}} ~</span>{{end_time}}
19
+                    </div>
20
+                    <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
21
+                      打印时间:{{time_now}}
22
+                    </div>
23
+                    <div class="table_panel">
24
+                        <table class="table">
25
+                            <thead>
26
+                                <tr>
27
+                                  <td rowspan="2" width="80">序号</td>
28
+                                  <td rowspan="2" width="80">耗材类型</td>
29
+                                  <td rowspan="2" width="80">规格&单位</td>
30
+                                  <td rowspan="2" width="80">生产厂商</td>
31
+                                  <td width="80" colspan="3">期初结余</td>    
32
+                                  <td width="80" colspan="3">本期增加</td>   
33
+                                  <td width="80" colspan="3">本期减少</td>  
34
+                                  <td width="80" colspan="3">期末结余</td>                                             
35
+                                </tr>
36
+                                <tr>
37
+                                  <td>数量</td>   
38
+                                  <td>进货金额</td> 
39
+                                  <td>销售金额</td>   
40
+                                  <td>数量</td>   
41
+                                  <td>进货金额</td> 
42
+                                  <td>销售金额</td> 
43
+                                  <td>数量</td>   
44
+                                  <td>进货金额</td> 
45
+                                  <td>销售金额</td> 
46
+                                  <td>数量</td>   
47
+                                  <td>进货金额</td> 
48
+                                  <td>销售金额</td>    
49
+                                </tr>
50
+                               
51
+                            </thead>
52
+                            <tbody>
53
+                                <tr v-for="(item,index) in this.tableList" :key="index">
54
+                                 <td>{{index + 1}}</td>
55
+                                 <td>{{getGoodTypeName(item.good_type_id)}}</td>
56
+                                 <td>{{item.specification_name}}</td>
57
+                                 <td> {{getManufacturName(item.manufacturer)}}</td>
58
+                                 <td>{{item.stockIn}}</td>   
59
+                                 <td>{{item.stock_in_price}}</td> 
60
+                                 <td>{{item.stockMoney}}</td>   
61
+                                 <td>{{item.stockAdd}}</td>   
62
+                                 <td>{{item.addStockMoney}}</td> 
63
+                                 <td>{{item.saleStockMoney}}</td> 
64
+                                 <td>{{item.outStock}}</td>   
65
+                                 <td>{{item.stockOutprice}}</td> 
66
+                                 <td>{{item.saleOutMoney}}</td> 
67
+                                 <td>{{item.overStock}}</td>   
68
+                                 <td>{{item.overPrice}}</td> 
69
+                                 <td>{{item.overMoney}}</td>    
70
+                                </tr>  
71
+                            </tbody>
72
+                        </table>
73
+                    </div>
74
+                </div>
75
+            </div>
76
+        </div>
77
+    </div>
78
+</template>
79
+
80
+<script>
81
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
82
+import { getStorehouseList,getPurchaseStockQuery } from "@/api/drug/drug"
83
+import {
84
+  getStockDrugCount
85
+} from "@/api/stock";
86
+import print from 'print-js'
87
+const moment = require('moment')
88
+export default {
89
+    components:{
90
+        BreadCrumb
91
+    },
92
+    data(){
93
+        return{
94
+          crumbs: [
95
+            { path: false, name: '库存管理' },
96
+            { path: false, name: '库存查询' },
97
+            { path: false, name: '库存查询打印' },
98
+          ],
99
+          start_time:"",
100
+          end_time:"",
101
+          drug_name:"",
102
+          drug_spec:"",
103
+          keyword:"",
104
+          tableData:[],
105
+          time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
106
+          type_name:"",
107
+          limit:"",
108
+          page:"",
109
+          loading: false,
110
+          warehouseInfoDate: [],
111
+          tableList:[],
112
+          good_type:[],
113
+          manufacturerList:[],
114
+          countList:[],
115
+          outCountList:[],
116
+          autoCountList:[],
117
+          cancelCountList:[],
118
+          org_id:0,
119
+          goodTypeList:[],
120
+        }
121
+    },
122
+    methods:{
123
+      printAction: function() {
124
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
125
+          printJS({
126
+          printable: 'print_content',
127
+          type: 'html',
128
+          documentTitle: '  ',
129
+          style: style,
130
+          scanStyles: false
131
+          })
132
+      },
133
+      getStorehouseList(){
134
+        getStorehouseList().then(response=>{
135
+            if(response.data.state == 1){
136
+           
137
+            this.manufacturerList = response.data.data.manufacturerList
138
+            var obj = {id:0,type_name:"全部"}
139
+            this.goodTypeList.push(obj)
140
+            var goodTypeList = response.data.data.goodTypeList
141
+            for(let i=0;i<goodTypeList.length;i++){
142
+                this.goodTypeList.push(goodTypeList[i])
143
+                }
144
+            }
145
+        })
146
+        },
147
+        getlist(){
148
+            this.loading = true
149
+            var params = {
150
+            good_type:this.good_type,
151
+            keyword:this.keyword,
152
+            page:this.page,
153
+            limit:this.limit,
154
+            start_time:this.start_time,
155
+            end_time:this.end_time,
156
+            }
157
+        getPurchaseStockQuery(params).then(response=>{
158
+            if(response.data.state == 1){
159
+                var list = response.data.data.list
160
+                this.loading = false
161
+                for(let i=0;i<list.length;i++){
162
+                
163
+                  list[i].stockIn = this.getWarehouseInfoStart(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo) //期初结余
164
+                  list[i].stock_in_price = this.getWarehouseInfoStartPrice(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo)
165
+                  list[i].stockMoney = this.getWarehouseInfoStartMoney(list[i].StartFlowInfo,list[i].StartOutFlowInfo,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].StartCancelFlowInfo)
166
+                  
167
+                  list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
168
+                  list[i].addStockMoney = (this.getAddStockMony(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)).toFixed(2)
169
+                  list[i].saleStockMoney = (this.getSaleStockMony(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)).toFixed(2)
170
+
171
+                  list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
172
+                  list[i].stockOutprice = (this.stockOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)).toFixed(2)
173
+                  list[i].saleOutMoney = (this.saleOutprice(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)).toFixed(2)
174
+                  
175
+                  list[i].overStock= this.getEndWarehouseInfo(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
176
+                  list[i].overPrice= this.getEndOverPrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
177
+                  list[i].overMoney = this.getEndSalePrice(list[i].EndFlowInfo,list[i].EndFlowOutInfo,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].EndCancelFLowInfo)
178
+                
179
+                }
180
+                this.tableList = list
181
+
182
+               this.manufacturerList = response.data.data.manufacturerList
183
+            
184
+            }
185
+        })
186
+       },  
187
+   getWarehouseInfoStartMoney(arr,arr1,arr2,arr3,arr4){
188
+     var total_price = 0
189
+     var total_price_one = 0
190
+     var total_price_two = 0
191
+     var total_price_three = 0
192
+     var total_price_four = 0
193
+     var total_price_all = 0
194
+     if(arr!=null && arr.length >0){
195
+       for(let i=0;i<arr.length;i++){
196
+         total_price +=arr[i].count * arr[i].price
197
+       }
198
+     }
199
+     if(arr1!=null && arr1.length > 0){
200
+      for(let i=0;i<arr1.length;i++){
201
+        total_price_one +=arr1[i].count * arr1[i].price
202
+      }
203
+      
204
+     }
205
+     if(arr2!=null && arr2.length > 0){
206
+      for(let i=0;i<arr2.length;i++){
207
+       total_price_two +=arr2[i].count * arr2[i].price
208
+      }
209
+     
210
+     }
211
+    if(arr3!=null && arr3.length > 0){
212
+      for(let i=0;i<arr3.length;i++){
213
+        total_price_three +=arr3[i].count * arr3[i].price
214
+      }
215
+     
216
+     }
217
+    if(arr4!=null && arr4.length > 0){
218
+      for(let i=0;i<arr4.length;i++){
219
+        total_price_four +=arr4[i].count * arr4[i].price
220
+      }
221
+     
222
+     }
223
+     total_price_all = total_price - total_price_one + total_price_two - total_price_three + total_price_four
224
+    if (total_price_all > 0) {
225
+       return total_price_all.toFixed(2)
226
+     }else{
227
+      return  0
228
+     }
229
+   },
230
+    getWarehosueOutInfo(val,val2,val3){
231
+     var count = 0
232
+     var count_one = 0
233
+     var all_count = 0
234
+     var count_two = 0
235
+     if(val!=null && val.length >0){
236
+       for(let i=0;i<val.length;i++){
237
+         count +=val[i].count
238
+       }
239
+     }
240
+     if(val2!=null && val2.length > 0){
241
+      for(let i=0;i<val2.length;i++){
242
+        count_one +=val2[i].count
243
+      }
244
+     }
245
+     if(val3!=null && val3.length > 0){
246
+      for(let i=0;i<val3.length;i++){
247
+        count_two +=val3[i].count
248
+      }
249
+     }
250
+     all_count = count +count_one - count_two
251
+     if(all_count >0){
252
+       return all_count
253
+     }else{
254
+      return 0
255
+     }
256
+   },
257
+   stockOutprice(val,val2,val3){
258
+     var total_price = 0
259
+     var total_price_one = 0
260
+     var total_price_two = 0
261
+     var all_price = 0
262
+     if(val!=null && val.length >0){
263
+       for(let i=0;i<val.length;i++){
264
+         total_price +=val[i].count * val[i].buy_price
265
+       }
266
+     }
267
+     if(val2!=null && val2.length > 0){
268
+      for(let i=0;i<val2.length;i++){
269
+        total_price_one +=val2[i].count * val2[i].buy_price
270
+      }
271
+     }
272
+    if(val3!=null && val3.length > 0){
273
+      for(let i=0;i<val3.length;i++){
274
+        total_price_two +=val3[i].count * val3[i].buy_price
275
+      }
276
+     }
277
+     all_price = total_price + total_price_one - total_price_two
278
+     if(all_price >0){
279
+       return all_price
280
+     }else{
281
+      return 0
282
+     }
283
+   },
284
+     saleOutprice(val,val2,val3){
285
+     var total_price = 0
286
+     var total_price_one = 0
287
+     var all_price = 0
288
+     var total_price_two = 0
289
+     if(val!=null && val.length >0){
290
+       for(let i=0;i<val.length;i++){
291
+         total_price +=val[i].count * val[i].xt_warehouse_info.packing_price
292
+       }
293
+     }
294
+     if(val2!=null && val2.length > 0){
295
+       for(let i=0;i<val2.length;i++){
296
+         total_price_one +=val2[i].count * val2[i].price
297
+       }
298
+     }
299
+     if(val3!=null && val3.length > 0){
300
+       for(let i=0;i<val3.length;i++){
301
+         total_price_two +=val3[i].count * val3[i].price
302
+       }
303
+     }
304
+     all_price = total_price + total_price_one - total_price_two
305
+     if(all_price >0){
306
+       return total_price
307
+     }else{
308
+      return 0
309
+     }
310
+   },
311
+   getEndWarehouseInfo(val,val3,val1,val2,val4){
312
+     var count = 0
313
+     var count_one = 0
314
+     var count_two = 0
315
+     var count_three =0
316
+     var count_four = 0
317
+     var all_count = 0
318
+     if(val!=null && val.length >0){
319
+       for(let i=0;i<val.length;i++){
320
+         count +=val[i].count 
321
+       }
322
+     }
323
+     if(val1!=null&&val1.length >0){
324
+       for(let i=0;i<val1.length;i++){
325
+         count_one +=val1[i].count
326
+       }
327
+     }
328
+     if(val3!=null&& val3.length > 0){
329
+      for(let i=0;i<val3.length;i++){
330
+         count_three +=val3[i].count
331
+       }
332
+     }
333
+     if(val2!=null&&val2.length >0){
334
+       for(let i=0;i<val2.length;i++){
335
+         count_two +=val2[i].count
336
+       }
337
+     }
338
+     if(val4!=null&&val4.length >0){
339
+       for(let i=0;i<val4.length;i++){
340
+         count_four +=val4[i].count
341
+       }
342
+     }
343
+     all_count = count- count_three + count_one - count_two + count_four
344
+     if(all_count >0){
345
+       return all_count
346
+     }else{
347
+      return 0
348
+     }
349
+   },
350
+      getEndWarehouseInfo(val,val3,val1,val2){
351
+     var count = 0
352
+     var count_one = 0
353
+     var count_two = 0
354
+     var count_three =0
355
+     var all_count = 0
356
+     if(val!=null && val.length >0){
357
+       for(let i=0;i<val.length;i++){
358
+         count +=val[i].count 
359
+       }
360
+     }
361
+     if(val1!=null&&val1.length >0){
362
+       for(let i=0;i<val1.length;i++){
363
+         count_one +=val1[i].count
364
+       }
365
+     }
366
+     if(val3!=null&& val3.length > 0){
367
+      for(let i=0;i<val3.length;i++){
368
+         count_three +=val3[i].count
369
+       }
370
+     }
371
+     if(val2!=null&&val2.length >0){
372
+       for(let i=0;i<val2.length;i++){
373
+         count_two +=val2[i].count
374
+       }
375
+     }
376
+     all_count = count- count_three + count_one - count_two
377
+     if(all_count >0){
378
+       return all_count
379
+     }else{
380
+      return 0
381
+     }
382
+   },
383
+   getEndSalePrice(val,val3,val1,val2,val4){
384
+     var total_price = 0
385
+     var total_price_one = 0
386
+     var total_price_two = 0
387
+     var total_price_three = 0
388
+     var total_price_four = 0
389
+     var all_price= 0
390
+     if(val!=null && val.length >0){
391
+       for(let i=0;i<val.length;i++){
392
+         total_price +=val[i].count * val[i].price
393
+       }
394
+     }
395
+     if(val1!=null && val1.length >0){
396
+       for(let i=0;i<val1.length;i++){
397
+         total_price_one +=val1[i].count * val1[i].price
398
+       }
399
+     }
400
+    if(val3!=null && val3.length >0){
401
+       for(let i=0;i<val3.length;i++){
402
+         total_price_three +=val3[i].count * val3[i].price
403
+       }
404
+     }
405
+      if(val2!=null && val2.length >0){
406
+       for(let i=0;i<val2.length;i++){
407
+         total_price_two +=val2[i].count * val2[i].price
408
+       }
409
+     }
410
+       if(val4!=null && val4.length >0){
411
+       for(let i=0;i<val4.length;i++){
412
+         total_price_four +=val4[i].count * val4[i].price
413
+       }
414
+     }
415
+     var all_price = total_price-total_price_three + total_price_one - total_price_two + total_price_four
416
+     if(all_price >0){
417
+       return all_price.toFixed(2)
418
+     }else{
419
+      return 0
420
+     }
421
+   },
422
+   getEndSalePrice(val,val3,val1,val2,val4){
423
+     var total_price = 0
424
+     var total_price_one = 0
425
+     var total_price_two = 0
426
+     var total_price_three = 0
427
+     var total_price_four = 0
428
+     var all_price= 0
429
+     if(val!=null && val.length >0){
430
+       for(let i=0;i<val.length;i++){
431
+         total_price +=val[i].count * val[i].price
432
+       }
433
+     }
434
+     if(val1!=null && val1.length >0){
435
+       for(let i=0;i<val1.length;i++){
436
+         total_price_one +=val1[i].count * val1[i].price
437
+       }
438
+     }
439
+    if(val3!=null && val3.length >0){
440
+       for(let i=0;i<val3.length;i++){
441
+         total_price_three +=val3[i].count * val3[i].price
442
+       }
443
+     }
444
+      if(val2!=null && val2.length >0){
445
+       for(let i=0;i<val2.length;i++){
446
+         total_price_two +=val2[i].count * val2[i].price
447
+       }
448
+     }
449
+       if(val4!=null && val4.length >0){
450
+       for(let i=0;i<val4.length;i++){
451
+         total_price_four +=val4[i].count * val4[i].price
452
+       }
453
+     }
454
+     var all_price = total_price-total_price_three + total_price_one - total_price_two + total_price_four
455
+     if(all_price >0){
456
+       return all_price.toFixed(2)
457
+     }else{
458
+      return 0
459
+     }
460
+   },
461
+       getGoodTypeName(id){
462
+        var type_name = ""
463
+        for(let i=0;i<this.goodTypeList.length;i++){
464
+        if(id == this.goodTypeList[i].id){
465
+            type_name = this.goodTypeList[i].type_name
466
+        }
467
+        }
468
+        return type_name
469
+       },
470
+    getWarehouseInfoStart(arr1,arr2,arr3,arr4,arr5){
471
+      var count =0
472
+      var countOne =0 
473
+      var countTwo= 0
474
+      var countthree = 0 //期初
475
+      var countfour = 0
476
+      var countfive = 0
477
+      if(arr1!=null && arr1.length > 0){
478
+        for(let i=0;i<arr1.length;i++){
479
+        countOne +=arr1[i].count
480
+        }
481
+      }
482
+      if(arr2!=null && arr2.length > 0){
483
+        for(let i=0;i<arr2.length;i++){
484
+          countTwo +=arr2[i].count
485
+        }
486
+      }
487
+      if(arr3!=null && arr3.length > 0){
488
+        for(let i=0;i<arr3.length;i++){
489
+          countthree +=arr3[i].count
490
+        }
491
+      }
492
+      if(arr4!=null && arr4.length > 0){
493
+        for(let i=0;i<arr4.length;i++){
494
+          countfour +=arr4[i].count
495
+        }
496
+      }
497
+      if(arr5!=null && arr5.length > 0){
498
+        for(let i=0;i<arr5.length;i++){
499
+          countfive +=arr5[i].count
500
+        }
501
+      }
502
+      console.log("countOne",countOne)
503
+      console.log("countTwo",countTwo)
504
+      console.log("countthree",countthree)
505
+      console.log("countfour",countfour)
506
+      console.log("*********************")
507
+      count = countOne - countTwo + countthree - countfour + countfive
508
+      if(count > 0 ){
509
+        return count
510
+      }else{
511
+        return 0
512
+      }
513
+    },
514
+    getWarehouseInfoStartPrice(arr,arr1,arr2,arr3,arr4){
515
+     var total_price = 0
516
+     var total_price_one = 0
517
+     var total_price_two = 0
518
+     var total_price_three = 0
519
+     var total_price_four = 0
520
+     var total_price_all = 0
521
+     if(arr!=null&&arr.length > 0){
522
+      for(let i=0;i<arr.length;i++){
523
+        total_price += arr[i].count * arr[i].buy_price
524
+      }
525
+     }
526
+     if(arr1!=null && arr1.length > 0){
527
+      for(let i=0;i<arr1.length;i++){
528
+        total_price_one +=arr1[i].count * arr1[i].buy_price
529
+      }
530
+      
531
+     }
532
+     if(arr2!=null && arr2.length > 0){
533
+      for(let i=0;i<arr2.length;i++){
534
+       total_price_two +=arr2[i].count * arr2[i].buy_price
535
+      }
536
+     
537
+     }
538
+    if(arr3!=null && arr3.length > 0){
539
+      for(let i=0;i<arr3.length;i++){
540
+        total_price_three +=arr3[i].count * arr3[i].buy_price
541
+      }
542
+     
543
+     }
544
+     if(arr4!=null && arr4.length > 0){
545
+      for(let i=0;i<arr4.length;i++){
546
+        total_price_three +=arr4[i].count * arr4[i].buy_price
547
+      }
548
+     
549
+     }
550
+     total_price_all = total_price - total_price_one + total_price_two - total_price_three + total_price_four
551
+     if (total_price_all > 0) {
552
+       return total_price_all.toFixed(2)
553
+     }else{
554
+      return  0
555
+     }
556
+   },
557
+  getWarehouseInfoOne(val,val2){
558
+    var count =0 
559
+    var countOne = 0
560
+    var all_count = 0
561
+    if(val!=null && val.length >0){
562
+     for(let i=0;i<val.length;i++){
563
+      count +=val[i].count
564
+     }
565
+    }
566
+    if(val2!=null && val2.length > 0){
567
+     for(let i=0;i<val2.length;i++){
568
+       countOne +=val2[i].count
569
+     }
570
+    }
571
+    all_count = count + countOne
572
+    console.log("count2332323223232o2222222222wide",count)
573
+    console.log("countONE23232322323323223",countOne)
574
+    console.log("all_count9999999999999wode",all_count)
575
+    console.log("-------------------------------------------")
576
+    if(all_count > 0 ){
577
+      return all_count
578
+    }else{
579
+      return 0
580
+    }
581
+  },
582
+  getAddStockMony(val,val2){
583
+    var total_price =0 
584
+    var total_price_one = 0
585
+    var all_price = 0
586
+    if(val!=null && val.length >0){
587
+     for(let i=0;i<val.length;i++){
588
+      total_price +=val[i].count * val[i].buy_price
589
+     }
590
+    }
591
+    if(val2!=null && val2.length > 0){
592
+      for(let i=0;i<val2.length;i++){
593
+       total_price_one +=val2[i].count * val2[i].price
594
+      }
595
+    }
596
+  all_price = total_price + total_price_one
597
+   if(all_price >0 ){
598
+    return total_price
599
+   }else{
600
+    return 0
601
+   }
602
+  },
603
+   getSaleStockMony(val,val2){
604
+    var total_price =0 
605
+    var total_price_one = 0
606
+    var all_price = 0
607
+    if(val!=null && val.length >0){
608
+     for(let i=0;i<val.length;i++){
609
+      total_price +=val[i].count * val[i].price
610
+     }
611
+    }
612
+   if(val2!=null && val2.length > 0){
613
+     for(let i=0;i<val2.length;i++){
614
+      total_price_one +=val2[i].count * val2[i].price
615
+     }
616
+   }
617
+   all_price = total_price + total_price_one
618
+   if(all_price >0 ){
619
+    return all_price
620
+   }else{
621
+    return 0
622
+   }
623
+  },
624
+    getWarehouseOut(val){
625
+        var count = 0
626
+        for(let i=0;i<val.length;i++){
627
+        count +=val[i].count
628
+        }
629
+        if(count >0){
630
+        return count
631
+        }else{
632
+        return 0
633
+        }
634
+    },
635
+    getManufacturName(id){
636
+      var manufacturer_name = ""
637
+      for(let i=0;i<this.manufacturerList.length;i++){
638
+        if(id == this.manufacturerList[i].id){
639
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
640
+        }
641
+      }
642
+      return manufacturer_name
643
+    },
644
+   },
645
+    created(){
646
+      this.org_id =  this.$store.getters.xt_user.org_id
647
+     
648
+      var starttime =  this.$route.query.start_time
649
+      this.start_time = starttime
650
+      var endtime =  this.$route.query.end_time
651
+      this.end_time = endtime
652
+      var good_type = parseInt(this.$route.query.good_type)
653
+      this.good_type = good_type
654
+      var keyword = this.$route.query.keyword
655
+      this.keyword = keyword
656
+      this.page = parseInt(this.$route.query.page)
657
+      this.limit = parseInt(this.$route.query.limit)
658
+      this.getStorehouseList()
659
+      this.getlist()
660
+    
661
+
662
+    }
663
+}
664
+</script>
665
+
666
+
667
+<style rel="stylesheet/scss" lang="scss" scoped>
668
+.print_main_content {
669
+  background-color: white;
670
+  max-width: 1500px;
671
+  margin: 0 auto;
672
+  padding: 0 0 20px 0;
673
+
674
+  .order_title_panl {
675
+    text-align: center;
676
+
677
+    .main_title {
678
+      font-size: 18px;
679
+      line-height: 40px;
680
+      font-weight: 500;
681
+    }
682
+  }
683
+  .table_panel {
684
+    .table {
685
+      width: 100%;
686
+      border: 1px solid;
687
+      border-collapse: collapse;
688
+      padding: 2px;
689
+      
690
+
691
+      thead {
692
+        tr {
693
+          td {
694
+            border: 1px solid;
695
+            text-align: center;
696
+            font-size: 18px;
697
+            padding: 15px 5px;
698
+          }
699
+        }
700
+      }
701
+      tbody {
702
+        tr {
703
+          td {
704
+            border: 1px solid;
705
+            text-align: center;
706
+            font-size: 18px;
707
+            padding: 10px 5px;
708
+            white-space: pre-line;
709
+            .proj {
710
+              padding: 5px 0;
711
+              text-align: left;
712
+
713
+              .proj_title {
714
+                font-size: 16px;
715
+                font-weight: 500;
716
+                line-height: 25px;
717
+              }
718
+
719
+              .proj_item {
720
+                font-size: 15px;
721
+                line-height: 20px;
722
+
723
+                .zone_name {
724
+                  font-weight: 500;
725
+                }
726
+              }
727
+            }
728
+          }
729
+        }
730
+      }
731
+    }
732
+  }
733
+}
734
+</style>