|
@@ -11,6 +11,14 @@
|
11
|
11
|
>设置
|
12
|
12
|
</el-button
|
13
|
13
|
>
|
|
14
|
+ <!-- <el-button
|
|
15
|
+ size="small"
|
|
16
|
+ class="filter-item"
|
|
17
|
+ type="primary"
|
|
18
|
+ icon="el-icon-search"
|
|
19
|
+ @click="exportStock"
|
|
20
|
+ >导出
|
|
21
|
+ </el-button> -->
|
14
|
22
|
</div>
|
15
|
23
|
<div class="app-container ">
|
16
|
24
|
<div class="cell clearfix">
|
|
@@ -167,7 +175,8 @@
|
167
|
175
|
WarehouseInfo: {
|
168
|
176
|
loading: false,
|
169
|
177
|
warehouseInfoDate: []
|
170
|
|
- }
|
|
178
|
+ },
|
|
179
|
+ tableData:[]
|
171
|
180
|
}
|
172
|
181
|
},
|
173
|
182
|
methods: {
|
|
@@ -234,12 +243,17 @@
|
234
|
243
|
} else {
|
235
|
244
|
this.WarehouseInfo.loading = false
|
236
|
245
|
this.total = response.data.data.total
|
|
246
|
+ var arr = []
|
237
|
247
|
for (let i = 0; i < response.data.data.list.length; i++) {
|
238
|
|
-
|
239
|
248
|
this.WarehouseInfo.warehouseInfoDate.push(
|
240
|
249
|
response.data.data.list[i]
|
241
|
250
|
)
|
|
251
|
+ arr.push(response.data.data.list[i])
|
242
|
252
|
}
|
|
253
|
+ console.log("数据源头",arr)
|
|
254
|
+ // for(let i=0;i<arr.length;i++){
|
|
255
|
+ // arr[i].stockInCount =
|
|
256
|
+ // }
|
243
|
257
|
this.handleSpanTempArr()
|
244
|
258
|
}
|
245
|
259
|
})
|
|
@@ -325,7 +339,29 @@
|
325
|
339
|
this.GetAllDrugStockQueryList()
|
326
|
340
|
}, setting: function() {
|
327
|
341
|
this.$refs.dialog.show()
|
328
|
|
- }
|
|
342
|
+ },
|
|
343
|
+ // exportStock(){
|
|
344
|
+ // import('@/vendor/Export2Excel').then(excel => {
|
|
345
|
+ // const tHeader = ['药品名称', '规格名称', '入库数量','入库退货','实际入库','出库数量','出库退货','实际出库','剩余库存']
|
|
346
|
+ // const filterVal = ['index', 'dialysis_no', 'name','drug_name','drug_spec','Total','Count','margin','margin']
|
|
347
|
+ // // for(let i=0;i<this.tableData.length;i++){
|
|
348
|
+ // // this.tableData[i].margin = (this.tableData[i].Total?this.tableData[i].Total:0) - this.tableData[i].Count
|
|
349
|
+ // // }
|
|
350
|
+
|
|
351
|
+ // const data = this.formatJson(filterVal, this.tableData)
|
|
352
|
+
|
|
353
|
+ // excel.export_json_to_excel({
|
|
354
|
+ // header: tHeader,
|
|
355
|
+ // data,
|
|
356
|
+ // filename: '自备药查询'
|
|
357
|
+ // })
|
|
358
|
+ // this.downloadLoading = false
|
|
359
|
+ // })
|
|
360
|
+ // },
|
|
361
|
+ // formatJson(filterVal, jsonData) {
|
|
362
|
+ // return jsonData.map(v => filterVal.map(j => v[j]));
|
|
363
|
+ // },
|
|
364
|
+
|
329
|
365
|
}
|
330
|
366
|
}
|
331
|
367
|
</script>
|