XMLWAN vor 3 Jahren
Ursprung
Commit
8bf01c1085

+ 16 - 0
src/api/drug/drug_stock.js Datei anzeigen

469
     params: params
469
     params: params
470
   })
470
   })
471
 }
471
 }
472
+
473
+export function getDrugCountList(params) {
474
+  return request({
475
+    url: '/api/drug/getdrugcountlist',
476
+    method: 'get',
477
+    params: params
478
+  })
479
+}
480
+
481
+export function getSinleOrderDetail(params) {
482
+  return request({
483
+    url: '/api/drug/getsingleorderdetail',
484
+    method: 'get',
485
+    params: params
486
+  })
487
+}

+ 34 - 34
src/router/modules/selfPreparedMedicine.js Datei anzeigen

21
     },
21
     },
22
 
22
 
23
     {
23
     {
24
-        path: '/stock/selfPreparedMedicineIndex',
25
-        component: () => import('@/xt_pages/stock/selfPreparedMedicine/index'),
26
-        name: 'selfPreparedMedicineIndex',
27
-        meta: { title: 'selfPreparedMedicineIndex', noCache: true }
24
+      path: '/stock/selfPreparedMedicineIndex',
25
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/index'),
26
+      name: 'selfPreparedMedicineIndex',
27
+      meta: { title: 'selfPreparedMedicineIndex', noCache: true }
28
     },
28
     },
29
     {
29
     {
30
-        path: '/stock/selfPreparedMedicineQuery',
31
-        component: () => import('@/xt_pages/stock/selfPreparedMedicine/query'),
32
-        name: 'selfPreparedMedicineQuery',
33
-        meta: { title: 'selfPreparedMedicineQuery', noCache: true }
30
+      path: '/stock/selfPreparedMedicineQuery',
31
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/query'),
32
+      name: 'selfPreparedMedicineQuery',
33
+      meta: { title: 'selfPreparedMedicineQuery', noCache: true }
34
     },
34
     },
35
     {
35
     {
36
-        path: '/stock/selfPreparedMedicineQueryPrint',
37
-        component: () => import('@/xt_pages/stock/selfPreparedMedicine/queryPrint'),
38
-        name: 'selfPreparedMedicineQueryPrint',
39
-        hidden: true,
40
-        is_menu: false,
41
-        meta: { title: 'selfPreparedMedicineQueryPrint', noCache: true }
36
+      path: '/stock/selfPreparedMedicineQueryPrint',
37
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/queryPrint'),
38
+      name: 'selfPreparedMedicineQueryPrint',
39
+      hidden: true,
40
+      is_menu: false,
41
+      meta: { title: 'selfPreparedMedicineQueryPrint', noCache: true }
42
     },
42
     },
43
     {
43
     {
44
-        path: '/stock/selfPreparedMedicineInfo',
45
-        component: () => import('@/xt_pages/stock/selfPreparedMedicine/info'),
46
-        name: 'selfPreparedMedicineInfo',
47
-        meta: { title: 'selfPreparedMedicineInfo', noCache: true }
44
+      path: '/stock/selfPreparedMedicineInfo',
45
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/info'),
46
+      name: 'selfPreparedMedicineInfo',
47
+      meta: { title: 'selfPreparedMedicineInfo', noCache: true }
48
     },
48
     },
49
     {
49
     {
50
       path: '/stock/stockprint',
50
       path: '/stock/stockprint',
53
       hidden: true,
53
       hidden: true,
54
       is_menu: false,
54
       is_menu: false,
55
       meta: { title: 'stockprint', noCache: true }
55
       meta: { title: 'stockprint', noCache: true }
56
-     },
57
-     {
58
-       path:"/stock/selfstockprint",
59
-       component:()=>import('@/xt_pages/stock/selfStockPrint'),
60
-       name:'selfStockQuery',
61
-       hidden:true,
62
-       is_menu:false,
63
-       meta:{title:'selfStockPrint',noCache:true}
64
-     },
56
+    },
57
+    {
58
+      path: '/stock/selfstockprint',
59
+      component: () => import('@/xt_pages/stock/selfStockPrint'),
60
+      name: 'selfStockQuery',
61
+      hidden: true,
62
+      is_menu: false,
63
+      meta: { title: 'selfStockPrint', noCache: true }
64
+    },
65
 
65
 
