Ver código fonte

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

28169 11 meses atrás
pai
commit
6145be03e0

+ 38 - 9
src/xt_pages/outpatientTool/drugChange.vue Ver arquivo

@@ -14,7 +14,6 @@
14 14
           align="right"
15 15
           format="yyyy-MM-dd"
16 16
           value-format="yyyy-MM-dd"
17
-          @change="startTimeChange"
18 17
         ></el-date-picker>-
19 18
         <el-date-picker
20 19
           size="small"
@@ -27,7 +26,6 @@
27 26
           align="right"
28 27
           format="yyyy-MM-dd"
29 28
           value-format="yyyy-MM-dd"
30
-          @change="endTimeChange"
31 29
         ></el-date-picker>
32 30
       </div>
33 31
 
@@ -38,7 +36,7 @@
38 36
                    style="width:100px;margin-left:10px;" @change="changeStock">
39 37
           <el-option
40 38
             label="不限"
41
-            value="0">
39
+            value="3">
42 40
           </el-option>
43 41
           <el-option
44 42
             v-for="item,index in items"
@@ -55,7 +53,7 @@
55 53
                    style="width:100px;margin-left:10px;" @change="change">
56 54
           <el-option
57 55
             label="不限"
58
-            value="0">
56
+            value="3">
59 57
           </el-option>
60 58
           <el-option
61 59
             v-for="item,index in changes"
@@ -67,7 +65,7 @@
67 65
       </div>
68 66
       <div>
69 67
         <el-button type="primary" @click="query()">查询</el-button>
70
-        <el-button type="primary" @click="change_stock()">变更</el-button>
68
+        <el-button type="primary" @click="change_stock()">销售变更</el-button>
71 69
         <el-button type="primary" @click="exportdata()">导出</el-button>
72 70
 
73 71
         <!--        <el-button type="primary" @click="change()">变更</el-button>-->
@@ -140,7 +138,7 @@
140 138
 
141 139
       <el-table-column label="操作" width="200">
142 140
         <template slot-scope="scope">
143
-          <el-button v-if="!scope.row.is_sale || scope.row.is_sale == 0" type="primary" @click="sigle_stock(scope.row)">盘存</el-button>
141
+          <el-button v-if="!scope.row.is_sale || scope.row.is_sale == 0 || scope.row.is_bg == 0" type="primary" @click="sigle_stock(scope.row)">销售变更</el-button>
144 142
           <el-button type="primary" @click="deleteStock(scope.row)">删除</el-button>
145 143
         </template>
146 144
       </el-table-column>
