|
@@ -1270,66 +1270,136 @@ export default {
|
1270
|
1270
|
this.$router.push("/drugs/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keyword+"&storehouse_id="+this.storehouse_id+"&page="+this.page+"&limit="+this.limit+"&good_type="+this.good_type)
|
1271
|
1271
|
},
|
1272
|
1272
|
exportStock() {
|
1273
|
|
- console.log("tablelist23322332",this.tableList)
|
1274
|
|
-
|
1275
|
|
- if(this.tableList!=null && this.tableList.length > 0){
|
1276
|
|
- for(let i=0;i<this.tableList.length;i++){
|
1277
|
|
- this.tableList[i].index = i +1
|
1278
|
|
- this.tableList[i].drug_type_name = this.getDrugTypeName(this.tableList[i].drug_type)
|
1279
|
|
- this.tableList[i].specification_name = this.tableList[i].dose + this.tableList[i].dose_unit + "*" +this.tableList[i].min_number + this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
|
1280
|
|
- this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
|
1281
|
|
- this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
|
1282
|
|
- this.tableList[i].stock_in_count = this.getStockIn(this.tableList[i].drug_stock_count, this.tableList[i].max_unit, this.tableList[i].min_unit,this.tableList[i].min_number);
|
1283
|
|
- this.tableList[i].stock_out_count = this.getActCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
1284
|
|
- this.tableList[i].cancle_out_count = this.getCancleOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
1285
|
|
- this.tableList[i].act_cout = this.getStockOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number,this.tableList[i].drug_cancel_stock_info)
|
1286
|
|
- this.tableList[i].over_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
1287
|
|
- this.tableList[i].sum_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
1288
|
|
- }
|
|
1273
|
+ console.log("中共人家哈哈哈哈哈哈",this.tableList)
|
|
1274
|
+
|
|
1275
|
+ if(this.org_id!=0&&this.org_id!=10697){
|
|
1276
|
+ if(this.tableList!=null && this.tableList.length > 0){
|
|
1277
|
+ for(let i=0;i<this.tableList.length;i++){
|
|
1278
|
+ this.tableList[i].index = i +1
|
|
1279
|
+ this.tableList[i].drug_type_name = this.getDrugTypeName(this.tableList[i].drug_type)
|
|
1280
|
+ this.tableList[i].specification_name = this.tableList[i].dose + this.tableList[i].dose_unit + "*" +this.tableList[i].min_number + this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
|
|
1281
|
+ this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
|
|
1282
|
+ this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
|
|
1283
|
+ this.tableList[i].stock_in_count = this.getStockIn(this.tableList[i].drug_stock_count, this.tableList[i].max_unit, this.tableList[i].min_unit,this.tableList[i].min_number);
|
|
1284
|
+ this.tableList[i].stock_out_count = this.getActCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
|
1285
|
+ this.tableList[i].cancle_out_count = this.getCancleOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
|
1286
|
+ this.tableList[i].act_cout = this.getStockOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number,this.tableList[i].drug_cancel_stock_info)
|
|
1287
|
+ this.tableList[i].over_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
|
1288
|
+ this.tableList[i].sum_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
|
1289
|
+ }
|
|
1290
|
+ }
|
|
1291
|
+
|
|
1292
|
+ import("@/vendor/Export2Excel").then((excel) => {
|
|
1293
|
+ const tHeader = [
|
|
1294
|
+ "序号",
|
|
1295
|
+ "药品类型",
|
|
1296
|
+ "药品名称",
|
|
1297
|
+ "规格&单位",
|
|
1298
|
+ "生产厂商",
|
|
1299
|
+ "经销商",
|
|
1300
|
+ "批准文号",
|
|
1301
|
+ "国家编码",
|
|
1302
|
+ "入库数量",
|
|
1303
|
+ "出库数量",
|
|
1304
|
+ "退库数量",
|
|
1305
|
+ "实际出库",
|
|
1306
|
+ "剩余库存",
|
|
1307
|
+ "总库存",
|
|
1308
|
+ ];
|
|
1309
|
+ const filterVal = [
|
|
1310
|
+ "index",
|
|
1311
|
+ "drug_type_name",
|
|
1312
|
+ "drug_name",
|
|
1313
|
+ "specification_name",
|
|
1314
|
+ "manufacturer_name",
|
|
1315
|
+ "dealer_name",
|
|
1316
|
+ "number",
|
|
1317
|
+ "medical_insurance_number",
|
|
1318
|
+ "stock_in_count",
|
|
1319
|
+ "stock_out_count",
|
|
1320
|
+ "cancle_out_count",
|
|
1321
|
+ "act_cout",
|
|
1322
|
+ "over_count",
|
|
1323
|
+ "sum_count",
|
|
1324
|
+ ];
|
|
1325
|
+
|
|
1326
|
+ const data = this.formatJson(filterVal, this.tableList);
|
|
1327
|
+ excel.export_json_to_excel({
|
|
1328
|
+ header: tHeader,
|
|
1329
|
+ data,
|
|
1330
|
+ filename: "药品查询",
|
|
1331
|
+ });
|
|
1332
|
+ this.downloadLoading = false;
|
|
1333
|
+ });
|
1289
|
1334
|
}
|
|
1335
|
+
|
|
1336
|
+ if(this.org_id == 0 || this.org_id == 10697){
|
|
1337
|
+
|
|
1338
|
+ if(this.tableList!=null && this.tableList.length > 0){
|
|
1339
|
+ for(let i=0;i<this.tableList.length;i++){
|
|
1340
|
+ this.tableList[i].index = i +1
|
|
1341
|
+ this.tableList[i].medical_code = this.getMedicalInsuranceLeve(this.tableList[i].medical_insurance_level)
|
|
1342
|
+ this.tableList[i].drug_type_name = this.getDrugTypeName(this.tableList[i].drug_type)
|
|
1343
|
+ this.tableList[i].specification_name = this.tableList[i].dose + this.tableList[i].dose_unit + "*" +this.tableList[i].min_number + this.tableList[i].min_unit +"/"+this.tableList[i].max_unit
|
|
1344
|
+ this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
|
|
1345
|
+ this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
|
|
1346
|
+ this.tableList[i].stock_in_count = this.getStockIn(this.tableList[i].drug_stock_count, this.tableList[i].max_unit, this.tableList[i].min_unit,this.tableList[i].min_number);
|
|
1347
|
+ this.tableList[i].stock_out_count = this.getActCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
|
1348
|
+ this.tableList[i].cancle_out_count = this.getCancleOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
|
1349
|
+ this.tableList[i].act_cout = this.getStockOut(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number,this.tableList[i].drug_cancel_stock_info)
|
|
1350
|
+ this.tableList[i].over_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
|
1351
|
+ this.tableList[i].sum_count = this.getOverCount(this.tableList[i].drug_stock_count,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
|
|
1352
|
+ }
|
|
1353
|
+ }
|
1290
|
1354
|
|
1291
|
|
- import("@/vendor/Export2Excel").then((excel) => {
|
1292
|
|
- const tHeader = [
|
1293
|
|
- "序号",
|
1294
|
|
- "药品类型",
|
1295
|
|
- "药品名称",
|
1296
|
|
- "规格&单位",
|
1297
|
|
- "生产厂商",
|
1298
|
|
- "经销商",
|
1299
|
|
- "批准文号",
|
1300
|
|
- "国家编码",
|
1301
|
|
- "入库数量",
|
1302
|
|
- "出库数量",
|
1303
|
|
- "退库数量",
|
1304
|
|
- "实际出库",
|
1305
|
|
- "剩余库存",
|
1306
|
|
- "总库存",
|
1307
|
|
- ];
|
1308
|
|
- const filterVal = [
|
1309
|
|
- "index",
|
1310
|
|
- "drug_type_name",
|
1311
|
|
- "drug_name",
|
1312
|
|
- "specification_name",
|
1313
|
|
- "manufacturer_name",
|
1314
|
|
- "dealer_name",
|
1315
|
|
- "number",
|
1316
|
|
- "medical_insurance_number",
|
1317
|
|
- "stock_in_count",
|
1318
|
|
- "stock_out_count",
|
1319
|
|
- "cancle_out_count",
|
1320
|
|
- "act_cout",
|
1321
|
|
- "over_count",
|
1322
|
|
- "sum_count",
|
1323
|
|
- ];
|
|
1355
|
+ import("@/vendor/Export2Excel").then((excel) => {
|
|
1356
|
+ const tHeader = [
|
|
1357
|
+ "序号",
|
|
1358
|
+ '医保等级',
|
|
1359
|
+ "药品类型",
|
|
1360
|
+ "药品名称",
|
|
1361
|
+ "规格&单位",
|
|
1362
|
+ "零售价",
|
|
1363
|
+ "生产厂商",
|
|
1364
|
+ "经销商",
|
|
1365
|
+ "批准文号",
|
|
1366
|
+ "国家编码",
|
|
1367
|
+ "入库数量",
|
|
1368
|
+ "出库数量",
|
|
1369
|
+ "退库数量",
|
|
1370
|
+ "实际出库",
|
|
1371
|
+ "剩余库存",
|
|
1372
|
+ "总库存",
|
|
1373
|
+ ];
|
|
1374
|
+ const filterVal = [
|
|
1375
|
+ "index",
|
|
1376
|
+ "medical_code",
|
|
1377
|
+ "drug_type_name",
|
|
1378
|
+ "drug_name",
|
|
1379
|
+ "specification_name",
|
|
1380
|
+ "retail_price",
|
|
1381
|
+ "manufacturer_name",
|
|
1382
|
+ "dealer_name",
|
|
1383
|
+ "number",
|
|
1384
|
+ "medical_insurance_number",
|
|
1385
|
+ "stock_in_count",
|
|
1386
|
+ "stock_out_count",
|
|
1387
|
+ "cancle_out_count",
|
|
1388
|
+ "act_cout",
|
|
1389
|
+ "over_count",
|
|
1390
|
+ "sum_count",
|
|
1391
|
+ ];
|
1324
|
1392
|
|
1325
|
|
- const data = this.formatJson(filterVal, this.tableList);
|
1326
|
|
- excel.export_json_to_excel({
|
1327
|
|
- header: tHeader,
|
1328
|
|
- data,
|
1329
|
|
- filename: "药品查询",
|
|
1393
|
+ const data = this.formatJson(filterVal, this.tableList);
|
|
1394
|
+ excel.export_json_to_excel({
|
|
1395
|
+ header: tHeader,
|
|
1396
|
+ data,
|
|
1397
|
+ filename: "药品查询",
|
|
1398
|
+ });
|
|
1399
|
+ this.downloadLoading = false;
|
1330
|
1400
|
});
|
1331
|
|
- this.downloadLoading = false;
|
1332
|
|
- });
|
|
1401
|
+ }
|
|
1402
|
+
|
1333
|
1403
|
},
|
1334
|
1404
|
formatJson(filterVal, jsonData) {
|
1335
|
1405
|
return jsonData.map((v) => filterVal.map((j) => v[j]));
|