|
@@ -9,6 +9,9 @@
|
9
|
9
|
>打印
|
10
|
10
|
</el-button>
|
11
|
11
|
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
12
|
15
|
<el-button
|
13
|
16
|
style="float: right;margin-right:10px"
|
14
|
17
|
size="small"
|
|
@@ -52,7 +55,7 @@
|
52
|
55
|
>搜索</el-button
|
53
|
56
|
>
|
54
|
57
|
|
55
|
|
-
|
|
58
|
+
|
56
|
59
|
|
57
|
60
|
|
58
|
61
|
|
|
@@ -104,7 +107,7 @@
|
104
|
107
|
:trigger-on-focus="true"
|
105
|
108
|
placeholder="请输入耗材名称"
|
106
|
109
|
@select="handleSelect"
|
107
|
|
- style="width:300px;"
|
|
110
|
+ style="width:500px;"
|
108
|
111
|
:popper-append-to-body="true"
|
109
|
112
|
>
|
110
|
113
|
<i class="el-icon-search el-input__icon" slot="suffix"></i>
|
|
@@ -112,6 +115,15 @@
|
112
|
115
|
<div class="name">{{ item.good_name +" " +item.specification_name + " "+item.manufacturer }}</div>
|
113
|
116
|
</template>
|
114
|
117
|
</el-autocomplete>
|
|
118
|
+
|
|
119
|
+ <!-- <el-button
|
|
120
|
+ style="float: right"
|
|
121
|
+ size="small"
|
|
122
|
+ icon="el-icon-printer"
|
|
123
|
+ @click="BatchPrintAction"
|
|
124
|
+ type="primary"
|
|
125
|
+ >批量打印
|
|
126
|
+ </el-button> -->
|
115
|
127
|
</div>
|
116
|
128
|
|
117
|
129
|
<!-- <el-row :gutter="12" style="margin-top: 10px"> -->
|
|
@@ -221,11 +233,180 @@
|
221
|
233
|
:total="total"
|
222
|
234
|
>
|
223
|
235
|
</el-pagination>
|
224
|
|
- <!-- </el-row> -->
|
|
236
|
+
|
|
237
|
+ <div>
|
|
238
|
+
|
|
239
|
+ <el-dialog
|
|
240
|
+ title="入库记录"
|
|
241
|
+ :visible.sync="dialogVisible"
|
|
242
|
+ width="80%"
|
|
243
|
+ top="5vh"
|
|
244
|
+ :close-on-click-modal="false"
|
|
245
|
+ >
|
|
246
|
+ <!-- 查询条件区域 -->
|
|
247
|
+ <div class="filter-container">
|
|
248
|
+ <el-row :gutter="20">
|
|
249
|
+ <el-col :span="8">
|
|
250
|
+ <span class="demonstration">日期查询:</span>
|
|
251
|
+ <el-date-picker
|
|
252
|
+ size="small"
|
|
253
|
+ v-model="listQuery.start_time"
|
|
254
|
+ prefix-icon="el-icon-date"
|
|
255
|
+ @change="changeTime"
|
|
256
|
+ :editable="false"
|
|
257
|
+ style="width: 196px;"
|
|
258
|
+ type="date"
|
|
259
|
+ placeholder="选择日期时间"
|
|
260
|
+ align="right"
|
|
261
|
+ :picker-options="pickerOptions"
|
|
262
|
+ format="yyyy-MM-dd"
|
|
263
|
+ value-format="yyyy-MM-dd"
|
|
264
|
+ ></el-date-picker>
|
|
265
|
+ -
|
|
266
|
+ <el-date-picker
|
|
267
|
+ size="small"
|
|
268
|
+ v-model="listQuery.end_time"
|
|
269
|
+ prefix-icon="el-icon-date"
|
|
270
|
+ @change="changeTime"
|
|
271
|
+ :editable="false"
|
|
272
|
+ style="width: 196px;"
|
|
273
|
+ type="date"
|
|
274
|
+ placeholder="选择日期时间"
|
|
275
|
+ align="right"
|
|
276
|
+ :picker-options="pickerOptions"
|
|
277
|
+ format="yyyy-MM-dd"
|
|
278
|
+ value-format="yyyy-MM-dd"
|
|
279
|
+ ></el-date-picker>
|
|
280
|
+ </el-col>
|
|
281
|
+ <el-col :span="8">
|
|
282
|
+ <el-autocomplete
|
|
283
|
+ class="checkSearch"
|
|
284
|
+ popper-class="my-autocomplete"
|
|
285
|
+ v-model="good_name"
|
|
286
|
+ :fetch-suggestions="querySearchAsync"
|
|
287
|
+ :trigger-on-focus="true"
|
|
288
|
+ placeholder="请输入耗材名称"
|
|
289
|
+ @select="handleSelect"
|
|
290
|
+ style="width:500px;"
|
|
291
|
+ :popper-append-to-body="true"
|
|
292
|
+ >
|
|
293
|
+ <i class="el-icon-search el-input__icon" slot="suffix"></i>
|
|
294
|
+ <template slot-scope="{ item }">
|
|
295
|
+ <div class="name">{{ item.good_name +" " +item.specification_name + " "+item.manufacturer }}</div>
|
|
296
|
+ </template>
|
|
297
|
+ </el-autocomplete>
|
|
298
|
+
|
|
299
|
+ </el-col>
|
|
300
|
+ <el-col :span="2">
|
|
301
|
+ <el-button type="primary" @click="handleQuery" style="width: 100%">查询</el-button>
|
|
302
|
+ </el-col>
|
|
303
|
+ </el-row>
|
|
304
|
+ </div>
|
|
305
|
+
|
|
306
|
+ <!-- 操作按钮区域 -->
|
|
307
|
+ <div class="operation-buttons">
|
|
308
|
+ <el-button type="primary" @click="toGoodPrint">打印</el-button>
|
|
309
|
+ <!-- <el-button type="primary" @click="toPrint">导出</el-button> -->
|
|
310
|
+ </div>
|
|
311
|
+
|
|
312
|
+ <!-- 表格区域 -->
|
|
313
|
+ <el-table
|
|
314
|
+ :data="tablePrintData"
|
|
315
|
+ border
|
|
316
|
+ style="width: 100%"
|
|
317
|
+ height="60vh"
|
|
318
|
+ v-loading="loading"
|
|
319
|
+ @selection-change="batchSelect"
|
|
320
|
+ element-loading-text="数据加载中"
|
|
321
|
+ >
|
|
322
|
+ <el-table-column align="center" type="selection" width="55">
|
|
323
|
+ </el-table-column>
|
|
324
|
+ <el-table-column prop="index" label="序号" width="60" align="center">
|
|
325
|
+ <template slot-scope="scope">
|
|
326
|
+ {{ scope.$index+1 }}
|
|
327
|
+ </template>
|
|
328
|
+ </el-table-column>
|
|
329
|
+
|
|
330
|
+ <el-table-column prop="medicalCode" label="医保编码" width="200" align="center">
|
|
331
|
+ <template slot-scope="scope">
|
|
332
|
+ {{ getSocialSecurityDirectoryCode(scope.row.good_id) }}
|
|
333
|
+ </template>
|
|
334
|
+ </el-table-column>
|
|
335
|
+ <el-table-column prop="name" label="耗材名称" width="180" align="center">
|
|
336
|
+ <template slot-scope="scope">
|
|
337
|
+ {{ getGoodName(scope.row.good_id) }}
|
|
338
|
+ </template>
|
|
339
|
+ </el-table-column>
|
|
340
|
+ <el-table-column prop="specification" label="耗材规格" width="200" align="center">
|
|
341
|
+ <template slot-scope="scope">
|
|
342
|
+ {{ getSpecificationName(scope.row.good_id) }}
|
|
343
|
+ </template>
|
|
344
|
+ </el-table-column>
|
|
345
|
+ <el-table-column prop="unit" label="单位" width="80" align="center">
|
|
346
|
+ <template slot-scope="scope">
|
|
347
|
+ {{ getPackingUnit(scope.row.good_id) }}
|
|
348
|
+ </template>
|
|
349
|
+ </el-table-column>
|
|
350
|
+ <el-table-column prop="batchNumber" label="批号" width="120" align="center">
|
|
351
|
+ <template slot-scope="scope">
|
|
352
|
+ {{ scope.row.number }}
|
|
353
|
+ </template>
|
|
354
|
+ </el-table-column>
|
|
355
|
+ <el-table-column prop="productionDate" label="生产日期" width="120" align="center">
|
|
356
|
+ <template slot-scope="scope">
|
|
357
|
+ {{ getTime(scope.row.product_date) }}
|
|
358
|
+ </template>
|
|
359
|
+ </el-table-column>
|
|
360
|
+ <el-table-column prop="expiryDate" label="有效日期" width="120" align="center">
|
|
361
|
+ <template slot-scope="scope">
|
|
362
|
+ {{ getTime(scope.row.expiry_date) }}
|
|
363
|
+ </template>
|
|
364
|
+ </el-table-column>
|
|
365
|
+ <el-table-column prop="purchasePrice" label="进货单价" width="100" align="center">
|
|
366
|
+ <template slot-scope="scope">
|
|
367
|
+ {{ scope.row.price }}
|
|
368
|
+ </template>
|
|
369
|
+ </el-table-column>
|
|
370
|
+
|
|
371
|
+ <el-table-column prop="stockQuantity" label="入库数量" width="100" align="center">
|
|
372
|
+ <template slot-scope="scope">
|
|
373
|
+ {{ scope.row.warehousing_count }}
|
|
374
|
+ </template>
|
|
375
|
+ </el-table-column>
|
|
376
|
+ <el-table-column prop="stockAmount" label="入库金额" width="120" align="center">
|
|
377
|
+ <template slot-scope="scope">
|
|
378
|
+ {{ (scope.row.price * scope.row.warehousing_count).toFixed(2) }}
|
|
379
|
+ </template>
|
|
380
|
+ </el-table-column>
|
|
381
|
+
|
|
382
|
+ <el-table-column prop="purchasePrice" label="零售价" width="100" align="center">
|
|
383
|
+ <template slot-scope="scope">
|
|
384
|
+ {{ scope.row.packing_price }}
|
|
385
|
+ </template>
|
|
386
|
+ </el-table-column>
|
|
387
|
+ </el-table>
|
|
388
|
+
|
|
389
|
+ <div slot="footer" class="dialog-footer">
|
|
390
|
+ <el-button @click="dialogVisible = false">关闭</el-button>
|
|
391
|
+ </div>
|
|
392
|
+ </el-dialog>
|
|
393
|
+ </div>
|
|
394
|
+
|
|
395
|
+ <good-print
|
|
396
|
+ ref="goodPrint"
|
|
397
|
+ :visibility="isVisibility"
|
|
398
|
+ :propsTable="propsTable"
|
|
399
|
+ >
|
|
400
|
+ </good-print>
|
|
401
|
+
|
225
|
402
|
</div>
|
|
403
|
+
|
|
404
|
+
|
226
|
405
|
</template>
|
227
|
406
|
|
228
|
407
|
<script>
|
|
408
|
+import goodPrint from "../goodPrint.vue";
|
|
409
|
+const moment = require('moment')
|
229
|
410
|
import { uParseTime } from "@/utils/tools";
|
230
|
411
|
import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
|
231
|
412
|
import {
|
|
@@ -234,12 +415,15 @@ import {
|
234
|
415
|
getStockDetail,
|
235
|
416
|
getPrintStockGood,
|
236
|
417
|
getGoodDetailPrintList,
|
237
|
|
- postSearchGoodList
|
|
418
|
+ postSearchGoodList,
|
|
419
|
+ getGoodWarehosueInPrintList
|
238
|
420
|
} from "@/api/stock";
|
239
|
421
|
|
240
|
422
|
export default {
|
241
|
423
|
name: "stockInDetail",
|
242
|
|
-
|
|
424
|
+ components: {
|
|
425
|
+ goodPrint,
|
|
426
|
+ },
|
243
|
427
|
created() {
|
244
|
428
|
|
245
|
429
|
var nowDate = new Date();
|
|
@@ -322,12 +506,134 @@ export default {
|
322
|
506
|
dealerList:[],
|
323
|
507
|
currentIndex:0,
|
324
|
508
|
good_id:0,
|
325
|
|
- goodKindList:[]
|
|
509
|
+ goodKindList:[],
|
|
510
|
+ dialogVisible:false,
|
|
511
|
+ loading: false,
|
|
512
|
+ queryParams: {
|
|
513
|
+ dateRange: [],
|
|
514
|
+ itemType: '',
|
|
515
|
+ stockType: '',
|
|
516
|
+ keyword: ''
|
|
517
|
+ },
|
|
518
|
+ listQuery:{
|
|
519
|
+ start_time: moment().startOf('month').format('YYYY-MM-DD'),
|
|
520
|
+ end_time:moment().endOf('month').format('YYYY-MM-DD')
|
|
521
|
+ },
|
|
522
|
+ tableData: [],
|
|
523
|
+ pagination: {
|
|
524
|
+ currentPage: 1,
|
|
525
|
+ pageSize: 20,
|
|
526
|
+ total: 0
|
|
527
|
+ },
|
|
528
|
+ tablePrintData:[],
|
|
529
|
+ goodList:[],
|
|
530
|
+ goodsType:[],
|
|
531
|
+ idsList:[],
|
|
532
|
+ printData:[],
|
|
533
|
+ isVisibility: "",
|
|
534
|
+ propsTable: "",
|
|
535
|
+
|
326
|
536
|
};
|
327
|
537
|
},
|
328
|
538
|
methods: {
|
|
539
|
+ changeTime(){
|
|
540
|
+
|
|
541
|
+ },
|
|
542
|
+ pickerOptions(){
|
|
543
|
+
|
|
544
|
+ },
|
|
545
|
+ toGoodPrint() {
|
|
546
|
+ // if (this.state == 1 && this.multipleSelection.length == 0) {
|
|
547
|
+ // this.$message.error("未选择任何数据");
|
|
548
|
+ // return;
|
|
549
|
+ // }
|
|
550
|
+ // if (this.state == 2 && this.tableData == null) {
|
|
551
|
+ // this.$message.error("未选择任何数据");
|
|
552
|
+ // return;
|
|
553
|
+ // }
|
|
554
|
+ this.$refs.goodPrint.show(
|
|
555
|
+ this.printData,
|
|
556
|
+ );
|
|
557
|
+ },
|
|
558
|
+ batchSelect(selection){
|
|
559
|
+
|
|
560
|
+ this.printData = []
|
|
561
|
+ for(let i=0;i<selection.length;i++){
|
|
562
|
+ for(let j=0;j<this.tablePrintData.length;j++){
|
|
563
|
+ if(selection[i].id == this.tablePrintData[j].id){
|
|
564
|
+ this.printData.push(this.tablePrintData[j])
|
|
565
|
+ }
|
|
566
|
+ }
|
|
567
|
+ }
|
|
568
|
+ console.log("打印数据=====",this.printData)
|
|
569
|
+ },
|
|
570
|
+ BatchPrintAction(){
|
|
571
|
+ this.dialogVisible = true
|
|
572
|
+ },
|
|
573
|
+ getSocialSecurityDirectoryCode(good_id){
|
|
574
|
+ var social_security_directory_code = ""
|
|
575
|
+ for(let i=0;i<this.goodList.length;i++){
|
|
576
|
+ if(good_id == this.goodList[i].id){
|
|
577
|
+ social_security_directory_code = this.goodList[i].social_security_directory_code
|
|
578
|
+ }
|
|
579
|
+ }
|
|
580
|
+ return social_security_directory_code
|
|
581
|
+ },
|
|
582
|
+ getGoodName(good_id){
|
|
583
|
+ var good_name = ""
|
|
584
|
+ for(let i=0;i<this.goodList.length;i++){
|
|
585
|
+ if(good_id == this.goodList[i].id){
|
|
586
|
+ good_name = this.goodList[i].good_name
|
|
587
|
+ }
|
|
588
|
+ }
|
|
589
|
+ return good_name
|
|
590
|
+ },
|
|
591
|
+ getSpecificationName(good_id){
|
|
592
|
+ var specification_name = ""
|
|
593
|
+ for(let i=0;i<this.goodList.length;i++){
|
|
594
|
+ if(good_id == this.goodList[i].id){
|
|
595
|
+ specification_name = this.goodList[i].specification_name
|
|
596
|
+ }
|
|
597
|
+ }
|
|
598
|
+ return specification_name
|
|
599
|
+ },
|
|
600
|
+ getPackingUnit(good_id){
|
|
601
|
+ var packing_unit = ""
|
|
602
|
+ for(let i=0;i<this.goodList.length;i++){
|
|
603
|
+ if(good_id == this.goodList[i].id){
|
|
604
|
+ packing_unit = this.goodList[i].packing_unit
|
|
605
|
+ }
|
|
606
|
+ }
|
|
607
|
+ return packing_unit
|
|
608
|
+ },
|
|
609
|
+ handleQuery(){
|
|
610
|
+ var params = {
|
|
611
|
+ start_time:this.listQuery.start_time,
|
|
612
|
+ end_time:this.listQuery.end_time,
|
|
613
|
+ good_id:this.good_id,
|
|
614
|
+ }
|
|
615
|
+ console.log("param===",params)
|
|
616
|
+ getGoodWarehosueInPrintList(params).then(response=>{
|
|
617
|
+ if(response.data.state == 1){
|
|
618
|
+ var list = response.data.data.list
|
|
619
|
+ this.tablePrintData = list
|
|
620
|
+ var manufacturerList = response.data.data.manufacturerList
|
|
621
|
+ this.manufacturerList = []
|
|
622
|
+ this.manufacturerList = manufacturerList
|
|
623
|
+ var dealerList = response.data.data.dealerList
|
|
624
|
+ this.dealerList = []
|
|
625
|
+ this.dealerList = dealerList
|
|
626
|
+ var goodList = response.data.data.goodList
|
|
627
|
+ this.goodList = []
|
|
628
|
+ this.goodList= goodList
|
|
629
|
+ var goodsType = response.data.data.goodsType
|
|
630
|
+ this.goodsType = []
|
|
631
|
+ this.goodsType = goodsType
|
|
632
|
+
|
|
633
|
+ }
|
|
634
|
+ })
|
|
635
|
+ },
|
329
|
636
|
getGoodKandName(id){
|
330
|
|
-
|
331
|
637
|
var name = ""
|
332
|
638
|
for(let i=0;i<this.goodKindList.length;i++){
|
333
|
639
|
if(id == this.goodKindList[i].value){
|