66
-     {
66
+    {
67
       path: '/stock/stockprint',
67
       path: '/stock/stockprint',
68
       component: () => import('@/xt_pages/stock/stockPrint'),
68
       component: () => import('@/xt_pages/stock/stockPrint'),
69
       name: 'stockqueryprint',
69
       name: 'stockqueryprint',
70
       hidden: true,
70
       hidden: true,
71
       is_menu: false,
71
       is_menu: false,
72
       meta: { title: 'stockprint', noCache: true }
72
       meta: { title: 'stockprint', noCache: true }
73
-     },
73
+    },
74
 
74
 
75
-     {
75
+    {
76
       path: '/stock/in/detail/print',
76
       path: '/stock/in/detail/print',
77
       component: () => import('@/xt_pages/stock/stockInOrderDetailPrint'),
77
       component: () => import('@/xt_pages/stock/stockInOrderDetailPrint'),
78
       name: 'stockInDetailPrint',
78
       name: 'stockInDetailPrint',
79
       hidden: true,
79
       hidden: true,
80
       is_menu: false,
80
       is_menu: false,
81
-      meta: { title: 'stockInDetailPrint',noCache: true }
81
+      meta: { title: 'stockInDetailPrint', noCache: true }
82
     },
82
     },
83
     {
83
     {
84
-      path: '/stock/out/detail',
84
+      path: '/stock/out/detail/print',
85
       component: () => import('@/xt_pages/stock/stockOutOrderDetailPrint'),
85
       component: () => import('@/xt_pages/stock/stockOutOrderDetailPrint'),
86
       name: 'stockOutDetailPrint',
86
       name: 'stockOutDetailPrint',
87
       hidden: true,
87
       hidden: true,
88
       is_menu: false,
88
       is_menu: false,
89
-      meta: { title: 'stockOutDetailPrint',noCache: true }
90
-    },
89
+      meta: { title: 'stockOutDetailPrint', noCache: true }
90
+    }
91
   ]
91
   ]
92
 }
92
 }

+ 9 - 9
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Datei anzeigen

64
 
64
 
65
                         </el-button>
65
                         </el-button>
66
 
66
 
67
-                        <!--<el-button-->
68
-                                <!--size="small" @click="sz_open(8)" type="primary"-->
69
-                        <!--&gt;预结算-->
70
-                        <!--</el-button>-->
67
+                        <el-button
68
+                                size="small" @click="sz_open(8)" type="primary"
69
+                        >预结算
70
+                        </el-button>
71
 
71
 
72
-                        <!--<el-button-->
73
-                                <!--v-if="this.order.order_status == 1"-->
74
-                                <!--size="small" @click="sz_open(7)" type="primary"-->
75
-                        <!--&gt;撤销明细-->
76
-                        <!--</el-button>-->
72
+                        <el-button
73
+                                v-if="this.order.order_status == 1"
74
+                                size="small" @click="sz_open(7)" type="primary"
75
+                        >撤销明细
76
+                        </el-button>
77
 
77
 
78
                         <el-button
78
                         <el-button
79
                                 v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"
79
                                 v-if="(this.hisPatientInfo.id > 0 && this.order.id == 0) || this.order.order_status == 1"

+ 89 - 15
src/xt_pages/stock/drugs/drugStockFlow.vue Datei anzeigen

62
         </el-table-column>
62
         </el-table-column>
63
         <el-table-column prop="drug_type" label="出入库方式" width="180">
63
         <el-table-column prop="drug_type" label="出入库方式" width="180">
64
            <template slot-scope="scope">
64
            <template slot-scope="scope">
65
-             <span v-if="scope.row.drug_way == 4">入库</span>
66
-             <span v-if="scope.row.drug_way == 2">出库</span>
65
+             <span v-if="scope.row.drug_way == 4">手动入库</span>
66
+             <span v-if="scope.row.drug_way == 2">手动出库</span>
67
            </template>
67
            </template>
68
         </el-table-column>
68
         </el-table-column>
69
         <el-table-column prop="drug_name" label="出/入库单据编码">
69
         <el-table-column prop="drug_name" label="出/入库单据编码">
84
              <span v-if="scope.row.drug_way == 2">{{scope.row.warehousing_order}}</span>
84
              <span v-if="scope.row.drug_way == 2">{{scope.row.warehousing_order}}</span>
85
            </template>
85
            </template>
86
         </el-table-column>
86
         </el-table-column>
87
-         <el-table-column prop="drug_name" label="库存剩余量">
87
+         <el-table-column prop="drug_name" label="剩余库存量">
88
            <template slot-scope="scope">
88
            <template slot-scope="scope">
