hospitalTrmedwv-controller.js
7.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
var express = require('express');
var router = express.Router();
var client = require('../client');
var api = require('./api').url;
// //取得入库收货列表
// router.get('/searchList', function(req, res, next) {
// client.get(api.hospital_warehouse, { parameters: req.query}, function (data) { res.send(data); }, req.session);
// });
// //取得入库收货详细
// router.get('/searchListDetail/:id', function(req, res, next) {
// client.get(api.hospital_warehousedetail, { path: { id: req.params.id }}, function (data) { res.send(data); }, req.session);
// });
// //取得入库收货商品列表
// router.get('/distrbutorwarehouseGoodsList', function(req, res, next) {
// client.get(api.hospital_distrbutorwarehouseGoodsList, { parameters: req.query}, function (data) { res.send(data); }, req.session);
// });
// // 供应商
// router.get('/supplierList', function(req, res, next) {
// client.get(api.hospital_supplierList, { parameters: req.query}, function (data) { res.send(data); }, req.session);
// });
// // 单据类型
// router.get('/billTypeList', function(req, res, next) {
// client.get(api.hospital_getDistributorBillCategory, { parameters: req.query}, function (data) { res.send(data); }, req.session);
// });
//获取医院入库列表
router.get('/listTrmedwv', function(req, res, next) {
client.get(api.hospital_listTrmedwv, { parameters: req.query}, function (data) { res.send(data); }, req.session);
});
//获取医院入库详细
router.get('/trmedwv/:id', function(req, res, next) {
client.get(api.hospital_trmedwv, { path: { id: req.params.id }}, function (data) { res.send(data); }, req.session);
});
//导出医院入库详细
router.get('/exportXml', function(req, res, next) {
client.post(api.hospital_exportXml, { data: req.query }, function (data) {
//res.set('Content-Type', 'application/octet-stream');
res.set('Content-Type', 'application/x-download');
res.set("Content-Disposition", "attachment; filename=" + Math.random().toString(32).substr(2)+'.xml');
res.send(data);
}, req.session);
});
router.get('/xml',function(req,res){
res.send(fs.readFile('a.xml'))
})
//取得医院入库商品列表
router.get('/listTrmedwvdetailes', function(req, res, next) {
client.get(api.hospital_listTrmedwvdetailes, { parameters: req.query}, function (data) { res.send(data); }, req.session);
});
// 单据类型
router.get('/listMfhdept', function(req, res, next) {
client.get(api.hospital_listMfhdeptes, { parameters: req.query}, function (data) { res.send(data); }, req.session);
});
router.get('/listMfhdept', function(req, res, next) {
client.get(api.hospital_listMfhdeptes, { parameters: req.query}, function (data) { res.send(data); }, req.session);
});
// 1-5 赵志杰 医院入库单明细查询
router.post('/getwvdetailes', function(req, res, next) {
client.post(api.hospital_trmedwv_getwvdetailes, { data: req.body }, function (data) { res.send(data); }, req.session);
});
// 签收 1-5 赵志杰
router.post('/saveMvOrderDetailForOne', function(req, res, next) {
client.post(api.hospital_trmedwv_saveMvOrderDetailForOne, { data: req.body }, function (data) { res.send(data); }, req.session);
});
// 一键签收完成
router.post('/saveMvOrderDetailForMore', function(req, res, next) {
client.post(api.hospital_trmedwv_saveMvOrderDetailForMore, { data: req.body }, function (data) { res.send(data); }, req.session);
});
// 检测签收完成 1-5 赵志杰
router.post('/checkMvOrder', function(req, res, next) {
client.post(api.hospital_trmedwv_checkMvOrder, { data: req.body }, function (data) { res.send(data); }, req.session);
});
// 签收确定 1-5 赵志杰
router.post('/saveMvOrder', function(req, res, next) {
client.post(api.hospital_trmedwv_saveMvOrder, { data: req.body }, function (data) { res.send(data); }, req.session);
});
// 上传采购计划
// router.get('/listTrmedJhsc', function(req, res, next) {
// client.get(api.hospital_trmedwv_listTrmedJhsc, { parameters: req.query}, function (data) { res.send(data); }, req.session);
// });
router.post('/listTrmedJhsc', function(req, res, next) {
client.post(api.hospital_trmedwv_listTrmedJhsc, { data: req.body }, function (data) { res.send(data); }, req.session);
});
router.get('/ChangeWvToTrmedJhsc', function(req, res, next) {
client.get(api.hospital_trmedwv_ChangeWvToTrmedJhsc, { parameters: req.query}, function (data) { res.send(data); }, req.session);
});
// 医院入库转采购计划上传明细列表
router.get('/listTrmedJhscdetail', function(req, res, next) {
client.get(api.hospital_trmedwv_listTrmedJhscdetail, { parameters: req.query}, function (data) { res.send(data); }, req.session);
});
router.get('/findTrmedJhscBybillno', function(req, res, next) {
client.get(api.hospital_trmedwv_findTrmedJhscBybillno, { parameters: req.query}, function (data) { res.send(data); }, req.session);
});
router.post('/changeTrmedJhscDetail', function(req, res, next) {
client.post(api.hospital_trmedwv_changeTrmedJhscDetail, { data: req.body }, function (data) { res.send(data); }, req.session);
});
// 上传采购计划异常 查询
router.post('/findJhscByScData', function(req, res, next) {
client.post(api.hospital_trmedwv_findJhscByScData, { data: req.body }, function (data) { res.send(data); }, req.session);
});
// 上传采购计划异常 导出
router.post('/exportJhscByScData', function(req, res, next) {
client.post(api.hospital_trmedwv_exportJhscByScData, { data: req.body }, function (data) { res.send(data); }, req.session);
});
router.post('/findSupplierByMed', function(req, res, next) {
client.post(api.hospital_trmedwv_findSupplierByMed, { data: req.body }, function (data) { res.send(data); }, req.session);
});
router.get('/uploadMedJhsc',function(req,res,next){
client.get(api.hospital_trmedwv_uploadMedJhsc+req.query.billnos, {parameters:req.query }, function (data) {
res.send(data);
}, req.session);
});
/*出库审核start*/
//出库审核-列表
router.post('/getTrvariationdoList', function(req, res, next) {
client.post(api.hospital_trvariationdo_getTrvariationdoList, { data: req.body }, function (data) { res.send(data); }, req.session);
});
//出库审核-审核
router.post('/auditTravriationdo', function(req, res, next) {
client.post(api.hospital_trvariationdo_auditTravriationdo, { data: req.body }, function (data) { res.send(data); }, req.session);
});
//出库审核-驳回
router.post('/rejectTrvariationdo', function(req, res, next) {
client.post(api.hospital_trvariationdo_rejectTrvariationdo, { data: req.body }, function (data) { res.send(data); }, req.session);
});
//出库审核-详细页面头部
router.get('/getTrvariationdo/:guid', function(req, res, next) {
client.get(api.hospital_trvariationdo_getTrvariationdo, { path: { guid: req.params.guid }}, function (data) { res.send(data); }, req.session);
});
//出库审核-详细页面列表
router.post('/getTrvariationdoDetailList', function(req, res, next) {
client.post(api.hospital_trvariationdo_getTrvariationdoDetailList, { data: req.body }, function (data) { res.send(data); }, req.session);
});
/*出库审核end*/
module.exports = router;