XMLWAN 3 years ago
parent
commit
2ac604339d
2 changed files with 527 additions and 0 deletions
  1. 214 0
      src/xt_pages/stock/drugs/drugBatchNumber.vue
  2. 313 0
      src/xt_pages/stock/drugs/drugStockFlow.vue

+ 214 - 0
src/xt_pages/stock/drugs/drugBatchNumber.vue View File

@@ -0,0 +1,214 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container ">
7
+      <div class="cell clearfix">
8
+       药品名称:
9
+       库存:
10
+       厂家:
11
+      </div>
12
+      <div class="cell clearfix">
13
+        <span>日期查询:</span>
14
+        <el-date-picker
15
+            size="small"
16
+            v-model="start_time"
17
+            prefix-icon="el-icon-date"
18
+            :editable="false"
19
+            style="width: 196px;"
20
+            type="date"
21
+            placeholder="选择日期时间"
22
+            align="right"
23
+            format="yyyy-MM-dd"
24
+            value-format="yyyy-MM-dd"
25
+            @change="startTimeChange"
26
+           ></el-date-picker>-
27
+            <el-date-picker
28
+              size="small"
29
+              v-model="end_time"
30
+              prefix-icon="el-icon-date"
31
+              :editable="false"
32
+              style="width: 196px;margin-right:10px;"
33
+              type="date"
34
+              placeholder="选择日期时间"
35
+              align="right"
36
+              format="yyyy-MM-dd"
37
+              value-format="yyyy-MM-dd"
38
+              @change="endTimeChange"
39
+          ></el-date-picker>
40
+      </div>
41
+      
42
+       <el-table
43
+        :data="tableList"
44
+        border
45
+        style="width: 100%">
46
+        <el-table-column prop="date" label="序号" width="180">
47
+           <template  slot-scope="scope">
48
+              
49
+           </template>
50
+        </el-table-column>
51
+        <el-table-column prop="drug_type" label="入库单据编码" width="180">
52
+           <template slot-scope="scope">
53
+           
54
+           </template>
55
+        </el-table-column>
56
+        <el-table-column prop="drug_name" label="操作日期">
57
+           <template slot-scope="scope">
58
+            
59
+           </template>
60
+        </el-table-column>
61
+        <el-table-column prop="drug_name" label="有效期">
62
+           <template slot-scope="scope">
63
+          
64
+           </template>
65
+        </el-table-column>
66
+         <el-table-column prop="drug_name" label="批号">
67
+           <template slot-scope="scope">
68
+           
69
+           </template>
70
+        </el-table-column>
71
+         <el-table-column prop="drug_name" label="入库数量">
72
+           <template slot-scope="scope">
73
+            
74
+           </template>
75
+        </el-table-column>
76
+        <el-table-column prop="drug_name" label="进货单价">
77
+           <template slot-scope="scope">
78
+            
79
+           </template>
80
+        </el-table-column>
81
+       </el-table>
82
+       
83
+      <el-pagination
84
+        @size-change="handleSizeChange"
85
+        @current-change="handleCurrentChange"
86
+        :page-sizes="[10, 50, 100,500,1000]"
87
+        :page-size="10"
88
+        background
89
+        align="right"
90
+        style="margin-top:20px;"
91
+        layout="total, sizes, prev, pager, next, jumper"
92
+        :total="total"
93
+      >
94
+      </el-pagination>
95
+    </div>
96
+
97
+    <setting-dialog
98
+      ref="dialog"
99
+    ></setting-dialog>
100
+
101
+  </div>
102
+</template>
103
+
104
+<script>
105
+  import { uParseTime } from '@/utils/tools'
106
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
107
+  import { getAllDrugStockQueryList,getDrugStockList } from '@/api/drug/drug_stock'
108
+  import SettingDialog from './settingDialog/index'
109
+  import { getDictionaryDataConfig } from "@/utils/data";
110
+  export default {
111
+    name: 'stockIn',
112
+    created() {
113
+      var drugCategory = getDictionaryDataConfig('system','drug_category')
114
+      this.drugCategory.push(...drugCategory)
115
+      this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
116
+    //   this.getlist()
117
+    },
118
+    components: {
119
+      SettingDialog,
120
+      BreadCrumb
121
+    },
122
+    data() {
123
+      return {
124
+        crumbs: [
125
+          { path: false, name: '库存管理' },
126
+          { path: '/stock/drugs/stock/query', name: '药品库存查询' },
127
+          { path:'/drugstock/in/drugstockflow',name:'库存流水'}
128
+        ],
129
+        keywords: '',
130
+        total: 0,
131
+        multipleSelection: [],
132
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
133
+        start_time: '',
134
+        end_time: '',
135
+        page: 1,
136
+        limit: 10,
137
+        goodType: [],
138
+        goodInfo: [],
139
+        tempArr: [],
140
+        sameRowArr: [],
141
+        WarehouseInfo: {
142
+          loading: false,
143
+          warehouseInfoDate: []
144
+        },
145
+        tableData:[],
146
+        drug_category:0,
147
+        drugCategory:[
148
+          {id:0,name:"全部"}
149
+        ],
150
+        drugTypeList:[],
151
+        tableList:[],
152
+        manufacturerList:[]
153
+      }
154
+    },
155
+    methods:{
156
+
157
+    }
158
+  }
159
+</script>
160
+
161
+<style rel="stylesheet/css" lang="scss" scoped>
162
+  .information {
163
+    border: 1px #dcdfe6 solid;
164
+    padding: 30px 20px 30px 20px;
165
+
166
+  .border {
167
+    border-bottom: 1px #dcdfe6 solid;
168
+    margin: 0px 0 20px 0;
169
+  }
170
+
171
+  }
172
+
173
+  .title {
174
+    background: #409eff;
175
+    height: 44px;
176
+    line-height: 44px;
177
+    padding: 0 0 0 10px;
178
+    color: #fff;
179
+    margin: 0 0 10px 0;
180
+  }
181
+
182
+  .edit_separater {
183
+    border-top: 1px solid rgb(233, 233, 233);
184
+    margin-top: 15px;
185
+    margin-bottom: 15px;
186
+  }
187
+</style>
188
+
189
+<style>
190
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
191
+    font-size: 12px;
192
+  }
193
+
194
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
195
+    background: #6fb5fa;
196
+  }
197
+
198
+  .count {
199
+    color: #bd2c00;
200
+  }
201
+
202
+  .el-table td,
203
+  .el-table th.is-leaf,
204
+  .el-table--border,
205
+  .el-table--group {
206
+    border-color: #d0d3da;
207
+  }
208
+
209
+  .el-table--border::after,
210
+  .el-table--group::after,
211
+  .el-table::before {
212
+    background-color: #d0d3da;
213
+  }
214
+</style>