89
-             <span v-if="scope.row.drug_way == 4"> {{scope.row.stock_max_numbe}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}}</span>
90
-             <span v-if="scope.row.drug_way == 2">{{scope.row.count}}</span>
89
+             <!-- <span v-if="scope.row.drug_way == 4"> {{scope.row.stock_max_numbe}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}}</span>
90
+             <span v-if="scope.row.drug_way == 2">{{scope.row.count}}</span> -->
91
+              {{getInCount(scope.row.drug_id) - getOutCount(scope.row.drug_id) - getAutoCount(scope.row.drug_id)}}
92
+             <span></span>
91
            </template>
93
            </template>
92
         </el-table-column>
94
         </el-table-column>
93
         <el-table-column prop="drug_name" label="进/出货单价">
95
         <el-table-column prop="drug_name" label="进/出货单价">
140
 <script>
142
 <script>
141
   import { uParseTime } from '@/utils/tools'
143
   import { uParseTime } from '@/utils/tools'
142
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
144
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
143
-  import { getDrugStockFlow,getOutDrugStockFlow } from '@/api/drug/drug_stock'
145
+  import { getDrugStockFlow,getOutDrugStockFlow,getDrugCountList } from '@/api/drug/drug_stock'
144
   import SettingDialog from './settingDialog/index'
146
   import SettingDialog from './settingDialog/index'
145
   import { getDictionaryDataConfig } from "@/utils/data";
147
   import { getDictionaryDataConfig } from "@/utils/data";
146
   export default {
148
   export default {
151
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
153
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
152
       this.getlist()
154
       this.getlist()
153
       this.getOutList()
155
       this.getOutList()
156
+      this.getDrugCountList()
154
     },
157
     },
155
     components: {
158
     components: {
156
       SettingDialog,
159
       SettingDialog,
193
           {id:0,name:"全部"},
196
           {id:0,name:"全部"},
194
           {id:1,name:"手动出库"},
197
           {id:1,name:"手动出库"},
195
           {id:2,name:"自动出库"},
198
           {id:2,name:"自动出库"},
196
-          {id:3,name:"入库"},
199
+          {id:3,name:"手动入库"},
197
 
200
 
198
         ],
201
         ],
199
         outList:[],
202
         outList:[],
203
+        countList:[],
204
+        outCountList:[],
205
+        autoCountList:[],
200
       }
206
       }
201
     },
207
     },
202
     methods:{
208
     methods:{
244
                   outList[i].drug_way = 2
250
                   outList[i].drug_way = 2
245
                   this.tableList.push(outList[i])
251
                   this.tableList.push(outList[i])
246
                }
252
                }
247
-              // for(let i=0;i<this.tableList.length;i++){
248
-              //   this.tableList[i].index = i+1
249
-              // }
250
               console.log("列表数据",this.tableList)
253
               console.log("列表数据",this.tableList)
251
             }
254
             }
252
          })
255
          })
253
        },
256
        },
254
        handleSizeChange(val) {
257
        handleSizeChange(val) {
255
         this.limit = val
258
         this.limit = val
256
-        this.GetAllDrugStockQueryList()
259
+        this.getlist()
257
       },
260
       },
258
       handleCurrentChange(val) {
261
       handleCurrentChange(val) {
259
         this.page = val
262
         this.page = val
260
-        this.GetAllDrugStockQueryList()
263
+        this.getlist()
261
       },
264
       },
262
         
265
         
263
     startTimeChange: function(val) {
266
     startTimeChange: function(val) {
267
         this.$message.error("开始时间不能大于结束时间");
270
         this.$message.error("开始时间不能大于结束时间");
268
         this.start_time = "";
271
         this.start_time = "";
269
       } else {
272
       } else {
270
-        this.GetAllDrugStockQueryList();
273
+        this.getlist();
271
       }
274
       }
272
     },
275
     },
273
     endTimeChange: function(val) {
276
     endTimeChange: function(val) {
276
         this.$message.error("结束时间不能小于开始时间");
279
         this.$message.error("结束时间不能小于开始时间");
277
         this.end_time = "";
280
         this.end_time = "";
278
       } else {
281
       } else {
279
-        this.GetAllDrugStockQueryList();
282
+        this.getlist();
280
       }
283
       }
281
      },
284
      },
282
-     changeDrug(){},
283
      getManufacturer(id){
285
      getManufacturer(id){
284
        var name = ""
286
        var name = ""
285
        for(let i=0;i<this.manufacturerList.length;i++){
287
        for(let i=0;i<this.manufacturerList.length;i++){
299
         return uParseTime(val, '{y}-{m}-{d}')
301
         return uParseTime(val, '{y}-{m}-{d}')
300
       }
302
       }
301
      },
303
      },