@@ -243,14 +241,15 @@ export default {
243 241
     return {
244 242
       drugTypeList: [{ id: 0, name: "全部" }],
245 243
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
246
-      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
244
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 3, 0).toLocaleDateString('en-CA'),
245
+
247 246
       tableData: [],
248
-      change_type:"0",
247
+      change_type:"3",
249 248
       selection:[],
250 249
       page:1,
251 250
       limit:10,
252 251
       value:0,
253
-      is_sale:"0",
252
+      is_sale:"3",
254 253
       items: [
255 254
         { id: 1, name: '已销售' },
256 255
         { id: 2, name: '已销售退货' },
@@ -264,7 +263,37 @@ export default {
264 263
   },
265 264
   methods: {
266 265
     deleteStock(row){
266
+      let ids  = row.id
267
+      var that = this;
268
+      let params = {
269
+        ids:ids,
270
+        admin_user_id:this.$store.getters.xt_user.user.id
271
+      };
272
+      this.isloading = true
273
+      axios.get('http://127.0.0.1:9532/api/delete_xs_bg',{params:params}).then(function(response) {
274
+        if (response.data.state == 0) {
275
+          this.isloading = false
267 276
 
277
+          that.$message.error(response.data.data.msg);
278
+          return false
279
+        } else {
280
+          this.isloading = false
281
+          if(response.data.data.failed_code == -10){
282
+            that.$confirm(response.data.data.msg, '医保错误信息', {
283
+              confirmButtonText: '确 定',
284
+              type: 'warning'
285
+            }).then(() => {
286
+
287
+            }).catch(() => {
288
+            })
289
+          }else{
290
+            that.GetDrugStock()
291
+
292
+
293
+          }
294
+        }
295
+      }).catch(function(error) {
296
+      })
268 297
 
269 298
 
270 299
     },

+ 630 - 34
src/xt_pages/outpatientTool/drugQuery.vue Ver arquivo

@@ -34,8 +34,8 @@
34 34
 
35 35
       <div>
36 36
         <div>查询类型:</div>
37
-        <el-select size="small" v-model="sale_type" placeholder="请选择"
38
-                   style="width:100px;margin-left:10px;" @change="changeStock">
37
+        <el-select size="small" v-model="stock_type" placeholder="请选择"
38
+                   style="width:100px;margin-left:10px;" @change="changeStockType">
39 39
           <el-option
40 40
             v-for="item,index in items"
41 41
             :key="index"
@@ -47,82 +47,497 @@
47 47
 
48 48
       <div>
49 49
         <div>药品:</div>
50
-        <el-select size="small" v-model="change_type" placeholder="请选择"
50
+        <el-select size="small" v-model="drug_id" placeholder="请选择"
51 51
                    style="width:100px;margin-left:10px;" @change="change">
52 52
           <el-option
53
-            v-for="item,index in changes"
53
+            v-for="item,index in drugs"
54 54
             :key="index"
55
-            :label="item.name"
55
+            :label="item.drug_name"
56 56
             :value="item.id">
57 57
           </el-option>
58 58
         </el-select>
59 59
       </div>
60 60
       <div>
61 61
         <el-button type="primary" @click="query()">查询</el-button>
62
-        <el-button type="primary" @click="stock()">变更</el-button>
63
-        <el-button type="primary" @click="exportdata()">导出</el-button>
64
-
65
-        <!--        <el-button type="primary" @click="change()">变更</el-button>-->
66 62
       </div>
67 63
     </div>
68
-    <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
64
+    <el-table v-if="stock_type == 1" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
69 65
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
70 66
               max-height="600"
71 67
               highlight-current-row>
72 68
       <el-table-column align="center" prop="name" label="药品名称">
73
-        <template slot-scope="scope"></template>
69
+        <template slot-scope="scope">{{scope.row.medinsListName}}</template>
70
+      </el-table-column>
71
+      <el-table-column align="center" prop="name" label="国家编码">
72
+        <template slot-scope="scope">{{scope.row.medListCodg}}</template>
74 73
       </el-table-column>
75
-      <el-table-column align="center" prop="name" label="药品类型">
76
-        <template slot-scope="scope"></template>
74
+      <el-table-column align="center" prop="name" label="库存数量">
75
+        <template slot-scope="scope">
76
+          <div>{{scope.row.invCnt}}</div>
77
+        </template>
78
+      </el-table-column>
79
+
80
+      <el-table-column align="center" prop="name" label="更新时间">
81
+        <template slot-scope="scope">
82
+          <div>{{scope.row.updtTime}}</div>
83
+        </template>
77 84
       </el-table-column>
78
-      <el-table-column align="center" prop="name" label="规格单位">
79
-        <template slot-scope="scope"></template>
85
+
86
+
87
+      <el-table-column align="center" prop="total" label="生产日期">
88
+        <template slot-scope="scope">
89
+          <div>{{scope.row.manuDate}}</div>
90
+        </template>
91
+      </el-table-column>
92
+
93
+
94
+      <el-table-column align="center" prop="total" label="记录号">
95
+        <template slot-scope="scope">
96
+          <div>{{scope.row.rid}}</div>
97
+        </template>
98
+      </el-table-column>
99
+
100
+
101
+      <el-table-column align="center" prop="total" label="库存日期">
102
+        <template slot-scope="scope">
103
+          <div>{{scope.row.invdate}}</div>
104
+        </template>
105
+      </el-table-column>
106
+
107
+      <el-table-column align="center" prop="total" label="有效标志">
108
+        <template slot-scope="scope">
109
+          <div>{{scope.row.valiFlag}}</div>
110
+        </template>
111
+      </el-table-column>
112
+      <el-table-column align="center" prop="total" label="批次流水号">
113
+        <template slot-scope="scope">
114
+          <div>{{scope.row.fixmedinsBchno}}</div>
115
+        </template>
116
+      </el-table-column>
117
+
118
+      <el-table-column align="center" prop="total" label="经办时间">
119
+        <template slot-scope="scope">
120
+          <div></div>
121
+        </template>
122
+      </el-table-column>
123
+
124
+      <el-table-column align="center" prop="total" label="经办人">
125
+        <template slot-scope="scope">
126
+          <div>{{scope.row.optTime}}</div>
127
+        </template>
128
+      </el-table-column>
129
+
130
+      <el-table-column label="操作" width="200">
131
+        <template slot-scope="scope">
132
+          <el-button type="text" @click="delete(scope.row)">删除</el-button>
133
+        </template>
134
+      </el-table-column>
135
+    </el-table>
136
+
137
+
138
+    <el-table v-if="stock_type == 2" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
139
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
140
+              max-height="600"
141
+              highlight-current-row>
142
+      <el-table-column align="center" prop="name" label="药品名称">
143
+        <template slot-scope="scope">{{scope.row.medinsListName}}</template>
80 144
       </el-table-column>
81 145
       <el-table-column align="center" prop="name" label="国家编码">
82
-        <template slot-scope="scope"></template>
146
+        <template slot-scope="scope">{{scope.row.medListCodg}}</template>
83 147
       </el-table-column>
84
-      <el-table-column align="center" prop="name" label="批号">
85
-        <template slot-scope="scope"></template>
148
+      <el-table-column align="center" prop="name" label="变更类型">
149
+        <template slot-scope="scope">{{}}</template>
86 150
       </el-table-column>
87
-      <el-table-column align="center" prop="name" label="入库数量">
151
+      <el-table-column align="center" prop="name" label="变更数量">
152
+        <template slot-scope="scope">
153
+          <div>{{scope.row.cnt}}</div>
154
+        </template>
155
+      </el-table-column>
156
+
157
+      <el-table-column align="center" prop="name" label="单价">
158
+        <template slot-scope="scope">
159
+          <div>{{scope.row.pric}}</div>
160
+        </template>
161
+      </el-table-column>
162
+
163
+      <el-table-column align="center" prop="name" label="库存变更时间">
164
+        <template slot-scope="scope">
165
+          <div>{{scope.row.invChgTime}}</div>
166
+        </template>
167
+      </el-table-column>
168
+
169
+
170
+      <el-table-column align="center" prop="name" label="变更经办人">
171
+        <template slot-scope="scope">
172
+          <div>{{scope.row.invChgOpterName}}</div>
173
+        </template>
174
+      </el-table-column>
175
+
176
+      <el-table-column align="center" prop="total" label="有效标志">
177
+        <template slot-scope="scope">
178
+          <div>{{scope.row.valiFlag}}</div>
179
+        </template>
180
+      </el-table-column>
181
+
182
+      <el-table-column align="center" prop="total" label="批次流水号">
183
+        <template slot-scope="scope">
184
+          <div>{{scope.row.fixmedinsBchno}}</div>
185
+        </template>
186
+      </el-table-column>
187
+
188
+
189
+      <el-table-column align="center" prop="total" label="经办时间">
88 190
         <template slot-scope="scope">
89 191
           <div></div>
90 192
         </template>
91 193
       </el-table-column>
92 194
 
195
+      <el-table-column align="center" prop="total" label="经办人">
196
+        <template slot-scope="scope">
197
+          <div>{{scope.row.optTime}}</div>
198
+        </template>
199
+      </el-table-column>
200
+
201
+      <el-table-column align="center" prop="total" label="记录号">
202
+        <template slot-scope="scope">
203
+          <div>{{scope.row.rid}}</div>
204
+        </template>
205
+      </el-table-column>
206
+
207
+      <el-table-column label="操作" width="200">
208
+        <template slot-scope="scope">
209
+          <el-button type="text" @click="delete(scope.row)">删除</el-button>
210
+        </template>
211
+      </el-table-column>
212
+    </el-table>
213
+
214
+
215
+
216
+    <el-table v-if="stock_type == 3" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
217
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
218
+              max-height="600"
219
+              highlight-current-row>
220
+      <el-table-column align="center" prop="name" label="药品名称">
221
+        <template slot-scope="scope">{{scope.row.medinsListName}}</template>
222
+      </el-table-column>
223
+      <el-table-column align="center" prop="name" label="国家编码">
224
+        <template slot-scope="scope">{{scope.row.medListCodg}}</template>
225
+      </el-table-column>
226
+      <el-table-column align="center" prop="name" label="销售/退货数量">
227
+        <template slot-scope="scope">
228
+          <div>{{scope.row.selRetnCnt}}</div>
229
+        </template>
230
+      </el-table-column>
231
+
232
+      <el-table-column align="center" prop="name" label="销售/退货时间">
233
+        <template slot-scope="scope">
234
+          <div>{{scope.row.selRetnTime}}</div>
235
+        </template>
236
+      </el-table-column>
237
+
238
+
239
+      <el-table-column align="center" prop="total" label="药师姓名">
240
+        <template slot-scope="scope">
241
+          <div>{{scope.row.pharName}}</div>
242
+        </template>
243
+      </el-table-column>
244
+
93 245
       <el-table-column align="center" prop="total" label="生产日期">
94 246
         <template slot-scope="scope">
95
-          <div></div>
247
+          <div>{{scope.row.manuDate}}</div>
96 248
         </template>
97 249
       </el-table-column>
98 250
 
99 251
 
100
-      <el-table-column align="center" prop="total" label="有效日期">
252
+      <el-table-column align="center" prop="total" label="记录号">
101 253
         <template slot-scope="scope">
102
-          <div></div>
254
+          <div>{{scope.row.rid}}</div>
103 255
         </template>
104 256
       </el-table-column>
105 257
 
106 258
 
107
-      <el-table-column align="center" prop="total" label="盘存状态">
259
+      <el-table-column align="center" prop="total" label="有效标志">
108 260
         <template slot-scope="scope">
109
-          <div></div>
261
+          <div>{{scope.row.valiFlag}}</div>
262
+        </template>
263
+      </el-table-column>
264
+      <el-table-column align="center" prop="total" label="批次流水号">
265
+        <template slot-scope="scope">
266
+          <div>{{scope.row.fixmedinsBchno}}</div>
110 267
         </template>
111 268
       </el-table-column>
112 269
 
113
-      <el-table-column align="center" prop="total" label="盘存日期">
270
+      <el-table-column align="center" prop="total" label="经办时间">
114 271
         <template slot-scope="scope">
115 272
           <div></div>
116 273
         </template>
117 274
       </el-table-column>
118 275
 
276
+      <el-table-column align="center" prop="total" label="经办人">
277
+        <template slot-scope="scope">
278
+          <div>{{scope.row.optTime}}</div>
279
+        </template>
280
+      </el-table-column>
281
+
282
+      <el-table-column label="操作" width="200">
283
+        <template slot-scope="scope">
284
+          <el-button type="text" @click="delete(scope.row)">删除</el-button>
285
+        </template>
286
+      </el-table-column>
287
+    </el-table>
288
+
289
+
290
+    <el-table v-if="stock_type == 4" :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
291
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
292
+              max-height="600"
293
+              highlight-current-row>
294
+      <el-table-column align="center" prop="name" label="药品名称">
295
+        <template slot-scope="scope">{{scope.row.medinsListName}}</template>
296
+      </el-table-column>
297
+      <el-table-column align="center" prop="name" label="国家编码">
298
+        <template slot-scope="scope">{{scope.row.medListCodg}}</template>
299
+      </el-table-column>
300
+      <el-table-column align="center" prop="name" label="药品追溯码">
301
+        <template slot-scope="scope">
302
+          <div>{{}}</div>
303
+        </template>
304
+      </el-table-column>
305
+
306
+      <el-table-column align="center" prop="total" label="有效标志">
307
+        <template slot-scope="scope">
308
+          <div>{{scope.row.valiFlag}}</div>
309
+        </template>
310
+      </el-table-column>
311
+
312
+      <el-table-column align="center" prop="total" label="批次流水号">
313
+        <template slot-scope="scope">
314
+          <div>{{scope.row.fixmedinsBchno}}</div>
315
+        </template>
316
+      </el-table-column>
317
+
318
+      <el-table-column align="center" prop="total" label="经办人">
319
+        <template slot-scope="scope">
320
+          <div>{{scope.row.optTime}}</div>
321
+        </template>
322
+      </el-table-column>
323
+
324
+      <el-table-column label="操作" width="200">
325
+        <template slot-scope="scope">
326
+          <el-button type="text" @click="delete(scope.row)">删除</el-button>
327
+        </template>
328
+      </el-table-column>
329
+    </el-table>
330
+
331
+
332
+    <el-table  v-if="stock_type == 5"  :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
333
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
334
+              max-height="600"
335
+              highlight-current-row>
336
+      <el-table-column align="center" prop="name" label="药品名称">
337
+        <template slot-scope="scope">{{scope.row.medinsListName}}</template>
338
+      </el-table-column>
339
+      <el-table-column align="center" prop="name" label="国家编码">
340
+        <template slot-scope="scope">{{scope.row.medListCodg}}</template>
341
+      </el-table-column>
342
+
343
+
344
+      <el-table-column align="center" prop="name" label="记账流水号">
345
+        <template slot-scope="scope">
346
+          <div>{{scope.row.bkkpSn}}</div>
347
+        </template>
348
+      </el-table-column>
349
+
350
+      <el-table-column align="center" prop="total" label="批次流水号">
351
+        <template slot-scope="scope">
352
+          <div>{{scope.row.fixmedinsBchno}}</div>
353
+        </template>
354
+      </el-table-column>
355
+
356
+      <el-table-column align="center" prop="name" label="药品追溯码">
357
+        <template slot-scope="scope">
358
+          <div>{{}}</div>
359
+        </template>
360
+      </el-table-column>
361
+
362
+
363
+      <el-table-column align="center" prop="name" label="更新时间">
364
+        <template slot-scope="scope">
365
+          <div>{{scope.row.updtTime}}</div>
366
+        </template>
367
+      </el-table-column>
368
+
369
+      <el-table-column align="center" prop="total" label="经办人">
370
+        <template slot-scope="scope">
371
+          <div>{{scope.row.optTime}}</div>
372
+        </template>
373
+      </el-table-column>
374
+      <el-table-column align="center" prop="total" label="记录号">
375
+        <template slot-scope="scope">
376
+          <div>{{scope.row.rid}}</div>
377
+        </template>
378
+      </el-table-column>
379
+
380
+      <el-table-column label="操作" width="200">
381
+        <template slot-scope="scope">
382
+          <el-button type="text" @click="delete(scope.row)">删除</el-button>
383
+        </template>
384
+      </el-table-column>
385
+    </el-table>
386
+<!--    实时库存-->
387
+    <div v-if="stock_type == 6">
388
+    <el-table  :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
389
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
390
+              max-height="600"
391
+              highlight-current-row>
392
+      <el-table-column align="center" prop="name" label="药品名称">
393
+        <template slot-scope="scope">{{scope.row.genname}}</template>
394
+      </el-table-column>
395
+      <el-table-column align="center" prop="name" label="国家编码">
396
+        <template slot-scope="scope">{{scope.row.medListCodg}}</template>
397
+      </el-table-column>
398
+      <el-table-column align="center" prop="name" label="库存数量">
399
+        <template slot-scope="scope">{{scope.row.invCnt}}</template>
400
+      </el-table-column>
401
+      <el-table-column align="center" prop="name" label="销售价格">
402
+        <template slot-scope="scope">{{scope.row.pric}}</template>
403
+      </el-table-column>
404
+
405
+      <el-table-column align="center" prop="name" label="库存日期">
406
+        <template slot-scope="scope">{{scope.row.invdate}}</template>
407
+      </el-table-column>
408
+
409
+      <el-table-column align="center" prop="total" label="批次流水号">
410
+        <template slot-scope="scope">
411
+          <div>{{scope.row.fixmedinsBchno}}</div>
412
+        </template>
413
+      </el-table-column>
414
+      <el-table-column align="center" prop="name" label="更新时间">
415
+        <template slot-scope="scope">
416
+          <div>{{scope.row.updtTime}}</div>
417
+        </template>
418
+      </el-table-column>
419
+
420
+
421
+
119 422
       <el-table-column label="操作" width="200">
120 423
         <template slot-scope="scope">
121
-          <el-button type="text" @click="stock(scope.row)">盘存</el-button>
122 424
           <el-button type="text" @click="delete(scope.row)">删除</el-button>
123 425
         </template>
124 426
       </el-table-column>
125 427
     </el-table>
428
+
429
+    </div>
430
+
431
+
432
+    <div v-if="stock_type == 7">
433
+      <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
434
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
435
+                max-height="600"
436
+                highlight-current-row>
437
+        <el-table-column align="center" prop="name" label="药品名称">
438
+          <template slot-scope="scope">{{scope.row.genname}}</template>
439
+        </el-table-column>
440
+        <el-table-column align="center" prop="name" label="国家编码">
441
+          <template slot-scope="scope">{{scope.row.med_list_codg}}</template>
442
+        </el-table-column>
443
+        <el-table-column align="center" prop="name" label="库存数量">
444
+          <template slot-scope="scope">{{scope.row.invCnt}}</template>
445
+        </el-table-column>
446
+        <el-table-column align="center" prop="name" label="销售价格">
447
+          <template slot-scope="scope">{{scope.row.pric}}</template>
448
+        </el-table-column>
449
+
450
+        <el-table-column align="center" prop="name" label="库存变更类型">
451
+          <template slot-scope="scope">{{scope.row.invChgType}}</template>
452
+        </el-table-column>
453
+
454
+        <el-table-column align="center" prop="total" label="批次流水号">
455
+          <template slot-scope="scope">
456
+            <div>{{scope.row.fixmedinsBchno}}</div>
457
+          </template>
458
+        </el-table-column>
459
+
460
+      </el-table>
461
+    </div>
462
+
463
+
464
+<!--    <el-table :data="tableData_two" border :row-style="{ color: '#303133' }" ref="table"-->
465
+<!--              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"-->
466
+<!--              max-height="600"-->
467
+<!--              highlight-current-row>-->
468
+<!--      <el-table-column align="center" prop="name" label="药品名称">-->
469
+<!--        <template slot-scope="scope">{{scope.row.medinsListName}}</template>-->
470
+<!--      </el-table-column>-->
471
+<!--      <el-table-column align="center" prop="name" label="国家编码">-->
472
+<!--        <template slot-scope="scope">{{scope.row.medListCodg}}</template>-->
473
+<!--      </el-table-column>-->
474
+<!--      <el-table-column align="center" prop="name" label="变更类型">-->
475
+<!--        <template slot-scope="scope">{{}}</template>-->
476
+<!--      </el-table-column>-->
477
+<!--      <el-table-column align="center" prop="name" label="变更数量">-->
478
+<!--        <template slot-scope="scope">-->
479
+<!--          <div>{{scope.row.cnt}}</div>-->
480
+<!--        </template>-->
481
+<!--      </el-table-column>-->
482
+
483
+<!--      <el-table-column align="center" prop="name" label="单价">-->
484
+<!--        <template slot-scope="scope">-->
485
+<!--          <div>{{scope.row.pric}}</div>-->
486
+<!--        </template>-->
487
+<!--      </el-table-column>-->
488
+
489
+<!--      <el-table-column align="center" prop="name" label="库存变更时间">-->
490
+<!--        <template slot-scope="scope">-->
491
+<!--          <div>{{scope.row.invChgTime}}</div>-->
492
+<!--        </template>-->
493
+<!--      </el-table-column>-->
494
+
495
+
496
+<!--      <el-table-column align="center" prop="name" label="变更经办人">-->
497
+<!--        <template slot-scope="scope">-->
498
+<!--          <div>{{scope.row.invChgOpterName}}</div>-->
499
+<!--        </template>-->
500
+<!--      </el-table-column>-->
501
+
502
+<!--      <el-table-column align="center" prop="total" label="有效标志">-->
503
+<!--        <template slot-scope="scope">-->
504
+<!--          <div>{{scope.row.valiFlag}}</div>-->
505
+<!--        </template>-->
506
+<!--      </el-table-column>-->
507
+
508
+<!--      <el-table-column align="center" prop="total" label="批次流水号">-->
509
+<!--        <template slot-scope="scope">-->
510
+<!--          <div>{{scope.row.fixmedinsBchno}}</div>-->
511
+<!--        </template>-->
512
+<!--      </el-table-column>-->
513
+
514
+
515
+<!--      <el-table-column align="center" prop="total" label="经办时间">-->
516
+<!--        <template slot-scope="scope">-->
517
+<!--          <div></div>-->
518
+<!--        </template>-->
519
+<!--      </el-table-column>-->
520
+
521
+<!--      <el-table-column align="center" prop="total" label="经办人">-->
522
+<!--        <template slot-scope="scope">-->
523
+<!--          <div>{{scope.row.optTime}}</div>-->
524
+<!--        </template>-->
525
+<!--      </el-table-column>-->
526
+
527
+<!--      <el-table-column align="center" prop="total" label="记录号">-->
528
+<!--        <template slot-scope="scope">-->
529
+<!--          <div>{{scope.row.rid}}</div>-->
530
+<!--        </template>-->
531
+<!--      </el-table-column>-->
532
+
533
+<!--      <el-table-column label="操作" width="200">-->
534
+<!--        <template slot-scope="scope">-->
535
+<!--          <el-button type="text" @click="delete(scope.row)">删除</el-button>-->
536
+<!--        </template>-->
537
+<!--      </el-table-column>-->
538
+<!--    </el-table>-->
539
+
540
+
126 541
   </div>
127 542
 
128 543
   <!-- </div> -->
@@ -130,7 +545,11 @@
130 545
 
131 546
 
132 547
 <script>
548
+import {
549
+  getInitData
550
+} from '@/api/his/his'
133 551
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
552
+import axios from 'axios'
134 553
 const moment = require('moment')
135 554
 export default {
136 555
   components: {
@@ -138,11 +557,12 @@ export default {
138 557
   },
139 558
   data() {
140 559
     return {
141
-      start_time: '',
142
-      end_time: '',
560
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
561
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 3, 0).toLocaleDateString('en-CA'),
143 562
       tableData: [],
144
-      stock_type:"0",
145
-      change_type:"0",
563
+      tableData_two:[],
564
+      stock_type:1,
565
+      drug_id:"",
146 566
       items: [
147 567
         { id: 1, name: '药品库存信息查询' },
148 568
         { id: 2, name: '药品库存变更信息查询' },
@@ -153,12 +573,24 @@ export default {
153 573
         { id: 7, name: '药品库存明细查询' },
154 574
       ],
155 575
       drugs: [
156
-        { id: 1, name: '已变更' },
157
-        { id: 2, name: '未变更' },
576
+
158 577
       ]
159 578
     }
160 579
   },
161 580
   methods: {
581
+    // 药品数据源
582
+    getInitData() {
583
+      getInitData().then(response => {
584
+        if (response.data.state == 0) {
585
+          this.$message.error(response.data.msg)
586
+          return false
587
+        } else {
588
+          this.drugs = response.data.data.drugs
589
+          this.drug_id = this.drugs[0].id
590
+        }
591
+      })
592
+
593
+    },
162 594
     delete(){
163 595
 
164 596
 
@@ -170,16 +602,179 @@ export default {
170 602
     stock(){
171 603
 
172 604
 
605
+
173 606
     },
174 607
     query(){
175 608
 
176
-
609
+      var that = this;
610
+      let params = {
611
+        id:this.drug_id,
612
+        start_time:this.start_time,
613
+        end_time:this.end_time,
614
+        admin_user_id:this.$store.getters.xt_user.user.id
615
+      };
616
+      this.tableData = []
617
+      if(this.stock_type == 1){
618
+
619
+        axios.get('http://127.0.0.1:9532/api/3508',{params:params}).then(function(response) {
620
+          if (response.data.state == 0) {
621
+            that.$message.error(response.data.data.msg);
622
+            return false
623
+          } else {
624
+            if(response.data.data.failed_code == -10){
625
+              that.$confirm(response.data.data.msg, '医保错误信息', {
626
+                confirmButtonText: '确 定',
627
+                type: 'warning'
628
+              }).then(() => {
629
+
630
+              }).catch(() => {
631
+              })
632
+            }else{
633
+              this.tableData = this.tableData.concat(response.data.data.info)
634
+
635
+            }
636
+          }
637
+        }).catch(function(error) {
638
+        })
639
+
640
+      }else if(this.stock_type == 2){
641
+        axios.get('http://127.0.0.1:9532/api/3509',{params:params}).then(function(response) {
642
+          if (response.data.state == 0) {
643
+            that.$message.error(response.data.data.msg);
644
+            return false
645
+          } else {
646
+            if(response.data.data.failed_code == -10){
647
+              that.$confirm(response.data.data.msg, '医保错误信息', {
648
+                confirmButtonText: '确 定',
649
+                type: 'warning'
650
+              }).then(() => {
651
+
652
+              }).catch(() => {
653
+              })
654
+            }else{
655
+              this.tableData = this.tableData.concat(response.data.data.info)
656
+
657
+            }
658
+          }
659
+        }).catch(function(error) {
660
+        })
661
+
662
+      }else if(this.stock_type == 3){
663
+        axios.get('http://127.0.0.1:9532/api/3511',{params:params}).then(function(response) {
664
+          if (response.data.state == 0) {
665
+            that.$message.error(response.data.data.msg);
666
+            return false
667
+          } else {
668
+            if(response.data.data.failed_code == -10){
669
+              that.$confirm(response.data.data.msg, '医保错误信息', {
670
+                confirmButtonText: '确 定',
671
+                type: 'warning'
672
+              }).then(() => {
673
+
674
+              }).catch(() => {
675
+              })
676
+            }else{
677
+              this.tableData = this.tableData.concat(response.data.data.info)
678
+
679
+            }
680
+          }
681
+        }).catch(function(error) {
682
+        })
683
+
684
+      }else if(this.stock_type == 4){
685
+        axios.get('http://127.0.0.1:9532/api/3512',{params:params}).then(function(response) {
686
+          if (response.data.state == 0) {
687
+            that.$message.error(response.data.data.msg);
688
+            return false
689
+          } else {
690
+            if(response.data.data.failed_code == -10){
691
+              that.$confirm(response.data.data.msg, '医保错误信息', {
692
+                confirmButtonText: '确 定',
693
+                type: 'warning'
694
+              }).then(() => {
695
+
696
+              }).catch(() => {
697
+              })
698
+            }else{
699
+              this.tableData = this.tableData.concat(response.data.data.info)
700
+
701
+            }
702
+          }
703
+        }).catch(function(error) {
704
+        })
705
+
706
+      }else if(this.stock_type == 5){
707
+        axios.get('http://127.0.0.1:9532/api/3513',{params:params}).then(function(response) {
708
+          if (response.data.state == 0) {
709
+            that.$message.error(response.data.data.msg);
710
+            return false
711
+          } else {
712
+            if(response.data.data.failed_code == -10){
713
+              that.$confirm(response.data.data.msg, '医保错误信息', {
714
+                confirmButtonText: '确 定',
715
+                type: 'warning'
716
+              }).then(() => {
717
+
718
+              }).catch(() => {
719
+              })
720
+            }else{
721
+              this.tableData = this.tableData.concat(response.data.data.info)
722
+
723
+            }
724
+          }
725
+        }).catch(function(error) {
726
+        })
727
+
728
+      }else if(this.stock_type == 6){
729
+        axios.get('http://127.0.0.1:9532/api/35081',{params:params}).then(function(response) {
730
+          if (response.data.state == 0) {
731
+            that.$message.error(response.data.data.msg);
732
+            return false
733
+          } else {
734
+            if(response.data.data.failed_code == -10){
735
+              that.$confirm(response.data.data.msg, '医保错误信息', {
736
+                confirmButtonText: '确 定',
737
+                type: 'warning'
738
+              }).then(() => {
739
+
740
+              }).catch(() => {
741
+              })
742
+            }else{
743
+              this.tableData = this.tableData.concat(response.data.data.info)
744
+
745
+            }
746
+          }
747
+        }).catch(function(error) {
748
+        })
749
+
750
+      }else if(this.stock_type == 7){
751
+        axios.get('http://127.0.0.1:9532/api/35082',{params:params}).then(function(response) {
752
+          if (response.data.state == 0) {
753
+            that.$message.error(response.data.data.msg);
754
+            return false
755
+          } else {
756
+            if(response.data.data.failed_code == -10){
757
+              that.$confirm(response.data.data.msg, '医保错误信息', {
758
+                confirmButtonText: '确 定',
759
+                type: 'warning'
760
+              }).then(() => {
761
+
762
+              }).catch(() => {
763
+              })
764
+            }else{
765
+              this.tableData = this.tableData.concat(response.data.data.info)
766
+
767
+            }
768
+          }
769
+        }).catch(function(error) {
770
+        })
771
+      }
177 772
     },
178 773
     change(){
179 774
 
180 775
 
181 776
     },
182
-    changeStock(){
777
+    changeStockType(){
183 778
 
184 779
 
185 780
     },
@@ -193,6 +788,7 @@ export default {
193 788
     },
194 789
   },
195 790
   created() {
791
+    this.getInitData()
196 792
 
197 793
   }
198 794
 }

+ 32 - 2
src/xt_pages/outpatientTool/drugStock.vue Ver arquivo

@@ -236,7 +236,7 @@ export default {
236 236
     return {
237 237
       drugTypeList: [{ id: 0, name: "全部" }],
238 238
       start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
239
-      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
239
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 3, 0).toLocaleDateString('en-CA'),
240 240
       tableData: [],
241 241
       stock_type:"0",
242 242
       change_type:"0",
@@ -290,8 +290,38 @@ export default {
290 290
     }, changeAllCostInfoTableData(selection) {
291 291
       this.selection = selection
292 292
     },
293
-    deleteStock(){
293
+    deleteStock(row){
294
+      let ids  = row.id
295
+      var that = this;
296
+      let params = {
297
+        ids:ids,
298
+        admin_user_id:this.$store.getters.xt_user.user.id
299
+      };
300
+      this.isloading = true
301
+      axios.get('http://127.0.0.1:9532/api/delete_pc_bg',{params:params}).then(function(response) {
302
+        if (response.data.state == 0) {
303
+          this.isloading = false
294 304
 
305
+          that.$message.error(response.data.data.msg);
306
+          return false
307
+        } else {
308
+          this.isloading = false
309
+          if(response.data.data.failed_code == -10){
310
+            that.$confirm(response.data.data.msg, '医保错误信息', {
311
+              confirmButtonText: '确 定',
312
+              type: 'warning'
313
+            }).then(() => {
314
+
315
+            }).catch(() => {
316
+            })
317
+          }else{
318
+            that.GetDrugStock()
319
+
320
+
321
+          }
322
+        }
323
+      }).catch(function(error) {
324
+      })
295 325
 
296 326
     },
297 327
     exportdata(){