|
@@ -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,18 +24,26 @@
|
24
|
24
|
</el-button>
|
25
|
25
|
|
26
|
26
|
<div class="cell clearfix">
|
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>
|
|
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>
|
35
|
43
|
</el-select>
|
36
|
44
|
<el-input
|
37
|
45
|
size="small"
|
38
|
|
- style="width: 200px;"
|
|
46
|
+ style="width: 200px"
|
39
|
47
|
class="filter-item"
|
40
|
48
|
v-model.trim="searchKey"
|
41
|
49
|
placeholder="单据编码/制单人/药品名称"
|
|
@@ -48,38 +56,36 @@
|
48
|
56
|
@click="search"
|
49
|
57
|
>搜索</el-button
|
50
|
58
|
>
|
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
|
|
-
|
|
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>
|
80
|
87
|
</div>
|
81
|
88
|
|
82
|
|
-
|
83
|
89
|
<el-row :gutter="12" style="margin-top: 10px">
|
84
|
90
|
<el-table
|
85
|
91
|
:data="tableData"
|
|
@@ -91,7 +97,7 @@
|
91
|
97
|
:row-style="{ color: '#303133' }"
|
92
|
98
|
:header-cell-style="{
|
93
|
99
|
backgroundColor: 'rgb(245, 247, 250)',
|
94
|
|
- color: '#606266'
|
|
100
|
+ color: '#606266',
|
95
|
101
|
}"
|
96
|
102
|
>
|
97
|
103
|
<el-table-column label="单据编号" align="center" width="200">
|
|
@@ -109,66 +115,73 @@
|
109
|
115
|
</template>
|
110
|
116
|
</el-table-column>
|
111
|
117
|
|
112
|
|
- <el-table-column label="药品名称" align="center">
|
|
118
|
+ <el-table-column label="药品名称" align="center">
|
113
|
119
|
<template slot-scope="scope">
|
114
|
|
- {{scope.row.drug_name}}
|
|
120
|
+ {{ scope.row.drug_name }}
|
115
|
121
|
</template>
|
116
|
122
|
</el-table-column>
|
117
|
123
|
|
118
|
124
|
<el-table-column label="规格型号" align="center">
|
119
|
125
|
<template slot-scope="scope">
|
120
|
|
- <!-- {{scope.row.drug_spec}} -->
|
121
|
|
- {{scope.row.specification_name}}
|
|
126
|
+ <!-- {{scope.row.drug_spec}} -->
|
|
127
|
+ {{ scope.row.specification_name }}
|
122
|
128
|
</template>
|
123
|
129
|
</el-table-column>
|
124
|
130
|
|
125
|
|
-
|
126
|
131
|
<el-table-column label="操作时间" align="center">
|
127
|
132
|
<template slot-scope="scope">
|
128
|
|
- <span>{{getTime(scope.row.ctime)}}</span>
|
|
133
|
+ <span>{{ getTime(scope.row.ctime) }}</span>
|
129
|
134
|
</template>
|
130
|
135
|
</el-table-column>
|
131
|
136
|
<el-table-column label="制单人" align="center">
|
132
|
137
|
<template slot-scope="scope">
|
133
|
|
- {{getAdminUser(scope.row.creater)}}
|
|
138
|
+ {{ getAdminUser(scope.row.creater) }}
|
134
|
139
|
</template>
|
135
|
140
|
</el-table-column>
|
136
|
141
|
<el-table-column label="仓库名称" align="center">
|
137
|
142
|
<template slot-scope="scope">
|
138
|
|
- {{getStorehouseName(scope.row.storehouse_id)}}
|
|
143
|
+ {{ getStorehouseName(scope.row.storehouse_id) }}
|
139
|
144
|
</template>
|
140
|
145
|
</el-table-column>
|
141
|
146
|
<el-table-column label="出货价" align="center">
|
142
|
147
|
<template slot-scope="scope">
|
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>
|
|
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>
|
148
|
155
|
</template>
|
149
|
156
|
</el-table-column>
|
150
|
157
|
<el-table-column label="数量" align="center">
|
151
|
158
|
<template slot-scope="scope">
|
152
|
|
- {{scope.row.count}}
|
|
159
|
+ {{ scope.row.count }}
|
153
|
160
|
</template>
|
154
|
161
|
</el-table-column>
|
155
|
|
- <el-table-column label="单位" align="center">
|
|
162
|
+ <el-table-column label="单位" align="center">
|
156
|
163
|
<template slot-scope="scope">
|
157
|
|
- {{scope.row.count_unit}}
|
|
164
|
+ {{ scope.row.count_unit }}
|
158
|
165
|
</template>
|
159
|
166
|
</el-table-column>
|
160
|
167
|
<el-table-column label="总价" align="center">
|
161
|
168
|
<template slot-scope="scope">
|
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>
|
|
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>
|
169
|
182
|
</span>
|
170
|
183
|
<span v-if="scope.row.is_total == 1">
|
171
|
|
- {{scope.row.total_price}}
|
|
184
|
+ {{ scope.row.total_price }}
|
172
|
185
|
</span>
|
173
|
186
|
</template>
|
174
|
187
|
</el-table-column>
|
|
@@ -177,10 +190,10 @@
|
177
|
190
|
<el-pagination
|
178
|
191
|
@size-change="handleSizeChange"
|
179
|
192
|
@current-change="handleCurrentChange"
|
180
|
|
- :page-sizes="[10, 50, 100,1000]"
|
|
193
|
+ :page-sizes="[10, 50, 100, 1000]"
|
181
|
194
|
:page-size="10"
|
182
|
195
|
background
|
183
|
|
- style="margin-top:20px;float: right"
|
|
196
|
+ style="margin-top: 20px; float: right"
|
184
|
197
|
layout="total, sizes, prev, pager, next, jumper"
|
185
|
198
|
:total="total"
|
186
|
199
|
>
|
|
@@ -463,11 +476,8 @@ export default {
|
463
|
476
|
}
|
464
|
477
|
total_price +=order[i].total_price
|
465
|
478
|
}
|
466
|
|
-
|
467
|
479
|
}
|
468
|
|
-
|
469
|
480
|
}
|
470
|
|
- console.log("toal_p3232332332233232",total_price)
|
471
|
481
|
order.push({
|
472
|
482
|
warehouse_out_order_number: "合计",
|
473
|
483
|
is_total: 1,
|
|
@@ -479,8 +489,6 @@ export default {
|
479
|
489
|
for(let i=0;i<order.length;i++){
|
480
|
490
|
order[i].total_price = order[i].total_price.toFixed(2)
|
481
|
491
|
}
|
482
|
|
-
|
483
|
|
- console.log("233223322323322332232323",order)
|
484
|
492
|
this.tableData = order
|
485
|
493
|
|
486
|
494
|
let objInfo = {}
|
|
@@ -534,8 +542,6 @@ export default {
|
534
|
542
|
}
|
535
|
543
|
})
|
536
|
544
|
}
|
537
|
|
-
|
538
|
|
-
|
539
|
545
|
for(let i=0;i<list.length;i++){
|
540
|
546
|
for(let j=0;j<list[i].child.length;j++){
|
541
|
547
|
if(list[i].child[j].count!=null || list[i].child[j].count != "" || list[i].child[j].count!=0){
|
|
@@ -551,8 +557,8 @@ export default {
|
551
|
557
|
this.tableList = list
|
552
|
558
|
var total = response.data.data.total
|
553
|
559
|
this.total = total
|
554
|
|
- }
|
555
|
|
- })
|
|
560
|
+ }}
|
|
561
|
+ )}
|
556
|
562
|
},
|
557
|
563
|
|
558
|
564
|
select(){
|
|
@@ -876,7 +882,7 @@ export default {
|
876
|
882
|
this.houseList = []
|
877
|
883
|
this.getlist()
|
878
|
884
|
}
|
879
|
|
- }
|
|
885
|
+
|
880
|
886
|
};
|
881
|
887
|
</script>
|
882
|
888
|
|