304
+    getDrugCountList(){
305
+         var params = {
306
+          keyword: this.keywords,
307
+          start_time:this.start_time,
308
+          end_time:this.end_time,
309
+         }
310
+      getDrugCountList(params).then(response=>{
311
+          if(response.data.state == 1){
312
+            var countlist =  response.data.data.countList
313
+            console.log("入库数据",countlist)
314
+            this.countList = countlist
315
+            var outcountlist = response.data.data.outCountList
316
+            console.log("出库数据",outcountlist)
317
+            this.outCountList = this.outCountList
318
+            var aucountlist = response.data.data.auCountList
319
+            console.log("自动数据",aucountlist)
320
+            this.autoCountList = aucountlist
321
+          }
322
+        })
323
+      },
324
+      getInCount(id){
325
+        var count = ""
326
+        for(let i=0;i<this.countList.length;i++){
327
+           if(id == this.countList[i].drug_id){
328
+             count = this.countList[i].count
329
+           }
330
+        }
331
+        return count
332
+      },
333
+
334
+      getOutCount(id){
335
+        var count = ""
336
+        for(let i=0;i<this.outCountList.length;i++){
337
+           if(id == this.outCountList[i].drug_id){
338
+               count = this.outCountList[i].count
339
+           }
340
+        }
341
+        return count
342
+      },
343
+      getAutoCount(id){
344
+        var count= ""
345
+        for(let i=0;i<this.autoCountList.length;i++){
346
+          if(id == this.autoCountList[i].drug_id){
347
+            count = this.autoCountList[i].count
348
+          }
349
+        }
350
+        return count
351
+      },
352
+      getTimestamp(time) { // 把时间日期转成时间戳
353
+        return (new Date(time)).getTime() / 1000
354
+      },
355
+      changeDrug(val){
356
+        
357
+        var arr = []
358
+        if(val == 3){
359
+          for(let i=0;i<this.tableList.length;i++){
360
+            if(this.tableList[i].drug_way == 4){
361
+
362
+              arr.push(this.tableList[i])
363
+            }
364
+          }
365
+          this.tableList = arr
366
+        }
367
+        if(val == 1){
368
+          for(let i=0;i<this.tableList.length;i++){
369
+            if(this.tableList[i].drug_way == 2){
370
+              arr.push(this.tableList[i])
371
+            }
372
+          }
373
+          this.tableList = arr
374
+        }
375
+      }
302
     }
376
     }
303
   }
377
   }
304
 </script>
378
 </script>

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue Datei anzeigen

98
               <span>药品类型</span>
98
               <span>药品类型</span>
99
             </template>
99
             </template>
100
              <template slot-scope="scope">
100
              <template slot-scope="scope">
101
-               <el-select v-model="scope.row.drug_type" filterable placeholder="请输入药品类型">
101
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择药品类型">
102
                 <el-option
102
                 <el-option
103
                   v-for="(option, index) in drugTypeList"
103
                   v-for="(option, index) in drugTypeList"
104
                   :key="index"
104
                   :key="index"

+ 23 - 6
src/xt_pages/stock/drugs/drugStockOutOrder.vue Datei anzeigen

214
 
214
 
215
         <el-table-column label="药品名称" align="center">
215
         <el-table-column label="药品名称" align="center">
216
           <template slot-scope="scope">
216
           <template slot-scope="scope">
217
-             {{scope.row.drug.drug_name}}
217
+             {{scope.row.drug_name}}
218
           </template>
218
           </template>
219
         </el-table-column>
219
         </el-table-column>
220
         <el-table-column label="药品类型" align="center">
220
         <el-table-column label="药品类型" align="center">
221
           <template slot-scope="scope">
221
           <template slot-scope="scope">
222
-              {{getDrugType(scope.row.drug.drug_type)}}
222
+              {{getDrugType(scope.row.drug_type)}}
223
           </template>
223
           </template>
224
         </el-table-column>
224
         </el-table-column>
225
          <el-table-column label="规格&单位" align="center">
225
          <el-table-column label="规格&单位" align="center">
226
           <template slot-scope="scope">
226
           <template slot-scope="scope">