+ 313 - 0
src/xt_pages/stock/drugs/drugStockFlow.vue View File

@@ -0,0 +1,313 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container ">
7
+      <div class="cell clearfix">
8
+       药品名称:<span v-if="list.length>0">{{list[0].drug_name}}</span>
9
+       库存:
10
+       厂家:<span v-if="list.length>0">{{getManufacturer(list[0].manufacturer)}}</span>
11
+      </div>
12
+      <div class="cell clearfix">
13
+        <span>日期查询:</span>
14
+        <el-date-picker
15
+            size="small"
16
+            v-model="start_time"
17
+            prefix-icon="el-icon-date"
18
+            :editable="false"
19
+            style="width: 196px;"
20
+            type="date"
21
+            placeholder="选择日期时间"
22
+            align="right"
23
+            format="yyyy-MM-dd"
24
+            value-format="yyyy-MM-dd"
25
+            @change="startTimeChange"
26
+           ></el-date-picker>-
27
+            <el-date-picker
28
+              size="small"
29
+              v-model="end_time"
30
+              prefix-icon="el-icon-date"
31
+              :editable="false"
32
+              style="width: 196px;margin-right:10px;"
33
+              type="date"
34
+              placeholder="选择日期时间"
35
+              align="right"
36
+              format="yyyy-MM-dd"
37
+              value-format="yyyy-MM-dd"
38
+              @change="endTimeChange"
39
+          ></el-date-picker>
40
+
41
+        <span>出入库方式:</span>
42
+        <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
43
+            <el-option
44
+              v-for="(item,index) in stockType"
45
+              :key="index"
46
+              :label="item.name"
47
+              :value="item.id">
48
+            </el-option>
49
+        </el-select>
50
+        
51
+        
52
+      </div>
53
+      
54
+       <el-table
55
+        :data="tableList"
56
+        border
57
+        style="width: 100%">
58
+        <el-table-column prop="date" label="序号" width="180">
59
+           <template  slot-scope="scope">
60
+              
61
+           </template>
62
+        </el-table-column>
63
+        <el-table-column prop="drug_type" label="出入库方式" width="180">
64
+           <template slot-scope="scope">
65
+           
66
+           </template>
67
+        </el-table-column>
68
+        <el-table-column prop="drug_name" label="出/入库单据编码">
69
+           <template slot-scope="scope">
70
+            
71
+           </template>
72
+        </el-table-column>
73
+        <el-table-column prop="drug_name" label="操作日期">
74
+           <template slot-scope="scope">
75
+          
76
+           </template>
77
+        </el-table-column>
78
+         <el-table-column prop="drug_name" label="出入库数量">
79
+           <template slot-scope="scope">
80
+           
81
+           </template>
82
+        </el-table-column>
83
+         <el-table-column prop="drug_name" label="库存剩余量">
84
+           <template slot-scope="scope">
85
+            
86
+           </template>
87
+        </el-table-column>
88
+        <el-table-column prop="drug_name" label="进/出货单价">
89
+           <template slot-scope="scope">
90
+            
91
+           </template>
92
+        </el-table-column>
93
+         <el-table-column prop="drug_name" label="有效期">
94
+           <template slot-scope="scope">
95
+            
96
+           </template>
97
+        </el-table-column>
98
+        <el-table-column prop="drug_name" label="批号">
99
+           <template slot-scope="scope">
100
+            
101
+           </template>
102
+        </el-table-column>
103
+        <el-table-column prop="drug_name" label="供应商">
104
+           <template slot-scope="scope">
105
+            
106
+           </template>
107
+        </el-table-column>
108
+       </el-table>
109
+       
110
+      <el-pagination
111
+        @size-change="handleSizeChange"
112
+        @current-change="handleCurrentChange"
113
+        :page-sizes="[10, 50, 100,500,1000]"
114
+        :page-size="10"
115
+        background
116
+        align="right"
117
+        style="margin-top:20px;"
118
+        layout="total, sizes, prev, pager, next, jumper"
119
+        :total="total"
120
+      >
121
+      </el-pagination>
122
+    </div>
123
+
124
+    <setting-dialog
125
+      ref="dialog"
126
+    ></setting-dialog>
127
+
128
+  </div>
129
+</template>
130
+
131
+<script>
132
+  import { uParseTime } from '@/utils/tools'
133
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
134
+  import { getDrugStockFlow } from '@/api/drug/drug_stock'
135
+  import SettingDialog from './settingDialog/index'
136
+  import { getDictionaryDataConfig } from "@/utils/data";
137
+  export default {
138
+    name: 'stockIn',
139
+    created() {
140
+      var drugCategory = getDictionaryDataConfig('system','drug_category')
141
+      this.drugCategory.push(...drugCategory)
142
+      this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
143
+      this.getlist()
144
+    },
145
+    components: {
146
+      SettingDialog,
147
+      BreadCrumb
148
+    },
149
+    data() {
150
+      return {
151
+        crumbs: [
152
+          { path: false, name: '库存管理' },
153
+          { path: '/stock/drugs/stock/query', name: '药品库存查询' },
154
+          { path:'/drugstock/in/drugstockflow',name:'库存流水'}
155
+        ],
156
+        keywords: '',
157
+        total: 0,
158
+        multipleSelection: [],
159
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
160
+        start_time: '',
161
+        end_time: '',
162
+        page: 1,
163
+        limit: 10,
164
+        goodType: [],
165
+        goodInfo: [],
166
+        tempArr: [],
167
+        sameRowArr: [],
168
+        WarehouseInfo: {
169
+          loading: false,
170
+          warehouseInfoDate: []
171
+        },
172
+        tableData:[],
173
+        drug_category:0,
174
+        stock_type:0,
175
+        drugCategory:[
176
+          {id:0,name:"全部"}
177
+        ],
178
+        drugTypeList:[],
179
+        tableList:[],
180
+        manufacturerList:[],
181
+        list:[],
182
+        stockType:[
183
+          {id:0,name:"全部"},
184
+          {id:1,name:"手动出库"},
185
+          {id:2,name:"自动出库"},
186
+          {id:3,name:"入库"},
187
+
188
+        ],
189
+        outList:[],
190
+      }
191
+    },
192
+    methods:{
193
+       getlist(){
194
+           var params = {
195
+             drug_id:this.$route.query.drug_id,
196
+             start_time:this.start_time,
197
+             end_time:this.end_time,
198
+             page:this.page,
199
+             limit:this.limit,
200
+             stock_type:this.stockType,  
201
+           }
202
+          console.log("params",params)
203
+         getDrugStockFlow(params).then(response=>{
204
+           if(response.data.state == 1){
205
+            var list = response.data.data.list
206
+            console.log("入库数据",list)
207
+            this.list = list
208
+            var total = response.data.data.total
209
+            this.total = total
210
+            var manufacturerList = response.data.data.manufacturerList
211
+            this.manufacturerList = manufacturerList
212
+            var outList = response.data.data.outList
213
+            console.log("出库数据",outList)
214
+            this.outList = outList
215
+           }
216
+         })  
217
+       },
218
+       handleSizeChange(val) {
219
+        this.limit = val
220
+        this.GetAllDrugStockQueryList()
221
+      },
222
+      handleCurrentChange(val) {
223
+        this.page = val
224
+        this.GetAllDrugStockQueryList()
225
+      },
226
+        
227
+    startTimeChange: function(val) {
228
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
229
+      
230
+      if (time > 0) {
231
+        this.$message.error("开始时间不能大于结束时间");
232
+        this.start_time = "";
233
+      } else {
234
+        this.GetAllDrugStockQueryList();
235
+      }
236
+    },
237
+    endTimeChange: function(val) {
238
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
239
+      if (time < 0) {
240
+        this.$message.error("结束时间不能小于开始时间");
241
+        this.end_time = "";
242
+      } else {
243
+        this.GetAllDrugStockQueryList();
244
+      }
245
+     },
246
+     changeDrug(){},
247
+     getManufacturer(id){
248
+       var name = ""
249
+       for(let i=0;i<this.manufacturerList.length;i++){
250
+         if(id == this.manufacturerList[i].id){
251
+            name = this.manufacturerList[i].name
252
+         }
253
+       }
254
+       return name
255
+     }
256
+    }
257
+  }
258
+</script>
259
+
260
+<style rel="stylesheet/css" lang="scss" scoped>
261
+  .information {
262
+    border: 1px #dcdfe6 solid;
263
+    padding: 30px 20px 30px 20px;
264
+
265
+  .border {
266
+    border-bottom: 1px #dcdfe6 solid;
267
+    margin: 0px 0 20px 0;
268
+  }
269
+
270
+  }
271
+
272
+  .title {
273
+    background: #409eff;
274
+    height: 44px;
275
+    line-height: 44px;
276
+    padding: 0 0 0 10px;
277
+    color: #fff;
278
+    margin: 0 0 10px 0;
279
+  }
280
+
281
+  .edit_separater {
282
+    border-top: 1px solid rgb(233, 233, 233);
283
+    margin-top: 15px;
284
+    margin-bottom: 15px;
285
+  }
286
+</style>
287
+
288
+<style>
289
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
290
+    font-size: 12px;
291
+  }
292
+
293
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
294
+    background: #6fb5fa;
295
+  }
296
+
297
+  .count {
298
+    color: #bd2c00;
299
+  }
300
+
301
+  .el-table td,
302
+  .el-table th.is-leaf,
303
+  .el-table--border,
304
+  .el-table--group {
305
+    border-color: #d0d3da;
306
+  }
307
+
308
+  .el-table--border::after,
309
+  .el-table--group::after,
310
+  .el-table::before {
311
+    background-color: #d0d3da;
312
+  }
313
+</style>