|
@@ -37,21 +37,10 @@
|
37
|
37
|
placeholder="选择日期"
|
38
|
38
|
@change="changeEndTime">
|
39
|
39
|
</el-date-picker>
|
40
|
|
- </div>
|
41
|
|
- <div>
|
42
|
|
- <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
|
43
|
|
- <el-button size="small" type="primary" @click="toCheck">核对</el-button>
|
44
|
|
- <!-- <el-button size="small" type="primary" @click="print">打印</el-button>
|
45
|
|
- <el-button size="small" type="primary">导出</el-button> -->
|
46
|
|
- </div>
|
|
40
|
+ </div>
|
47
|
41
|
</div>
|
48
|
|
- <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }" @selection-change="changePrice">
|
|
42
|
+ <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }" >
|
49
|
43
|
<el-table-column type="selection" width="55" align="center"> </el-table-column>
|
50
|
|
- <el-table-column prop="date" label="报损编码" align="center">
|
51
|
|
- <template slot-scope="scope">
|
52
|
|
- {{scope.row.warehousing_order}}
|
53
|
|
- </template>
|
54
|
|
- </el-table-column>
|
55
|
44
|
<el-table-column prop="date" label="报损日期" align="center">
|
56
|
45
|
<template slot-scope="scope">
|
57
|
46
|
{{getTime(scope.row.start_time)}}
|
|
@@ -67,7 +56,12 @@
|
67
|
56
|
{{scope.row.specification_name}}
|
68
|
57
|
</template>
|
69
|
58
|
</el-table-column>
|
70
|
|
- <el-table-column prop="name" label="报损数量" align="center">
|
|
59
|
+ <el-table-column prop="name" label="总报损数量" align="center">
|
|
60
|
+ <template slot-scope="scope">
|
|
61
|
+ {{scope.row.count}}
|
|
62
|
+ </template>
|
|
63
|
+ </el-table-column>
|
|
64
|
+ <el-table-column prop="name" label="总报损金额" align="center">
|
71
|
65
|
<template slot-scope="scope">
|
72
|
66
|
{{scope.row.count}}
|
73
|
67
|
</template>
|
|
@@ -77,22 +71,6 @@
|
77
|
71
|
{{getDoctorName(scope.row.creater)}}
|
78
|
72
|
</template>
|
79
|
73
|
</el-table-column>
|
80
|
|
- <el-table-column prop="name" label="审核日期" align="center">
|
81
|
|
- <template slot-scope="scope">
|
82
|
|
- {{getTime(scope.row.checker_time)}}
|
83
|
|
- </template>
|
84
|
|
- </el-table-column>
|
85
|
|
- <el-table-column prop="name" label="核对人" align="center">
|
86
|
|
- <template slot-scope="scope">
|
87
|
|
- {{getDoctorName(scope.row.checker)}}
|
88
|
|
- </template>
|
89
|
|
- </el-table-column>
|
90
|
|
- <el-table-column prop="name" label="状态" align="center">
|
91
|
|
- <template slot-scope="scope">
|
92
|
|
- <span v-if="scope.row.checker_status == 1">已核对</span>
|
93
|
|
- <span v-if="scope.row.checker_status == 2">未核对</span>
|
94
|
|
- </template>
|
95
|
|
- </el-table-column>
|
96
|
74
|
<el-table-column label="操作" align="center" width="200">
|
97
|
75
|
<template slot-scope="scope">
|
98
|
76
|
<el-button type="primary" size="small" @click="moDrugDamage(scope.row.id,scope.row.checker_status)">编辑</el-button>
|
|
@@ -111,342 +89,12 @@
|
111
|
89
|
:total="total">
|
112
|
90
|
</el-pagination>
|
113
|
91
|
</div>
|
114
|
|
- <el-dialog
|
115
|
|
- title="药品报损"
|
116
|
|
- :visible.sync="dialogVisible"
|
117
|
|
- width="1200px">
|
118
|
|
- <el-form :model="form" class="modifyDialog" label-width="120px">
|
119
|
|
- <el-form-item label="药品ID">
|
120
|
|
- <el-input v-model="form.drug_id" :disabled="true"></el-input>
|
121
|
|
- </el-form-item>
|
122
|
|
- <el-form-item label="药品名称">
|
123
|
|
- <el-autocomplete
|
124
|
|
- class="checkSearch"
|
125
|
|
- popper-class="my-autocomplete"
|
126
|
|
- v-model="form.drug_name"
|
127
|
|
- :fetch-suggestions="querySearchAsync"
|
128
|
|
- :trigger-on-focus="true"
|
129
|
|
- placeholder="请输入药品名称"
|
130
|
|
- @select="handleSelect"
|
131
|
|
- @input="changeGoodName(scope.$index)"
|
132
|
|
- style="width:260px;"
|
133
|
|
- >
|
134
|
|
- <i class="el-icon-search el-input__icon" slot="suffix"></i>
|
135
|
|
- <template slot-scope="{ item }">
|
136
|
|
- <div class="name">{{ item.drug_name + item.dose + item.dose_unit + "*" +item.min_number + item.min_unit +"/" + item.max_unit + " "+item.manufacturer}}</div>
|
137
|
|
- </template>
|
138
|
|
- </el-autocomplete>
|
139
|
|
- </el-form-item>
|
140
|
|
-
|
141
|
|
- <el-form-item label="批次">
|
142
|
|
- <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
|
143
|
|
- <el-option
|
144
|
|
- v-for="(item,index) in numberList"
|
145
|
|
- :key="index"
|
146
|
|
- :label="item.batch_number"
|
147
|
|
- :value="item.id">
|
148
|
|
- </el-option>
|
149
|
|
- </el-select>
|
150
|
|
- </el-form-item>
|
151
|
|
-
|
152
|
|
- <el-form-item label="单位">
|
153
|
|
- <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
|
154
|
|
- </el-form-item>
|
155
|
|
- <el-form-item label="进货价">
|
156
|
|
- <el-input v-model="form.last_price" :disabled="true"></el-input>
|
157
|
|
- </el-form-item>
|
158
|
|
- <el-form-item label="零售价">
|
159
|
|
- <el-input v-model="form.retail_price" :disabled="true"></el-input>
|
160
|
|
- </el-form-item>
|
161
|
|
- <el-form-item label="报损数量">
|
162
|
|
- <el-input v-model="form.count"></el-input>
|
163
|
|
- </el-form-item>
|
164
|
|
- <el-form-item label="库存">
|
165
|
|
- <el-input v-model="form.total" :disabled="true" ></el-input>
|
166
|
|
- </el-form-item>
|
167
|
|
- <el-form-item label="产地">
|
168
|
|
- <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
|
169
|
|
- </el-form-item>
|
170
|
|
- <el-form-item label="批准文号">
|
171
|
|
- <el-input v-model="form.number" :disabled="true"></el-input>
|
172
|
|
- </el-form-item>
|
173
|
|
- <el-form-item label="生产厂商">
|
174
|
|
- <el-input v-model="form.manufacturer" :disabled="true"></el-input>
|
175
|
|
- </el-form-item>
|
176
|
|
- <el-form-item label="备注">
|
177
|
|
- <div style="display:flex;">
|
178
|
|
- <el-input v-model="form.remark"></el-input>
|
179
|
|
- <el-button style="margin-left:5px;" type="primary" @click="addPrice">添加</el-button>
|
180
|
|
- </div>
|
181
|
|
- </el-form-item>
|
182
|
|
- </el-form>
|
183
|
|
- <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
|
184
|
|
- <el-table-column prop="date" label="药品ID" width="100" align="center">
|
185
|
|
- <template slot-scope="scope">
|
186
|
|
- {{scope.row.drug_id}}
|
187
|
|
- </template>
|
188
|
|
- </el-table-column>
|
189
|
|
- <el-table-column prop="date" label="药品名称" width="100" align="center">
|
190
|
|
- <template slot-scope="scope">
|
191
|
|
- {{scope.row.drug_name}}
|
192
|
|
- </template>
|
193
|
|
- </el-table-column>
|
194
|
|
- <el-table-column prop="name" label="规格" width="100" align="center">
|
195
|
|
- <template slot-scope="scope">
|
196
|
|
- {{scope.row.specification_name}}
|
197
|
|
- </template>
|
198
|
|
- </el-table-column>
|
199
|
|
- <el-table-column prop="name" label="单位" width="100" align="center">
|
200
|
|
- <template slot-scope="scope">
|
201
|
|
- {{scope.row.warehousing_unit}}
|
202
|
|
- </template>
|
203
|
|
- </el-table-column>
|
204
|
|
- <el-table-column prop="name" label="报损数量" width="100" align="center">
|
205
|
|
- <template slot-scope="scope">
|
206
|
|
- {{scope.row.count}}
|
207
|
|
- </template>
|
208
|
|
- </el-table-column>
|
209
|
|
- <el-table-column prop="name" label="原进货价" width="100" align="center">
|
210
|
|
- <template slot-scope="scope">
|
211
|
|
- {{scope.row.last_price}}
|
212
|
|
- </template>
|
213
|
|
- </el-table-column>
|
214
|
|
- <el-table-column prop="name" label="原零售价" width="100" align="center">
|
215
|
|
- <template slot-scope="scope">
|
216
|
|
- {{scope.row.retail_price}}
|
217
|
|
- </template>
|
218
|
|
- </el-table-column>
|
219
|
|
-
|
220
|
|
- <el-table-column prop="name" label="生产厂商" width="100" align="center">
|
221
|
|
- <template slot-scope="scope">
|
222
|
|
- {{scope.row.manufacturer}}
|
223
|
|
- </template>
|
224
|
|
- </el-table-column>
|
225
|
|
- <el-table-column prop="name" label="产地" width="100" align="center">
|
226
|
|
- <template slot-scope="scope">
|
227
|
|
- {{scope.row.drug_origin_place}}
|
228
|
|
- </template>
|
229
|
|
- </el-table-column>
|
230
|
|
- <el-table-column prop="name" label="批准文号" width="100" align="center">
|
231
|
|
- <template slot-scope="scope">
|
232
|
|
- {{scope.row.number}}
|
233
|
|
- </template>
|
234
|
|
- </el-table-column>
|
235
|
|
- <el-table-column prop="name" label="备注" width="100" align="center">
|
236
|
|
- <template slot-scope="scope">
|
237
|
|
- {{scope.row.remark}}
|
238
|
|
- </template>
|
239
|
|
- </el-table-column>
|
240
|
|
- <el-table-column
|
241
|
|
- fixed="right"
|
242
|
|
- width="100"
|
243
|
|
- label="操作">
|
244
|
|
- <template slot-scope="scope">
|
245
|
|
- <el-button type="text" size="small" @click="toDel(scope.$index)">删除</el-button>
|
246
|
|
- <el-button type="text" size="small" @click="toEdit(scope.row,scope.$index)">编辑</el-button>
|
247
|
|
- </template>
|
248
|
|
- </el-table-column>
|
249
|
|
- </el-table>
|
250
|
|
- <span slot="footer" class="dialog-footer">
|
251
|
|
- <el-button @click="dialogVisible = false">取 消</el-button>
|
252
|
|
- <el-button type="primary" @click="saveDrugDamage">确 定</el-button>
|
253
|
|
- </span>
|
254
|
|
- </el-dialog>
|
255
|
|
-
|
256
|
|
-
|
257
|
|
- <el-dialog
|
258
|
|
- title="药品盘点核对"
|
259
|
|
- :visible.sync="checkDialogVisible"
|
260
|
|
- width="30%"
|
261
|
|
- >
|
262
|
|
- <span>
|
263
|
|
- <el-form :model="form">
|
264
|
|
- <el-row>
|
265
|
|
- <el-col>
|
266
|
|
- <el-form-item label="核对时间">
|
267
|
|
- <el-date-picker
|
268
|
|
- size="small"
|
269
|
|
- v-model="check_time"
|
270
|
|
- type="date"
|
271
|
|
- style="margin-left:5px;width:140px;"
|
272
|
|
- placeholder="选择日期">
|
273
|
|
- </el-date-picker>
|
274
|
|
- </el-form-item>
|
275
|
|
- </el-col>
|
276
|
|
- </el-row>
|
277
|
|
- <el-row>
|
278
|
|
- <el-col>
|
279
|
|
- <el-form-item label="核对人">
|
280
|
|
- <el-select v-model="checker" placeholder="请选择">
|
281
|
|
- <el-option
|
282
|
|
- v-for="item in doctorList"
|
283
|
|
- :key="item.admin_user_id"
|
284
|
|
- :label="item.user_name"
|
285
|
|
- :value="item.admin_user_id">
|
286
|
|
- </el-option>
|
287
|
|
- </el-select>
|
288
|
|
- </el-form-item>
|
289
|
|
- </el-col>
|
290
|
|
- </el-row>
|
291
|
|
- </el-form>
|
292
|
|
- </span>
|
293
|
|
- <span slot="footer" class="dialog-footer">
|
294
|
|
- <el-button @click="checkDialogVisible = false">取 消</el-button>
|
295
|
|
- <el-button type="primary" @click="SaveDrugDamagePrice">保 存</el-button>
|
296
|
|
- </span>
|
297
|
|
- </el-dialog>
|
298
|
|
-
|
299
|
|
-
|
300
|
|
- <el-dialog
|
301
|
|
- title="库房调价"
|
302
|
|
- :visible.sync="editDialogVisible"
|
303
|
|
- width="1200px">
|
304
|
|
- <el-form :model="form" class="modifyDialog" label-width="120px">
|
305
|
|
- <el-form-item label="药品ID">
|
306
|
|
- <el-input v-model="form.drug_id" :disabled="true"></el-input>
|
307
|
|
- </el-form-item>
|
308
|
|
- <el-form-item label="药品名称">
|
309
|
|
- <el-autocomplete
|
310
|
|
- class="checkSearch"
|
311
|
|
- popper-class="my-autocomplete"
|
312
|
|
- v-model="form.drug_name"
|
313
|
|
- :fetch-suggestions="querySearchAsync"
|
314
|
|
- :trigger-on-focus="true"
|
315
|
|
- placeholder="请输入药品名称"
|
316
|
|
- @select="handleSelect"
|
317
|
|
- @input="changeGoodName(scope.$index)"
|
318
|
|
- style="width:160px;"
|
319
|
|
- >
|
320
|
|
- <i class="el-icon-search el-input__icon" slot="suffix"></i>
|
321
|
|
- <template slot-scope="{ item }">
|
322
|
|
- <div class="name">{{ item.drug_name + item.dose + item.dose_unit + "*" +item.min_number + item.min_unit +"/" + item.max_unit + " "+item.manufacturer}}</div>
|
323
|
|
- </template>
|
324
|
|
- </el-autocomplete>
|
325
|
|
- </el-form-item>
|
326
|
|
- <el-form-item label="批次">
|
327
|
|
- <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
|
328
|
|
- <el-option
|
329
|
|
- v-for="(item,index) in numberList"
|
330
|
|
- :key="index"
|
331
|
|
- :label="item.batch_number"
|
332
|
|
- :value="item.id">
|
333
|
|
- </el-option>
|
334
|
|
- </el-select>
|
335
|
|
- </el-form-item>
|
336
|
|
- <el-form-item label="规格">
|
337
|
|
- <el-input v-model="form.specification_name" :disabled="true"></el-input>
|
338
|
|
- </el-form-item>
|
339
|
|
- <el-form-item label="单位">
|
340
|
|
- <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
|
341
|
|
- </el-form-item>
|
342
|
|
- <el-form-item label="进货价">
|
343
|
|
- <el-input v-model="form.last_price" :disabled="true"></el-input>
|
344
|
|
- </el-form-item>
|
345
|
|
- <el-form-item label="零售价">
|
346
|
|
- <el-input v-model="form.retail_price" :disabled="true"></el-input>
|
347
|
|
- </el-form-item>
|
348
|
|
- <el-form-item label="报损数量">
|
349
|
|
- <el-input v-model="form.count"></el-input>
|
350
|
|
- </el-form-item>
|
351
|
|
- <el-form-item label="库存">
|
352
|
|
- <el-input v-model="form.total" :disabled="true"></el-input>
|
353
|
|
- </el-form-item>
|
354
|
|
- <el-form-item label="产地">
|
355
|
|
- <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
|
356
|
|
- </el-form-item>
|
357
|
|
- <el-form-item label="批准文号">
|
358
|
|
- <el-input v-model="form.number" :disabled="true"></el-input>
|
359
|
|
- </el-form-item>
|
360
|
|
- <el-form-item label="生产厂商">
|
361
|
|
- <el-input v-model="form.manufacturer" :disabled="true"></el-input>
|
362
|
|
- </el-form-item>
|
363
|
|
- <el-form-item label="备注">
|
364
|
|
- <div style="display:flex;">
|
365
|
|
- <el-input v-model="form.remark"></el-input>
|
366
|
|
- </div>
|
367
|
|
- </el-form-item>
|
368
|
|
- </el-form>
|
369
|
|
-
|
370
|
|
- <span slot="footer" class="dialog-footer">
|
371
|
|
- <el-button @click="editDialogVisible = false">取 消</el-button>
|
372
|
|
- <el-button type="primary" @click="EditDrugDamage">确 定</el-button>
|
373
|
|
- </span>
|
374
|
|
- </el-dialog>
|
375
|
|
-
|
376
|
|
-
|
377
|
|
- <el-dialog
|
378
|
|
- title="库房调价"
|
379
|
|
- :visible.sync="modifyDialogVisible"
|
380
|
|
- width="1200px">
|
381
|
|
- <el-form :model="form" class="modifyDialog" label-width="120px">
|
382
|
|
- <el-form-item label="药品ID">
|
383
|
|
- <el-input v-model="form.drug_id" :disabled="true"></el-input>
|
384
|
|
- </el-form-item>
|
385
|
|
- <el-form-item label="药品名称">
|
386
|
|
- <el-autocomplete
|
387
|
|
- class="checkSearch"
|
388
|
|
- popper-class="my-autocomplete"
|
389
|
|
- v-model="form.drug_name"
|
390
|
|
- :fetch-suggestions="querySearchAsync"
|
391
|
|
- :trigger-on-focus="true"
|
392
|
|
- placeholder="请输入药品名称"
|
393
|
|
- @select="handleSelect"
|
394
|
|
- @input="changeGoodName(scope.$index)"
|
395
|
|
- style="width:160px;"
|
396
|
|
- >
|
397
|
|
- <i class="el-icon-search el-input__icon" slot="suffix"></i>
|
398
|
|
- <template slot-scope="{ item }">
|
399
|
|
- <div class="name">{{ item.drug_name + item.dose + item.dose_unit + "*" +item.min_number + item.min_unit +"/" + item.max_unit + " "+item.manufacturer}}</div>
|
400
|
|
- </template>
|
401
|
|
- </el-autocomplete>
|
402
|
|
- </el-form-item>
|
403
|
|
- <!-- <el-form-item label="规格">
|
404
|
|
- <el-input v-model="form.name"></el-input>
|
405
|
|
- </el-form-item> -->
|
406
|
|
- <el-form-item label="单位">
|
407
|
|
- <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
|
408
|
|
- </el-form-item>
|
409
|
|
- <el-form-item label="进货价">
|
410
|
|
- <el-input v-model="form.last_price" :disabled="true"></el-input>
|
411
|
|
- </el-form-item>
|
412
|
|
- <el-form-item label="零售价">
|
413
|
|
- <el-input v-model="form.retail_price" :disabled="true"></el-input>
|
414
|
|
- </el-form-item>
|
415
|
|
- <el-form-item label="报损数量">
|
416
|
|
- <el-input v-model="form.count"></el-input>
|
417
|
|
- </el-form-item>
|
418
|
|
- <el-form-item label="库存">
|
419
|
|
- <el-input v-model="form.total" :disabled="true"></el-input>
|
420
|
|
- </el-form-item>
|
421
|
|
- <el-form-item label="产地">
|
422
|
|
- <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
|
423
|
|
- </el-form-item>
|
424
|
|
- <el-form-item label="批准文号">
|
425
|
|
- <el-input v-model="form.number" :disabled="true"></el-input>
|
426
|
|
- </el-form-item>
|
427
|
|
- <el-form-item label="生产厂商">
|
428
|
|
- <el-input v-model="form.manufacturer" :disabled="true"></el-input>
|
429
|
|
- </el-form-item>
|
430
|
|
- <el-form-item label="备注">
|
431
|
|
- <div style="display:flex;">
|
432
|
|
- <el-input v-model="form.remark"></el-input>
|
433
|
|
- </div>
|
434
|
|
- </el-form-item>
|
435
|
|
- </el-form>
|
436
|
|
-
|
437
|
|
- <span slot="footer" class="dialog-footer">
|
438
|
|
- <el-button @click="modifyDialogVisible = false">取 消</el-button>
|
439
|
|
- <el-button type="primary" @click="modifyDrugDamage">确 定</el-button>
|
440
|
|
- </span>
|
441
|
|
- </el-dialog>
|
442
|
|
-
|
443
|
92
|
</div>
|
444
|
93
|
</template>
|
445
|
94
|
|
446
|
95
|
<script>
|
447
|
96
|
import BreadCrumb from "../../components/bread-crumb";
|
448
|
|
-import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage,getDrugWarehouseInfoList,getDrugWarehouseInfoTotal } from "@/api/drug/drug"
|
449
|
|
-import { getDrugBatchNumber } from "@/api/drug/drug_stock"
|
|
97
|
+import { getDrugDamageList } from "@/api/drug/drug"
|
450
|
98
|
import { uParseTime } from '@/utils/tools'
|
451
|
99
|
import { getDataConfig } from '@/utils/data'
|
452
|
100
|
export default {
|
|
@@ -526,14 +174,6 @@ export default {
|
526
|
174
|
search(){
|
527
|
175
|
this.getlist()
|
528
|
176
|
},
|
529
|
|
- print(){
|
530
|
|
- if(this.ids == ""){
|
531
|
|
- this.$message.error("请勾选打印数据")
|
532
|
|
- return false
|
533
|
|
- }else{
|
534
|
|
- this.$router.push({path:'/stock/drugs/drugDamagePrint?ids='+this.ids})
|
535
|
|
- }
|
536
|
|
- },
|
537
|
177
|
handleSizeChange(val){
|
538
|
178
|
this.limit = val
|
539
|
179
|
this.getlist()
|
|
@@ -542,123 +182,7 @@ export default {
|
542
|
182
|
this.page = val
|
543
|
183
|
this.getlist()
|
544
|
184
|
},
|
545
|
|
- querySearchAsync(keyword, cb) {
|
546
|
|
- let key = '';
|
547
|
|
- if (keyword != undefined) {
|
548
|
|
- key = keyword
|
549
|
|
- }
|
550
|
|
- postSearchDrugWarehouseList(key).then(response => {
|
551
|
|
- if (response.data.state == 1) {
|
552
|
|
-
|
553
|
|
- var list = response.data.data.list
|
554
|
|
- console.log("列表数据",list)
|
555
|
|
- this.drugList = list
|
556
|
|
- var manufacturerList = response.data.data.manufacturerList
|
557
|
|
- this.manufacturerList = manufacturerList
|
558
|
|
- var dealer = response.data.data.dealerList
|
559
|
|
- this.dealerList = dealer
|
560
|
|
- for(let i=0;i<this.drugList.length;i++){
|
561
|
|
- for(let j=0;j<this.manufacturerList.length;j++){
|
562
|
|
- if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
|
563
|
|
- this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
|
564
|
|
- }
|
565
|
|
- }
|
566
|
|
- }
|
567
|
|
-
|
568
|
|
- for(let i=0;i<this.drugList.length;i++){
|
569
|
|
- for(let j=0;j<this.dealerList.length;j++){
|
570
|
|
- if(this.drugList[i].dealer == this.dealerList[j].id){
|
571
|
|
- this.drugList[i].dealer = this.dealerList[j].dealer_name
|
572
|
|
- }
|
573
|
|
- }
|
574
|
|
- }
|
575
|
|
-
|
576
|
|
- cb(this.drugList)
|
577
|
|
- } else {
|
578
|
|
- cb([])
|
579
|
|
- }
|
580
|
|
- })
|
581
|
|
- },
|
582
|
|
-
|
583
|
|
- changeGoodName(val){
|
584
|
|
- this.currentIndex = val
|
585
|
|
- },
|
586
|
|
- handleSelect(val){
|
587
|
|
- console.log("val232323223",val)
|
588
|
|
- this.getDrugBatchNumber(val.drug_id)
|
589
|
|
- var params = {
|
590
|
|
- id:val.drug_id
|
591
|
|
- }
|
592
|
|
- getDrugWarehouseInfoList(params).then(response=>{
|
593
|
|
- if(response.data.state == 1){
|
594
|
|
- var list = response.data.data.list
|
595
|
|
-
|
596
|
|
- for(let i=0;i<list.length;i++){
|
597
|
|
- list[i].stock_max_number = val.min_number * list[i].stock_max_number
|
598
|
|
- }
|
599
|
|
- var total = 0
|
600
|
|
- for(let i=0;i<list.length;i++){
|
601
|
|
- total += (list[i].stock_max_number+list[i].stock_min_number)
|
602
|
|
- }
|
603
|
|
- this.form.id = val.id
|
604
|
|
- this.form.drug_id = val.drug_id,
|
605
|
|
- this.form.drug_name = val.drug_name
|
606
|
|
- this.form.retail_price = val.retail_price
|
607
|
|
- this.form.warehousing_order = val.warehousing_order
|
608
|
|
- this.form.number = val.number
|
609
|
|
- this.form.dealer = val.dealer
|
610
|
|
- this.form.manufacturer = val.manufacturer
|
611
|
|
- this.form.remark = val.remark
|
612
|
|
- this.form.warehousing_unit = val.max_unit
|
613
|
|
- this.form.total = ""
|
614
|
|
- // this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
|
615
|
|
- // this.form.batch_number = val.batch_number
|
616
|
|
- this.form.last_price = val.last_price
|
617
|
|
- this.form.expiry_date = val.expiry_date
|
618
|
|
- this.form.product_date = val.product_date
|
619
|
|
- this.form.specification_name = val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
|
620
|
|
- this.form.drug_origin_place = val.drug_origin_place
|
621
|
|
- this.form.batch_number = ""
|
622
|
|
- this.form.total = ""
|
623
|
|
- }
|
624
|
|
- })
|
625
|
|
- },
|
626
|
|
-
|
627
|
|
- getTotal(total,max_unit,min_unit,min_number){
|
628
|
|
- var str = ""
|
629
|
|
- var min_str = ""
|
630
|
|
- if(total<min_number){
|
631
|
|
- str = ""
|
632
|
|
- min_str = total + min_unit
|
633
|
|
- }
|
634
|
|
- if(total >= min_number){
|
635
|
|
- if(parseInt(total/min_number)!=0){
|
636
|
|
- str = parseInt(total/min_number)+ max_unit
|
637
|
|
- }
|
638
|
|
- if((total%min_number)!=0){
|
639
|
|
- min_str = total%min_number + min_unit
|
640
|
|
- }
|
641
|
|
- }
|
642
|
|
-
|
643
|
|
- return str + min_str
|
644
|
|
- },
|
645
|
|
- changeNumber(val){
|
646
|
|
- console.log("val",val)
|
647
|
|
- this.form.warehousing_info_id = val
|
648
|
|
- this.getDrugWarehouseInfoTotal(val)
|
649
|
|
- },
|
650
|
|
- getDrugBatchNumber(id){
|
651
|
|
- var params = {
|
652
|
|
- id:id
|
653
|
|
- }
|
654
|
|
- getDrugBatchNumber(params).then(response=>{
|
655
|
|
- if(response.data.state == 1){
|
656
|
|
- var list = response.data.data.list
|
657
|
|
- console.log("list2222",list)
|
658
|
|
- this.numberList = list
|
659
|
|
- }
|
660
|
|
- })
|
661
|
|
- },
|
|
185
|
+
|
662
|
186
|
getTime(val) {
|
663
|
187
|
if(val < 0){
|
664
|
188
|
return ""
|
|
@@ -669,115 +193,6 @@ export default {
|
669
|
193
|
return uParseTime(val, '{y}-{m}-{d}')
|
670
|
194
|
}
|
671
|
195
|
},
|
672
|
|
- addPrice(){
|
673
|
|
- console.log("批次号",this.form.batch_number)
|
674
|
|
- if(this.form.drug_name == ""){
|
675
|
|
- this.$message.error("请输入药品名称")
|
676
|
|
- return
|
677
|
|
- }
|
678
|
|
- if(this.form.batch_number == ""){
|
679
|
|
- this.$message.error("请选择批次号")
|
680
|
|
- return false
|
681
|
|
- }
|
682
|
|
- if(this.form.count == ""){
|
683
|
|
- this.$message.error("请输入报损数量")
|
684
|
|
- return false
|
685
|
|
- }
|
686
|
|
- var obj = {
|
687
|
|
- drug_id:this.form.drug_id,
|
688
|
|
- drug_name:this.form.drug_name,
|
689
|
|
- warehousing_unit:this.form.warehousing_unit,
|
690
|
|
- count:this.form.count,
|
691
|
|
- retail_price:this.form.retail_price.toString(),
|
692
|
|
- manufacturer:this.form.manufacturer,
|
693
|
|
- drug_origin_place:this.form.drug_origin_place,
|
694
|
|
- number:this.form.number,
|
695
|
|
- remark:this.form.remark,
|
696
|
|
- new_price:this.form.new_price.toString(),
|
697
|
|
- warehousing_order:this.form.warehousing_order,
|
698
|
|
- dealer:this.form.dealer,
|
699
|
|
- last_price:this.form.last_price,
|
700
|
|
- start_time:this.getTime(new Date()),
|
701
|
|
- number:this.form.number,
|
702
|
|
- expiry_date:this.form.expiry_date,
|
703
|
|
- product_date:this.form.product_date,
|
704
|
|
- specification_name:this.form.specification_name,
|
705
|
|
- drug_origin_place:this.form.drug_origin_place,
|
706
|
|
- warehousing_info_id:this.form.warehousing_info_id,
|
707
|
|
- batch_number:this.form.batch_number,
|
708
|
|
- stock_max_number:this.form.stock_max_number,
|
709
|
|
- stock_min_number:this.form.stock_min_number,
|
710
|
|
- total:this.form.total,
|
711
|
|
- }
|
712
|
|
- this.tableData.push(obj)
|
713
|
|
- this.form.drug_name = ""
|
714
|
|
- this.form.warehousing_unit = ""
|
715
|
|
- this.form.count = ""
|
716
|
|
- this.form.retail_price = ""
|
717
|
|
- this.form.manufacturer = ""
|
718
|
|
- this.form.drug_origin_place = ""
|
719
|
|
- this.form.number = ""
|
720
|
|
- this.form.remark = ""
|
721
|
|
- this.form.new_price = ""
|
722
|
|
- this.form.warehousing_order = ""
|
723
|
|
- this.form.dealer = ""
|
724
|
|
- this.form.last_price = ""
|
725
|
|
- this.form.number = ""
|
726
|
|
- this.form.expiry_date = ""
|
727
|
|
- this.form.product_date = ""
|
728
|
|
- this.form.specification_name = ""
|
729
|
|
- this.form.drug_origin_place = ""
|
730
|
|
- this.form.total = ""
|
731
|
|
- },
|
732
|
|
- saveDrugDamage(){
|
733
|
|
-
|
734
|
|
- for(let i=0;i<this.tableData.length;i++){
|
735
|
|
- this.tableData[i].retail_price = this.tableData[i].retail_price.toString()
|
736
|
|
- this.tableData[i].last_price = this.tableData[i].last_price.toString()
|
737
|
|
- this.tableData[i].new_price = this.tableData[i].new_price.toString()
|
738
|
|
- this.tableData[i].count = parseInt(this.tableData[i].count)
|
739
|
|
- if(this.tableData[i].stock_max_number == ""){
|
740
|
|
- this.tableData[i].stock_max_number = 0
|
741
|
|
- }else{
|
742
|
|
- this.tableData[i].stock_max_number = parseInt(this.tableData[i].stock_max_number)
|
743
|
|
- }
|
744
|
|
- if(this.tableData[i].stock_min_number == ""){
|
745
|
|
- this.tableData[i].stock_min_number = 0
|
746
|
|
- }else{
|
747
|
|
- this.tableData[i].stock_min_number = parseInt(this.tableData[i].stock_min_number)
|
748
|
|
- }
|
749
|
|
- if(this.tableData[i].expiry_date == undefined){
|
750
|
|
- this.tableData[i].expiry_date = 0
|
751
|
|
- }else{
|
752
|
|
- this.tableData[i].expiry_date = this.tableData[i].expiry_date
|
753
|
|
- }
|
754
|
|
- if( this.tableData[i].product_date == undefined){
|
755
|
|
- this.tableData[i].product_date = 0
|
756
|
|
- }else{
|
757
|
|
- this.tableData[i].product_date = this.tableData[i].product_date
|
758
|
|
- }
|
759
|
|
- if(this.tableData[i].dealer == 0){
|
760
|
|
- console.log("你啦")
|
761
|
|
- this.tableData[i].dealer = ""
|
762
|
|
- }
|
763
|
|
-
|
764
|
|
- }
|
765
|
|
- var params= {
|
766
|
|
- tableData:this.tableData,
|
767
|
|
- }
|
768
|
|
- console.log("parasm222",params)
|
769
|
|
-
|
770
|
|
- saveDrugDamage(params).then(response=>{
|
771
|
|
- if(response.data.state == 1){
|
772
|
|
- var msg = response.data.data.msg
|
773
|
|
- console.log("msg",msg)
|
774
|
|
- this.$message.success("保存成功!")
|
775
|
|
- this.dialogVisible = false
|
776
|
|
- this.tableData = []
|
777
|
|
- this.getlist()
|
778
|
|
- }
|
779
|
|
- })
|
780
|
|
- },
|
781
|
196
|
getlist(){
|
782
|
197
|
var params = {
|
783
|
198
|
limit:this.limit,
|
|
@@ -791,10 +206,12 @@ export default {
|
791
|
206
|
this.tableList = response.data.data.list
|
792
|
207
|
this.total = response.data.data.total
|
793
|
208
|
this.doctorList = response.data.data.doctorList
|
|
209
|
+ var datamagelist = response.data.data.damagelist
|
|
210
|
+ console.log("hhh233223",datamagelist)
|
794
|
211
|
}
|
795
|
212
|
})
|
796
|
213
|
},
|
797
|
|
- getDoctorName(id){
|
|
214
|
+ getDoctorName(id){
|
798
|
215
|
var user_name = ""
|
799
|
216
|
for(let i=0;i<this.doctorList.length;i++){
|
800
|
217
|
if(id == this.doctorList[i].admin_user_id){
|
|
@@ -803,242 +220,17 @@ export default {
|
803
|
220
|
}
|
804
|
221
|
return user_name
|
805
|
222
|
},
|
806
|
|
- changePrice(val){
|
807
|
|
- var arr = []
|
808
|
|
-
|
809
|
|
- for(let i=0;i<val.length;i++){
|
810
|
|
- arr.push(val[i].id)
|
811
|
|
- }
|
812
|
|
- var str = arr.join(",")
|
813
|
|
-
|
814
|
|
- console.log("str",str)
|
815
|
|
- this.ids = str
|
816
|
|
-
|
817
|
|
- },
|
818
|
|
- toCheck(){
|
819
|
|
- if(this.ids.length <=0){
|
820
|
|
- this.$message.error("请勾选核对数据")
|
821
|
|
- return
|
822
|
|
- }else{
|
823
|
|
- this.checkDialogVisible = true
|
824
|
|
- }
|
825
|
|
- },
|
826
|
|
- SaveDrugDamagePrice(){
|
827
|
|
- var params = {
|
828
|
|
- ids:this.ids,
|
829
|
|
- check_time:this.getTime(this.check_time),
|
830
|
|
- checker:this.checker,
|
831
|
|
- }
|
832
|
|
- console.log("params",params)
|
833
|
|
- SaveDrugDamagePrice(params).then(response=>{
|
834
|
|
- if(response.data.state == 1){
|
835
|
|
- this.$message.success("保存成功")
|
836
|
|
- var damage = response.data.data.damage
|
837
|
|
- this.checkDialogVisible = false
|
838
|
|
- this.getlist()
|
839
|
|
- }
|
840
|
|
- })
|
841
|
|
- },
|
842
|
|
- toDel(index){
|
843
|
|
- this.tableList.splice(index,1)
|
844
|
|
- },
|
845
|
|
- toEdit(val,index){
|
846
|
|
- this.index = index
|
847
|
|
- this.form.drug_name = val.drug_name
|
848
|
|
- this.form.drug_origin_place = val.drug_origin_place
|
849
|
|
- this.form.last_price = val.last_price
|
850
|
|
- this.form.drug_id = val.drug_id,
|
851
|
|
- this.form.manufacturer = val.manufacturer
|
852
|
|
- this.form.new_price = val.new_price
|
853
|
|
- this.form.number = val.number
|
854
|
|
- this.form.retail_price = val.retail_price
|
855
|
|
- this.form.remark = val.remark
|
856
|
|
- this.form.id = val.id
|
857
|
|
- this.form.count = val.count
|
858
|
|
- this.form.specification_name = val.specification_name
|
859
|
|
- this.form.warehousing_unit = val.warehousing_unit
|
860
|
|
- this.form.stock_max_number = val.stock_max_number
|
861
|
|
- this.form.stock_min_number = val.stock_min_number,
|
862
|
|
- this.editDialogVisible = true
|
863
|
|
- },
|
864
|
|
- EditDrugDamage(){
|
865
|
|
- for(let i=0;i<this.tableData.length;i++){
|
866
|
|
- if(this.form.id == this.tableData[i].id){
|
867
|
|
- this.tableData[i].drug_name = this.form.drug_name
|
868
|
|
- this.tableData[i].drug_origin_place = this.form.drug_origin_place
|
869
|
|
- this.tableData[i].last_price = this.form.last_price
|
870
|
|
- this.tableData[i].new_price = this.form.new_price
|
871
|
|
- this.tableData[i].number = this.form.number
|
872
|
|
- this.tableData[i].retail_price = this.form.retail_price
|
873
|
|
- this.tableData[i].remark = this.form.remark
|
874
|
|
- this.tableData[i].count = this.form.count
|
875
|
|
- this.tableData[i].stock_max_number = this.form.stock_max_number
|
876
|
|
- this.tableData[i].stock_min_number = this.form.stock_min_number
|
877
|
|
- this.tableData[i].manufacturer = this.form.manufacturer
|
878
|
|
- this.tableData[i].dealer = this.form.dealer
|
879
|
|
- }
|
880
|
|
- if(this.index == i){
|
881
|
|
- this.tableData[i].drug_name = this.form.drug_name
|
882
|
|
- this.tableData[i].drug_origin_place = this.form.drug_origin_place
|
883
|
|
- this.tableData[i].last_price = this.form.last_price
|
884
|
|
- this.tableData[i].new_price = this.form.new_price
|
885
|
|
- this.tableData[i].number = this.form.number
|
886
|
|
- this.tableData[i].retail_price = this.form.retail_price
|
887
|
|
- this.tableData[i].remark = this.form.remark
|
888
|
|
- this.tableData[i].count = this.form.count
|
889
|
|
- this.tableData[i].stock_max_number = this.form.stock_max_number
|
890
|
|
- this.tableData[i].stock_min_number = this.form.stock_min_number
|
891
|
|
- this.tableData[i].manufacturer = this.form.manufacturer
|
892
|
|
- this.tableData[i].dealer = this.form.dealer
|
893
|
|
- }
|
894
|
|
- }
|
895
|
|
- this.editDialogVisible = false
|
896
|
|
- this.form.drug_name = ""
|
897
|
|
- this.form.drug_origin_place = ""
|
898
|
|
- this.form.last_price = ""
|
899
|
|
- this.form.manufacturer = ""
|
900
|
|
- this.form.new_price = ""
|
901
|
|
- this.form.number = ""
|
902
|
|
- this.form.retail_price = ""
|
903
|
|
- this.form.remark = ""
|
904
|
|
- this.form.count = ""
|
905
|
|
- },
|
906
|
|
- moDrugDamage(id,checker_status){
|
907
|
|
- if(checker_status == 1){
|
908
|
|
- this.$message.error("已核对不能编辑")
|
909
|
|
- return false
|
910
|
|
- }
|
911
|
|
- getDrugDamageDetail(id).then(response=>{
|
912
|
|
- if(response.data.state ==1){
|
913
|
|
- var detail = response.data.data.detail
|
914
|
|
- console.log("系准给",detail)
|
915
|
|
- this.form.drug_id = detail.drug_id
|
916
|
|
- this.form.drug_name = detail.drug_name
|
917
|
|
- this.form.drug_origin_place = detail.drug_origin_place
|
918
|
|
- this.form.last_price = detail.last_price
|
919
|
|
- this.form.manufacturer = detail.manufacturer
|
920
|
|
- this.form.new_price = detail.new_price
|
921
|
|
- this.form.number = detail.number
|
922
|
|
- this.form.retail_price = detail.retail_price
|
923
|
|
- this.form.remark = detail.remark
|
924
|
|
- this.form.count = detail.count
|
925
|
|
- this.id = detail.id
|
926
|
|
- this.form.warehousing_unit = detail.warehousing_unit
|
927
|
|
- this.form.stock_max_number = detail.stock_max_number
|
928
|
|
- this.form.stock_min_number = detail.stock_min_number
|
929
|
|
- this.form.total = detail.total
|
930
|
|
- this.form.warehousing_info_id = detail.warehousing_info_id
|
931
|
|
- this.modifyDialogVisible = true
|
932
|
|
- }
|
933
|
|
- })
|
934
|
|
- },
|
935
|
|
- modifyDrugDamage(){
|
936
|
|
- if(this.form.stock_max_number == ""){
|
937
|
|
- this.form.stock_max_number = 0
|
938
|
|
- }else{
|
939
|
|
- this.form.stock_max_number = parseInt(this.form.stock_max_number)
|
940
|
|
- }
|
941
|
|
- if(this.form.stock_min_number == ""){
|
942
|
|
- this.form.stock_min_number = 0
|
943
|
|
- }else{
|
944
|
|
- this.form.stock_min_number = parseInt(this.form.stock_min_number)
|
945
|
|
- }
|
946
|
|
- var params = {
|
947
|
|
- drug_id:this.form.drug_id,
|
948
|
|
- drug_name:this.form.drug_name,
|
949
|
|
- drug_origin_place:this.form.drug_origin_place,
|
950
|
|
- last_price:this.form.last_price,
|
951
|
|
- manufacturer:this.form.manufacturer,
|
952
|
|
- new_price:this.form.new_price.toString(),
|
953
|
|
- number:this.form.number,
|
954
|
|
- retail_price:this.form.retail_price,
|
955
|
|
- remark:this.form.remark,
|
956
|
|
- count:parseInt(this.form.count),
|
957
|
|
- warehousing_unit:this.form.warehousing_unit,
|
958
|
|
- id:this.id,
|
959
|
|
- total:this.form.total,
|
960
|
|
- stock_max_number:this.form.stock_max_number,
|
961
|
|
- stock_min_number:this.form.stock_min_number,
|
962
|
|
- }
|
963
|
|
- modifyDrugDamage(params).then(response=>{
|
964
|
|
- if(response.data.state == 1){
|
965
|
|
- var damage = response.data.data.damage
|
966
|
|
- this.$message.success("保存成功")
|
967
|
|
- this.modifyDialogVisible = false
|
968
|
|
- this.getlist()
|
969
|
|
- }
|
970
|
|
- })
|
971
|
|
- },
|
|
223
|
+ changeStartTime(){
|
972
|
224
|
|
973
|
|
- deleteDrugDamage(id,checker_status,index){
|
974
|
|
- if(checker_status == 1){
|
975
|
|
- this.$message.error("已核对不能删除")
|
976
|
|
- return false
|
977
|
|
- }
|
978
|
|
- this.$confirm('是否删除所选内容?', '提示', {
|
979
|
|
- confirmButtonText: '确定',
|
980
|
|
- cancelButtonText: '取消',
|
981
|
|
- type: 'warning'
|
982
|
|
- }).then(() => {
|
983
|
|
- let params = {
|
984
|
|
- id:id,
|
985
|
|
- }
|
986
|
|
- deleteDrugDamage(params).then(response => {
|
987
|
|
- if (response.data.state == 1) {
|
988
|
|
- var msg = response.data.data.msg
|
989
|
|
- this.$message.success("保存成功")
|
990
|
|
- this.tableList.splice(index,1)
|
991
|
|
- }
|
992
|
|
- })
|
993
|
|
- }).catch(() => {
|
994
|
|
- this.loading = false
|
995
|
|
- });
|
996
|
|
- },
|
997
|
|
- changeStartTime(val){
|
998
|
|
- this.start_time = this.getTime(val)
|
999
|
|
- this.getlist()
|
1000
|
225
|
},
|
1001
|
|
- changeEndTime(val){
|
1002
|
|
- this.end_time = this.getTime(val)
|
1003
|
|
- this.getlist()
|
1004
|
|
- },
|
1005
|
|
- getDrugWarehouseInfoTotal(val){
|
1006
|
|
- var params = {
|
1007
|
|
- id:val,
|
1008
|
|
- }
|
1009
|
|
- getDrugWarehouseInfoTotal(params).then(response=>{
|
1010
|
|
- if(response.data.state == 1){
|
1011
|
|
- var list = response.data.data.list
|
1012
|
|
- console.log("list",list)
|
1013
|
|
-
|
1014
|
|
- var max_total = 0
|
1015
|
|
- var min_total = 0
|
1016
|
|
- for(let i=0;i<list.length;i++){
|
1017
|
|
- max_total += list[i].stock_max_number
|
1018
|
|
- min_total +=list[i].stock_min_number
|
1019
|
|
- }
|
1020
|
|
-
|
1021
|
|
- if(max_total >0 ){
|
1022
|
|
- this.form.total = max_total + list[0].XtBaseDrug.max_unit
|
1023
|
|
- }
|
1024
|
|
- if(min_total > 0){
|
1025
|
|
- this.form.total = this.form.total + min_total + list[0].XtBaseDrug.min_unit
|
1026
|
|
- }
|
1027
|
|
- console.log("hh232332232323",this.form.total)
|
1028
|
|
- }
|
1029
|
|
- })
|
1030
|
|
- },
|
1031
|
|
- changeMaxUnit(){
|
|
226
|
+ changeEndTime(){
|
1032
|
227
|
|
1033
|
228
|
}
|
1034
|
229
|
},
|
1035
|
230
|
created(){
|
1036
|
|
-
|
1037
|
231
|
this.getlist()
|
1038
|
232
|
},
|
1039
|
|
- mounted() {
|
1040
|
|
- },
|
1041
|
|
-};
|
|
233
|
+}
|
1042
|
234
|
</script>
|
1043
|
235
|
|
1044
|
236
|
<style rel="stylesheet/scss" lang="scss">
|