227
-             {{scope.row.drug.dose}}&nbsp;{{scope.row.drug.dose_unit}}*{{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
227
+             {{scope.row.dose}}&nbsp;{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
228
           </template>
228
           </template>
229
         </el-table-column>
229
         </el-table-column>
230
        
230
        
256
 
256
 
257
        <el-table-column label="生产厂家" align="center">
257
        <el-table-column label="生产厂家" align="center">
258
           <template slot-scope="scope">
258
           <template slot-scope="scope">
259
-             {{getManufacturerName(scope.row.drug.manufacturer)}}
259
+             {{getManufacturerName(scope.row.manufacturer)}}
260
           </template>
260
           </template>
261
         </el-table-column>
261
         </el-table-column>
262
 
262
 
455
   getDrugWarehouseOutList,
455
   getDrugWarehouseOutList,
456
   getDrugWarehouseOutInfo,
456
   getDrugWarehouseOutInfo,
457
   getDrugWarehouseOutUser,
457
   getDrugWarehouseOutUser,
458
-  getDrugAutoMaticList
458
+  getDrugAutoMaticList,
459
+  getSinleOrderDetail
459
 } from "@/api/drug/drug_stock";
460
 } from "@/api/drug/drug_stock";
460
 import BreadCrumb from "../../components/bread-crumb";
461
 import BreadCrumb from "../../components/bread-crumb";
461
 import { getInitializtion } from '@/api/stock'
462
 import { getInitializtion } from '@/api/stock'
681
     //   this.dialogVisible = true
682
     //   this.dialogVisible = true
682
     // },
683
     // },
683
     handleSearch(val){
684
     handleSearch(val){
685
+       console.log("val2222222222",val)
684
        this.getInitializtion()
686
        this.getInitializtion()
685
-       this.GetOrderDetail(val.id)
687
+       this.getSinleOrderDetail(val.id)
686
        this.list = []
688
        this.list = []
687
        this.getDrugAutoMaticList(val.id,val.time,val.warehouse_out_order_number)
689
        this.getDrugAutoMaticList(val.id,val.time,val.warehouse_out_order_number)
690
+
688
     },
691
     },
689
     GetOrderDetail(order_id) {
692
     GetOrderDetail(order_id) {
690
         const params = {
693
         const params = {
959
        }
962
        }
960
      }
963
      }
961
      return name
964
      return name
965
+   },
966
+   getSinleOrderDetail(id){
967
+       var params = {
968
+         id:id,
969
+       }
970
+     getSinleOrderDetail(params).then(response=>{
971
+        if(response.data.state == 1){
972
+          this.tableShow = true
973
+          this.tableList = []
974
+          var list =  response.data.data.list
975
+          console.log("list",list)
976
+          this.tableList = list
977
+        }
978
+     })
962
    }
979
    }
963
   }
980
   }
964
 };
981
 };

+ 13 - 10
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Datei anzeigen

155
               </el-form-item>
155
               </el-form-item>
156
             </template>
156
             </template>
157
           </el-table-column>
157
           </el-table-column>
158
-          <el-table-column align="center" width="150">
158
+          <!-- <el-table-column align="center" width="150">
159
             <template slot="header" slot-scope="scope" >
159
             <template slot="header" slot-scope="scope" >
160
                   <span>批号</span>
160
                   <span>批号</span>
161
               </template>
161
               </template>
167
                     ></el-input>
167
                     ></el-input>
168
                   </el-form-item>
168
                   </el-form-item>
169
               </template>
169
               </template>
170
-          </el-table-column>
170
+          </el-table-column> -->
171
           <el-table-column width="120" align="center">
171
           <el-table-column width="120" align="center">
172
             <template slot="header" slot-scope="scope">
172
             <template slot="header" slot-scope="scope">
173
               <span>出库数量<span style="color: red">*</span></span>
173
               <span>出库数量<span style="color: red">*</span></span>
256
               ></el-date-picker>
256
               ></el-date-picker>
257
             </template>
257
             </template>
258
           </el-table-column>
258
           </el-table-column>
259
-        
259
+<!--         
260
         <el-table-column align="center" width="150" label="批准文号">
260
         <el-table-column align="center" width="150" label="批准文号">
261
             <template slot-scope="scope">
261
             <template slot-scope="scope">
262
               <el-form-item style="padding-top: 20px">
262
               <el-form-item style="padding-top: 20px">
266
                 ></el-input>
266
                 ></el-input>
267
               </el-form-item>
267
               </el-form-item>
268
             </template>
268
             </template>
269
-          </el-table-column>
269
+          </el-table-column> -->
270
 
270
 
271
           <el-table-column label="备注" width="120" align="center">
271
           <el-table-column label="备注" width="120" align="center">
272
             <template slot-scope="scope">
272
             <template slot-scope="scope">
505
       tempObj["retail_price"] = "";
505
       tempObj["retail_price"] = "";
506
       tempObj["remark"] = "";
506
       tempObj["remark"] = "";
507
       tempObj["min_unit"] = "";
507
       tempObj["min_unit"] = "";
508
+      tempObj['dose'] = ""
509
+      tempObj['dose_unit'] = ""
510
+      tempObj["min_number"] = ""
508
       this.recordInfo.recordData.push(tempObj);
