|
@@ -42,13 +42,13 @@
|
42
|
42
|
</td>
|
43
|
43
|
|
44
|
44
|
<td style="line-height: 50px">
|
45
|
|
- {{item.warehousing_count}}
|
|
45
|
+ {{getCount(item.drug_id)}}
|
46
|
46
|
</td>
|
47
|
47
|
<td style="line-height:50px">
|
48
|
48
|
{{item.price}}
|
49
|
49
|
</td>
|
50
|
50
|
<td style="line-height:50px">
|
51
|
|
- {{(item.warehousing_count*item.price).toFixed(2)}}
|
|
51
|
+ {{(getCount(item.drug_id)*item.price).toFixed(2)}}
|
52
|
52
|
</td>
|
53
|
53
|
<td style="line-height: 50px">
|
54
|
54
|
{{item.remark}}
|
|
@@ -89,7 +89,7 @@
|
89
|
89
|
import { jsGetAge, uParseTime } from '@/utils/tools'
|
90
|
90
|
import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
91
|
91
|
import print from 'print-js'
|
92
|
|
- import { getDrugIndetail,getDrugWarehouseInfoPrint} from "@/api/drug/drug_stock"
|
|
92
|
+ import { getDrugIndetail,getDrugWarehouseInfoPrint,getDrugCountList} from "@/api/drug/drug_stock"
|
93
|
93
|
export default {
|
94
|
94
|
name: 'dialysisPrintOrder',
|
95
|
95
|
components: {
|
|
@@ -115,6 +115,7 @@
|
115
|
115
|
limit:this.$route.query.limit,
|
116
|
116
|
page:this.$route.query.page,
|
117
|
117
|
cancelStockDate:[],
|
|
118
|
+ minCount:[],
|
118
|
119
|
}
|
119
|
120
|
},
|
120
|
121
|
methods: {
|
|
@@ -218,7 +219,7 @@
|
218
|
219
|
getTotal(){
|
219
|
220
|
var total = 0
|
220
|
221
|
for(let i=0;i<this.cancelStockDate.length;i++){
|
221
|
|
- total += this.cancelStockDate[i].price*this.cancelStockDate[i].warehousing_count
|
|
222
|
+ total += this.cancelStockDate[i].price*getCount(this.cancelStockDate[i].drug_id)
|
222
|
223
|
}
|
223
|
224
|
return total
|
224
|
225
|
},
|
|
@@ -238,7 +239,32 @@
|
238
|
239
|
})
|
239
|
240
|
|
240
|
241
|
|
241
|
|
- }
|
|
242
|
+ },
|
|
243
|
+ getCount(drug_id){
|
|
244
|
+ var total = 0
|
|
245
|
+ for(let i=0;i<this.minCount.length;i++){
|
|
246
|
+ if(drug_id == this.minCount[i].drug_id){
|
|
247
|
+ total += this.minCount[i].warehousing_count
|
|
248
|
+ }
|
|
249
|
+ }
|
|
250
|
+ return total
|
|
251
|
+ },
|
|
252
|
+ getDrugCountList(){
|
|
253
|
+ var params = {
|
|
254
|
+ keyword: this.keywords,
|
|
255
|
+ start_time:this.start_time,
|
|
256
|
+ end_time:this.end_time,
|
|
257
|
+ }
|
|
258
|
+ console.log("paramsw2ww",params)
|
|
259
|
+ getDrugCountList(params).then(response=>{
|
|
260
|
+ if(response.data.state == 1){
|
|
261
|
+ var minCount = response.data.data.minCount
|
|
262
|
+ console.log("minCount",minCount)
|
|
263
|
+ this.minCount = minCount
|
|
264
|
+
|
|
265
|
+ }
|
|
266
|
+ })
|
|
267
|
+ },
|
242
|
268
|
},
|
243
|
269
|
created() {
|
244
|
270
|
var xtuser = this.$store.getters.xt_user
|
|
@@ -247,7 +273,7 @@
|
247
|
273
|
|
248
|
274
|
|
249
|
275
|
this.getDrugWarehouseInfoPrint()
|
250
|
|
-
|
|
276
|
+ this.getDrugCountList()
|
251
|
277
|
|
252
|
278
|
}
|
253
|
279
|
|