|
@@ -8,15 +8,15 @@
|
8
|
8
|
type="primary"
|
9
|
9
|
>打印
|
10
|
10
|
</el-button>
|
11
|
|
- <el-button
|
12
|
|
- style="float: right; margin-right: 10px"
|
|
11
|
+ <el-button
|
|
12
|
+ style="float: right;margin-right:10px"
|
13
|
13
|
size="small"
|
14
|
14
|
@click="exportListDetai"
|
15
|
15
|
type="primary"
|
16
|
16
|
>明细导出
|
17
|
17
|
</el-button>
|
18
|
|
- <el-button
|
19
|
|
- style="float: right; margin-right: 10px"
|
|
18
|
+ <el-button
|
|
19
|
+ style="float: right;margin-right:10px"
|
20
|
20
|
size="small"
|
21
|
21
|
@click="exportList"
|
22
|
22
|
type="primary"
|
|
@@ -24,26 +24,18 @@
|
24
|
24
|
</el-button>
|
25
|
25
|
|
26
|
26
|
<div class="cell clearfix">
|
27
|
|
- <label class="title"><span class="name">仓库</span> :</label>
|
28
|
|
- <el-select
|
29
|
|
- size="small"
|
30
|
|
- v-model="storehouse_id"
|
31
|
|
- filterable
|
32
|
|
- placeholder="请选择仓库"
|
33
|
|
- style="width: 200px"
|
34
|
|
- @change="changeHouseList"
|
35
|
|
- >
|
36
|
|
- <el-option
|
37
|
|
- v-for="(option, index) in houseList"
|
38
|
|
- :key="index"
|
39
|
|
- :label="option.storehouse_name"
|
40
|
|
- :value="option.id"
|
41
|
|
- >
|
42
|
|
- </el-option>
|
|
27
|
+ <label class="title"><span class="name">仓库</span> :</label>
|
|
28
|
+ <el-select size="small" v-model="storehouse_id" filterable placeholder="请选择仓库" style="width:200px" @change="changeHouseList">
|
|
29
|
+ <el-option
|
|
30
|
+ v-for="(option, index) in houseList"
|
|
31
|
+ :key="index"
|
|
32
|
+ :label="option.storehouse_name"
|
|
33
|
+ :value="option.id">
|
|
34
|
+ </el-option>
|
43
|
35
|
</el-select>
|
44
|
36
|
<el-input
|
45
|
37
|
size="small"
|
46
|
|
- style="width: 200px"
|
|
38
|
+ style="width: 200px;"
|
47
|
39
|
class="filter-item"
|
48
|
40
|
v-model.trim="searchKey"
|
49
|
41
|
placeholder="单据编码/制单人/药品名称"
|
|
@@ -56,36 +48,38 @@
|
56
|
48
|
@click="search"
|
57
|
49
|
>搜索</el-button
|
58
|
50
|
>
|
59
|
|
- <label class="title"><span class="name">日期查询</span> : </label>
|
60
|
|
- <el-date-picker
|
61
|
|
- size="small"
|
62
|
|
- v-model="start_time"
|
63
|
|
- prefix-icon="el-icon-date"
|
64
|
|
- :editable="false"
|
65
|
|
- style="width: 150px"
|
66
|
|
- type="date"
|
67
|
|
- placeholder="选择日期时间"
|
68
|
|
- align="right"
|
69
|
|
- format="yyyy-MM-dd"
|
70
|
|
- value-format="yyyy-MM-dd"
|
71
|
|
- @change="startTimeChange"
|
72
|
|
- ></el-date-picker>
|
73
|
|
- <span class="cellLine"> - </span>
|
74
|
|
- <el-date-picker
|
75
|
|
- size="small"
|
76
|
|
- v-model="end_time"
|
77
|
|
- prefix-icon="el-icon-date"
|
78
|
|
- :editable="false"
|
79
|
|
- style="width: 150px"
|
80
|
|
- type="date"
|
81
|
|
- placeholder="选择日期时间"
|
82
|
|
- align="right"
|
83
|
|
- format="yyyy-MM-dd"
|
84
|
|
- value-format="yyyy-MM-dd"
|
85
|
|
- @change="endTimeChange"
|
86
|
|
- ></el-date-picker>
|
|
51
|
+ <label class="title"><span class="name">日期查询</span> : </label>
|
|
52
|
+ <el-date-picker
|
|
53
|
+ size="small"
|
|
54
|
+ v-model="start_time"
|
|
55
|
+ prefix-icon="el-icon-date"
|
|
56
|
+ :editable="false"
|
|
57
|
+ style="width: 150px;"
|
|
58
|
+ type="date"
|
|
59
|
+ placeholder="选择日期时间"
|
|
60
|
+ align="right"
|
|
61
|
+ format="yyyy-MM-dd"
|
|
62
|
+ value-format="yyyy-MM-dd"
|
|
63
|
+ @change="startTimeChange"
|
|
64
|
+ ></el-date-picker>
|
|
65
|
+ <span class="cellLine"> - </span>
|
|
66
|
+ <el-date-picker
|
|
67
|
+ size="small"
|
|
68
|
+ v-model="end_time"
|
|
69
|
+ prefix-icon="el-icon-date"
|
|
70
|
+ :editable="false"
|
|
71
|
+ style="width: 150px;"
|
|
72
|
+ type="date"
|
|
73
|
+ placeholder="选择日期时间"
|
|
74
|
+ align="right"
|
|
75
|
+ format="yyyy-MM-dd"
|
|
76
|
+ value-format="yyyy-MM-dd"
|
|
77
|
+ @change="endTimeChange"
|
|
78
|
+ ></el-date-picker>
|
|
79
|
+
|
87
|
80
|
</div>
|
88
|
81
|
|
|
82
|
+
|
89
|
83
|
<el-row :gutter="12" style="margin-top: 10px">
|
90
|
84
|
<el-table
|
91
|
85
|
:data="tableData"
|
|
@@ -97,7 +91,7 @@
|
97
|
91
|
:row-style="{ color: '#303133' }"
|
98
|
92
|
:header-cell-style="{
|
99
|
93
|
backgroundColor: 'rgb(245, 247, 250)',
|
100
|
|
- color: '#606266',
|
|
94
|
+ color: '#606266'
|
101
|
95
|
}"
|
102
|
96
|
>
|
103
|
97
|
<el-table-column label="单据编号" align="center" width="200">
|
|
@@ -115,73 +109,66 @@
|
115
|
109
|
</template>
|
116
|
110
|
</el-table-column>
|
117
|
111
|
|
118
|
|
- <el-table-column label="药品名称" align="center">
|
|
112
|
+ <el-table-column label="药品名称" align="center">
|
119
|
113
|
<template slot-scope="scope">
|
120
|
|
- {{ scope.row.drug_name }}
|
|
114
|
+ {{scope.row.drug_name}}
|
121
|
115
|
</template>
|
122
|
116
|
</el-table-column>
|
123
|
117
|
|
124
|
118
|
<el-table-column label="规格型号" align="center">
|
125
|
119
|
<template slot-scope="scope">
|
126
|
|
- <!-- {{scope.row.drug_spec}} -->
|
127
|
|
- {{ scope.row.specification_name }}
|
|
120
|
+ <!-- {{scope.row.drug_spec}} -->
|
|
121
|
+ {{scope.row.specification_name}}
|
128
|
122
|
</template>
|
129
|
123
|
</el-table-column>
|
130
|
124
|
|
|
125
|
+
|
131
|
126
|
<el-table-column label="操作时间" align="center">
|
132
|
127
|
<template slot-scope="scope">
|
133
|
|
- <span>{{ getTime(scope.row.ctime) }}</span>
|
|
128
|
+ <span>{{getTime(scope.row.ctime)}}</span>
|
134
|
129
|
</template>
|
135
|
130
|
</el-table-column>
|
136
|
131
|
<el-table-column label="制单人" align="center">
|
137
|
132
|
<template slot-scope="scope">
|
138
|
|
- {{ getAdminUser(scope.row.creater) }}
|
|
133
|
+ {{getAdminUser(scope.row.creater)}}
|
139
|
134
|
</template>
|
140
|
135
|
</el-table-column>
|
141
|
136
|
<el-table-column label="仓库名称" align="center">
|
142
|
137
|
<template slot-scope="scope">
|
143
|
|
- {{ getStorehouseName(scope.row.storehouse_id) }}
|
|
138
|
+ {{getStorehouseName(scope.row.storehouse_id)}}
|
144
|
139
|
</template>
|
145
|
140
|
</el-table-column>
|
146
|
141
|
<el-table-column label="出货价" align="center">
|
147
|
142
|
<template slot-scope="scope">
|
148
|
|
- <span v-if="org_id == 9919">{{ scope.row.last_price }} </span>
|
149
|
|
- <span v-else>
|
150
|
|
- <span v-if="scope.row.price > 0"> {{ scope.row.price }}</span>
|
151
|
|
- <span v-if="scope.row.price == 0">
|
152
|
|
- {{ getPrice(scope.row.drug_id) }}</span
|
153
|
|
- >
|
154
|
|
- </span>
|
|
143
|
+ <span v-if="org_id == 9919">{{scope.row.last_price}} </span>
|
|
144
|
+ <span v-else>
|
|
145
|
+ <span v-if="scope.row.price >0"> {{scope.row.price}}</span>
|
|
146
|
+ <span v-if="scope.row.price == 0"> {{getPrice(scope.row.drug_id)}}</span>
|
|
147
|
+ </span>
|
155
|
148
|
</template>
|
156
|
149
|
</el-table-column>
|
157
|
150
|
<el-table-column label="数量" align="center">
|
158
|
151
|
<template slot-scope="scope">
|
159
|
|
- {{ scope.row.count }}
|
|
152
|
+ {{scope.row.count}}
|
160
|
153
|
</template>
|
161
|
154
|
</el-table-column>
|
162
|
|
- <el-table-column label="单位" align="center">
|
|
155
|
+ <el-table-column label="单位" align="center">
|
163
|
156
|
<template slot-scope="scope">
|
164
|
|
- {{ scope.row.count_unit }}
|
|
157
|
+ {{scope.row.count_unit}}
|
165
|
158
|
</template>
|
166
|
159
|
</el-table-column>
|
167
|
160
|
<el-table-column label="总价" align="center">
|
168
|
161
|
<template slot-scope="scope">
|
169
|
|
- <span v-if="scope.row.is_total != 1">
|
170
|
|
- <span v-if="org_id == 9919"
|
171
|
|
- >{{ (scope.row.last_price * scope.row.count).toFixed(2) }}
|
172
|
|
- </span>
|
173
|
|
- <span v-if="org_id == 10210"
|
174
|
|
- >{{ (scope.row.price * scope.row.count).toFixed(2) }}
|
175
|
|
- </span>
|
176
|
|
- <span v-if="org_id == 9671"
|
177
|
|
- >{{ (scope.row.price * scope.row.count).toFixed(2) }}
|
178
|
|
- </span>
|
179
|
|
- <span v-if="org_id != 9919 && org_id != 10210 && org_id != 9671">
|
180
|
|
- {{ scope.row.total_price }}
|
181
|
|
- </span>
|
|
162
|
+ <span v-if="scope.row.is_total !=1">
|
|
163
|
+ <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span>
|
|
164
|
+ <span v-if="org_id == 10210 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span>
|
|
165
|
+ <span v-if="org_id == 9671 ">{{(scope.row.price * scope.row.count).toFixed(2)}} </span>
|
|
166
|
+ <span v-if ="org_id!=9919 && org_id!=10210 && org_id!=9671">
|
|
167
|
+ {{scope.row.total_price}}
|
|
168
|
+ </span>
|
182
|
169
|
</span>
|
183
|
170
|
<span v-if="scope.row.is_total == 1">
|
184
|
|
- {{ scope.row.total_price }}
|
|
171
|
+ {{scope.row.total_price}}
|
185
|
172
|
</span>
|
186
|
173
|
</template>
|
187
|
174
|
</el-table-column>
|
|
@@ -190,10 +177,10 @@
|
190
|
177
|
<el-pagination
|
191
|
178
|
@size-change="handleSizeChange"
|
192
|
179
|
@current-change="handleCurrentChange"
|
193
|
|
- :page-sizes="[10, 50, 100, 1000]"
|
|
180
|
+ :page-sizes="[10, 50, 100,1000]"
|
194
|
181
|
:page-size="10"
|
195
|
182
|
background
|
196
|
|
- style="margin-top: 20px; float: right"
|
|
183
|
+ style="margin-top:20px;float: right"
|
197
|
184
|
layout="total, sizes, prev, pager, next, jumper"
|
198
|
185
|
:total="total"
|
199
|
186
|
>
|
|
@@ -476,8 +463,11 @@ export default {
|
476
|
463
|
}
|
477
|
464
|
total_price +=order[i].total_price
|
478
|
465
|
}
|
|
466
|
+
|
479
|
467
|
}
|
|
468
|
+
|
480
|
469
|
}
|
|
470
|
+ console.log("toal_p3232332332233232",total_price)
|
481
|
471
|
order.push({
|
482
|
472
|
warehouse_out_order_number: "合计",
|
483
|
473
|
is_total: 1,
|
|
@@ -489,6 +479,8 @@ export default {
|
489
|
479
|
for(let i=0;i<order.length;i++){
|
490
|
480
|
order[i].total_price = order[i].total_price.toFixed(2)
|
491
|
481
|
}
|
|
482
|
+
|
|
483
|
+ console.log("233223322323322332232323",order)
|
492
|
484
|
this.tableData = order
|
493
|
485
|
|
494
|
486
|
let objInfo = {}
|
|
@@ -542,6 +534,8 @@ export default {
|
542
|
534
|
}
|
543
|
535
|
})
|
544
|
536
|
}
|
|
537
|
+
|
|
538
|
+
|
545
|
539
|
for(let i=0;i<list.length;i++){
|
546
|
540
|
for(let j=0;j<list[i].child.length;j++){
|
547
|
541
|
if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
|
|
@@ -557,8 +551,8 @@ export default {
|
557
|
551
|
this.tableList = list
|
558
|
552
|
var total = response.data.data.total
|
559
|
553
|
this.total = total
|
560
|
|
- }}
|
561
|
|
- )}
|
|
554
|
+ }
|
|
555
|
+ })
|
562
|
556
|
},
|
563
|
557
|
|
564
|
558
|
select(){
|
|
@@ -882,7 +876,7 @@ export default {
|
882
|
876
|
this.houseList = []
|
883
|
877
|
this.getlist()
|
884
|
878
|
}
|
885
|
|
-
|
|
879
|
+ }
|
886
|
880
|
};
|
887
|
881
|
</script>
|
888
|
882
|
|