511
       this.recordInfo.recordData.push(tempObj);
509
     },
512
     },
510
     handleDelete: function(index, row) {
513
     handleDelete: function(index, row) {
613
             stockOut: this.recordInfo.recordData
616
             stockOut: this.recordInfo.recordData
614
           };
617
           };
615
           console.log("params222222",params)
618
           console.log("params222222",params)
616
-      
619
+          
617
           postDrugWarehouseOut(
620
           postDrugWarehouseOut(
618
             params,
621
             params,
619
             this.warehouse_out_time,
622
             this.warehouse_out_time,
689
             this.recordInfo.recordData[i].max_unit = val.max_unit
692
             this.recordInfo.recordData[i].max_unit = val.max_unit
690
             this.recordInfo.recordData[i].min_number = val.min_number
693
             this.recordInfo.recordData[i].min_number = val.min_number
691
             this.recordInfo.recordData[i].min_unit = val.min_unit
694
             this.recordInfo.recordData[i].min_unit = val.min_unit
692
-            this.recordInfo.recordData[i].packing_unit = val.packing_unit
695
+         
693
             this.recordInfo.recordData[i].number = val.number
696
             this.recordInfo.recordData[i].number = val.number
694
             this.recordInfo.recordData[i].last_price = val.last_price
697
             this.recordInfo.recordData[i].last_price = val.last_price
695
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
698
             this.recordInfo.recordData[i].manufacturer = val.manufacturer
775
       (nowDay < 10 ? "0" + nowDay : nowDay);
778
       (nowDay < 10 ? "0" + nowDay : nowDay);
776
     const tempObj = {};
779
     const tempObj = {};
777
     tempObj["drug_id"] = 0;
780
     tempObj["drug_id"] = 0;
778
-    tempObj['dosage'] = ''
779
     tempObj['max_unit'] = ''
781
     tempObj['max_unit'] = ''
780
-    tempObj['unval'] = ''
781
     tempObj['min_unit'] = '',
782
     tempObj['min_unit'] = '',
782
-    tempObj['packing_unit'] = '',
783
     tempObj["return_count"] = 0;
783
     tempObj["return_count"] = 0;
784
     tempObj["price"] = "";
784
     tempObj["price"] = "";
785
     tempObj["remark"] = "";
785
     tempObj["remark"] = "";
786
-    tempObj["min_unit"] = "";
787
     tempObj['manufacturer'] = ''
786
     tempObj['manufacturer'] = ''
788
     tempObj['batch_number'] = ''
787
     tempObj['batch_number'] = ''
789
     tempObj['drug_type'] = ''
788
     tempObj['drug_type'] = ''
789
+    tempObj['dose'] = ""
790
+    tempObj['dose_unit'] = ""
791
+    tempObj["min_number"] = ""
792
+    
790
     this.recordInfo.recordData.push(tempObj);
793
     this.recordInfo.recordData.push(tempObj);
791
     this.GetConfigInfo();
794
     this.GetConfigInfo();
792
     this.propForm.goodUnit = this.$store.getters.good_unit;
795
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 7 - 6
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Datei anzeigen

78
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
78
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
79
         >
79
         >
80
 
80
 
81
-          <el-table-column align="center" width="200">
81
+          <el-table-column align="center" width="150px">
82
             <template slot="header" slot-scope="scope">
82
             <template slot="header" slot-scope="scope">
83
               <span>药品名称<span style="color: red">*</span></span>
83
               <span>药品名称<span style="color: red">*</span></span>
84
             </template>
84
             </template>
133
               </el-form-item>
133
               </el-form-item>
134
             </template>
134
             </template>
135
           </el-table-column>
135
           </el-table-column>
136
-         <el-table-column align="center" width="150">
136
+         <!-- <el-table-column align="center" width="150">
137
             <template slot="header" slot-scope="scope" >
137
             <template slot="header" slot-scope="scope" >
138
                   <span>批号</span>
138
                   <span>批号</span>
139
               </template>
139
               </template>
145
                     ></el-input>
145
                     ></el-input>
146
                   </el-form-item>
146
                   </el-form-item>
147
               </template>
147
               </template>
148
-          </el-table-column>
148
+          </el-table-column> -->
149
            <el-table-column width="120" align="center">
149
            <el-table-column width="120" align="center">
150
             <template slot="header" slot-scope="scope">
150
             <template slot="header" slot-scope="scope">
151
               <span>出库数量<span style="color: red">*</span></span>
151
               <span>出库数量<span style="color: red">*</span></span>
230
               ></el-date-picker>
230
               ></el-date-picker>
231
             </template>
231
             </template>
232
           </el-table-column>
232
           </el-table-column>
233
-           <el-table-column align="center" width="150" label="批准文号">
233
+           <!-- <el-table-column align="center" width="150" label="批准文号">
234
             <template slot-scope="scope">
234
             <template slot-scope="scope">
235
               <el-form-item style="padding-top: 20px">
235
               <el-form-item style="padding-top: 20px">
236
                 <el-input
236
                 <el-input
239
                 ></el-input>
239
                 ></el-input>
240
               </el-form-item>
240
               </el-form-item>
241
             </template>
241
             </template>
242
-          </el-table-column>
242
+          </el-table-column> -->
243
 
243
 
244
           <el-table-column label="备注" width="120" align="center">
244
           <el-table-column label="备注" width="120" align="center">
245
             <template slot-scope="scope">
245
             <template slot-scope="scope">
247
             </template>
247
             </template>
248
           </el-table-column>
248
           </el-table-column>
249
 
249
 
250
-          <el-table-column label="操作" align="center" min-width="20">
250
+          <el-table-column label="操作" align="center" width="150" fixed="right">
251
             <template slot-scope="scope">
251
             <template slot-scope="scope">
252
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
252
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
253
 
253
 
548
             const params = {
548
             const params = {
549
               'stockOut': this.recordInfo.recordData
549
               'stockOut': this.recordInfo.recordData
550
             }
550
             }
551
+            console.log("params----",params)
551
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
552
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
552
               if (response.data.state == 0) {
553
               if (response.data.state == 0) {
553
                 this.$message.error(response.data.msg)
554
                 this.$message.error(response.data.msg)

+ 67 - 10
src/xt_pages/stock/drugs/query.vue Datei anzeigen

68
             style="width: 200px;"
68
             style="width: 200px;"
69
             class="filter-item"
69
             class="filter-item"
70
             v-model.trim="keywords"
70
             v-model.trim="keywords"
71
-            placeholder="商品名称/规格名称"
71
+            placeholder="药品名称"
72
           />
72
           />
73
           <el-button
73
           <el-button
74
             size="small"
74
             size="small"
111
              {{getManufacturerList(scope.row.manufacturer)}}
111
              {{getManufacturerList(scope.row.manufacturer)}}
112
            </template>
112
            </template>
113
         </el-table-column>
113
         </el-table-column>
114
+        <el-table-column prop="drug_name" label="入库数量" align="center">
115
+           <template slot-scope="scope">
116
+              {{getInCount(scope.row.drug_id)}}
117
+           </template>
118
+        </el-table-column>
119
+        <el-table-column prop="drug_name" label="出库数量" align="center">
120
+           <template slot-scope="scope">
121
+             {{getOutCount(scope.row.drug_id)}}
122
+           </template>
123
+        </el-table-column>
114
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
124
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
115
            <template slot-scope="scope">
125
            <template slot-scope="scope">
116
-            <span v-if="scope.row.stock_max_number!=''">
117
-              {{scope.row.stock_max_number}}{{scope.row.max_unit}}
118
-              <span v-if="scope.row.stock_min_number!=''">
119
-                {{scope.row.stock_min_number}}{{scope.row.min_unit}}
120
-              </span>
121
-            </span> 
126
+            {{getInCount(scope.row.drug_id) - getOutCount(scope.row.drug_id) - getAutoCount(scope.row.drug_id)}}
122
            </template>
127
            </template>
123
         </el-table-column>
128
         </el-table-column>
124
         <el-table-column prop="drug_name" label="操作" align="center">
129
         <el-table-column prop="drug_name" label="操作" align="center">
163
 <script>
168
 <script>
164
   import { uParseTime } from '@/utils/tools'
169
   import { uParseTime } from '@/utils/tools'
165
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
170
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
166
-  import { getAllDrugStockQueryList,getDrugStockList } from '@/api/drug/drug_stock'
171
+  import { getAllDrugStockQueryList,getDrugStockList,getDrugCountList } from '@/api/drug/drug_stock'
167
   import SettingDialog from './settingDialog/index'
172
   import SettingDialog from './settingDialog/index'
168
   import { getDictionaryDataConfig } from "@/utils/data";
173
   import { getDictionaryDataConfig } from "@/utils/data";
169
   export default {
174
   export default {
174
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
179
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
175
   
180
   
176
       this.getlist()
181
       this.getlist()
182
+      this.getDrugCountList()
177
     },
183
     },
178
     components: {
184
     components: {
179
       SettingDialog,
185
       SettingDialog,
208
         ],
214
         ],
209
         drugTypeList:[],
215
         drugTypeList:[],
210
         tableList:[],
216
         tableList:[],
211
-        manufacturerList:[]
217
+        manufacturerList:[],
218
+        countList:[],
219
+        outCountList:[],
220
+        autoCountList:[],
221
+        keyword:"",
212
       }
222
       }
213
     },
223
     },
214
     methods: {
224
     methods: {
396
       showCancelStockDetailDialog: function() {
406
       showCancelStockDetailDialog: function() {
397
       },
407
       },
398
       search: function() {
408
       search: function() {
399
-        // this.GetAllDrugStockQueryList()
400
         this.getlist()
409
         this.getlist()
401
       }, 
410
       }, 
402
       setting: function() {
411
       setting: function() {
489
       },
498
       },
490
       handleBatch(id){
499
       handleBatch(id){
491
         this.$router.push({path:'/drugstock/in/drugbatchnumber?drug_id='+id})
500
         this.$router.push({path:'/drugstock/in/drugbatchnumber?drug_id='+id})
501
+      },
502
+      getDrugCountList(){
503
+         var params = {
504
+          keyword: this.keywords,
505
+          start_time:this.start_time,
506
+          end_time:this.end_time,
507
+         }
508
+        getDrugCountList(params).then(response=>{
509
+          if(response.data.state == 1){
510
+            var countlist =  response.data.data.countList
511
+            console.log("入库数据",countlist)
512
+            this.countList = countlist
513
+            var outcountlist = response.data.data.outCountList
514
+            console.log("出库数据",outcountlist)
515
+            this.outCountList = this.outCountList
516
+            var aucountlist = response.data.data.auCountList
517
+            console.log("自动数据",aucountlist)
518
+            this.autoCountList = aucountlist
519
+          }
520
+        })
521
+      },
522
+      getInCount(id){
523
+        var count = ""
524
+        for(let i=0;i<this.countList.length;i++){
525
+           if(id == this.countList[i].drug_id){
526
+             count = this.countList[i].count
527
+           }
528
+        }
529
+        return count
530
+      },
531
+
532
+      getOutCount(id){
533
+        var count = ""
534
+        for(let i=0;i<this.outCountList.length;i++){
535
+           if(id == this.outCountList[i].drug_id){
536
+               count = this.outCountList[i].count
537
+           }
538
+        }
539
+        return count
540
+      },
541
+      getAutoCount(id){
542
+        var count= ""
543
+        for(let i=0;i<this.autoCountList.length;i++){
544
+          if(id == this.autoCountList[i].drug_id){
545
+            count = this.autoCountList[i].count
546
+          }
547
+        }
548
+        return count
492
       }
549
       }
493
     }
550
     }
494
   }
551
   }

+ 15 - 4
src/xt_pages/stock/stockOutOrder.vue Datei anzeigen

69
           @change="changeAllSelected"
69
           @change="changeAllSelected"
70
           >全选</el-checkbox
70
           >全选</el-checkbox
71
         >
71
         >
72
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
73
-          >删除</el-button
74
-        >
72
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
73
+        <el-button size="small" type="primary" @click="toPrint">打印</el-button>
75
       </div>
74
       </div>
76
 
75
 
77
       <el-table
76
       <el-table
817
       userList:[],
816
       userList:[],
818
       editdialogVisibleTwo:false,
817
       editdialogVisibleTwo:false,
819
       editdialogVisibleThree:false,
818
       editdialogVisibleThree:false,
819
+      order_id:0,
820
+      warehouse_out_time:"",
820
     };
821
     };
821
   },
822
   },
822
   methods: {
823
   methods: {
1029
       }
1030
       }
1030
     },
1031
     },
1031
     select(selection) {
1032
     select(selection) {
1033
+      console.log("selection",selection)
1034
+      this.order_id = selection[0].id
1035
+      this.warehouse_out_time = selection[0].warehouse_out_time
1032
       this.selectedTableData = selection;
1036
       this.selectedTableData = selection;
1033
     },
1037
     },
1034
     batchDelete() {
1038
     batchDelete() {
1551
             }
1555
             }
1552
          })
1556
          })
1553
       },
1557
       },
1554
-    
1558
+      toPrint(){
1559
+        if(this.order_id == 0){
1560
+          this.$message.error("请选择出库单")
1561
+        }else{
1562
+            this.$router.push({path:"/stock/out/detail/print?id="+this.order_id+"&warehouse_out_time="+this.warehouse_out_time})
1563
+        }
1564
+      
1565
+      }
1555
   }
1566
   }
1556
 };
1567
 };
1557
 </script>
1568
 </script>