XMLWAN преди 3 години
родител
ревизия
e67ca9f317

+ 59 - 63
src/api/drug/drug_stock.js Целия файл

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
 export function postDrugWarehouse(params, warehousing_time, manufacturer_id, dealer_id, type) {
3
 export function postDrugWarehouse(params, warehousing_time, manufacturer_id, dealer_id, type) {
4
-
5
   return request({
4
   return request({
6
     url: '/api/drugwarehouse/create?warehousing_time=' + warehousing_time + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
5
     url: '/api/drugwarehouse/create?warehousing_time=' + warehousing_time + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
7
     method: 'post',
6
     method: 'post',
186
   })
185
   })
187
 }
186
 }
188
 
187
 
189
-export function EditDrugWarehouse(params, warehousing_time, id,type,manufacturer_id,dealer_id) {
188
+export function EditDrugWarehouse(params, warehousing_time, id, type, manufacturer_id, dealer_id) {
190
   return request({
189
   return request({
191
-    url: '/api/drugwarehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id,
190
+    url: '/api/drugwarehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
192
     method: 'post',
191
     method: 'post',
193
     data: params
192
     data: params
194
   })
193
   })
234
   })
233
   })
235
 }
234
 }
236
 
235
 
237
-export function editDrugSalesReturnInfo(params, return_time, id,type,manufacturer_id,dealer_id) {
236
+export function editDrugSalesReturnInfo(params, return_time, id, type, manufacturer_id, dealer_id) {
238
   return request({
237
   return request({
239
-    url: '/api/drugsalesreturn/edit?return_time=' + return_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id,
238
+    url: '/api/drugsalesreturn/edit?return_time=' + return_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
240
     method: 'post',
239
     method: 'post',
241
     data: params
240
     data: params
242
   })
241
   })
274
   })
273
   })
275
 }
274
 }
276
 
275
 
277
-export function editDrugWarehouseoutInfo(params, warehouse_out_time, id,type,manufacturer_id,dealer_id) {
276
+export function editDrugWarehouseoutInfo(params, warehouse_out_time, id, type, manufacturer_id, dealer_id) {
278
   return request({
277
   return request({
279
-    url: '/api/drugwarehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id+"&dealer_id="+dealer_id,
278
+    url: '/api/drugwarehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
280
     method: 'post',
279
     method: 'post',
281
     data: params
280
     data: params
282
   })
281
   })
290
   })
289
   })
291
 }
290
 }
292
 
291
 
293
-export function editDrugCancelStockInfo(params, cancel_stock_time, id,type,manufacturer_id,dealer_id) {
292
+export function editDrugCancelStockInfo(params, cancel_stock_time, id, type, manufacturer_id, dealer_id) {
294
   return request({
293
   return request({
295
-    url: '/api/drugcancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id+"&dealer_id=" + dealer_id,
294
+    url: '/api/drugcancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
296
     method: 'post',
295
     method: 'post',
297
     data: params
296
     data: params
298
   })
297
   })
345
   })
344
   })
346
 }
345
 }
347
 
346
 
348
-
349
-
350
 export function getPrintStockGood(params) {
347
 export function getPrintStockGood(params) {
351
   return request({
348
   return request({
352
     url: '/api/print/stock',
349
     url: '/api/print/stock',
355
   })
352
   })
356
 }
353
 }
357
 
354
 
358
-
359
-
360
 export function getDrugWarehouseOutUser(params) {
355
 export function getDrugWarehouseOutUser(params) {
361
   return request({
356
   return request({
362
     url: '/api/drugwarehouseout/user',
357
     url: '/api/drugwarehouseout/user',
365
   })
360
   })
366
 }
361
 }
367
 
362
 
368
-
369
 export function createDrugStockAutomaticReduceConfig(is_open) {
363
 export function createDrugStockAutomaticReduceConfig(is_open) {
370
   return request({
364
   return request({
371
-    url: '/api/drugstock/automaticreduce/isopen?is_open='+is_open,
372
-    method: 'post',
365
+    url: '/api/drugstock/automaticreduce/isopen?is_open=' + is_open,
366
+    method: 'post'
373
   })
367
   })
374
 }
368
 }
375
 
369
 
376
 export function getDrugStockAutomaticReduceConfig() {
370
 export function getDrugStockAutomaticReduceConfig() {
377
   return request({
371
   return request({
378
     url: '/api/drugstockautomaticreduce/get',
372
     url: '/api/drugstockautomaticreduce/get',
379
-    method: 'get',
373
+    method: 'get'
380
   })
374
   })
381
 }
375
 }
382
 
376
 
383
-
384
-export function getDrugIndetail(params){
377
+export function getDrugIndetail(params) {
385
   return request({
378
   return request({
386
-    url:"/api/drugstock/getdrugindetail",
387
-    method:"Get",
388
-    params:params
379
+    url: '/api/drugstock/getdrugindetail',
380
+    method: 'Get',
381
+    params: params
389
   })
382
   })
390
 }
383
 }
391
 
384
 
392
-
393
-export function getDrugCancelOrder(params){
394
-  
395
-   return request({
396
-     url:"/api/drugstock/getdrugcancelorder",
397
-     method:"get",
398
-     params:params
399
-   })
385
+export function getDrugCancelOrder(params) {
386
+  return request({
387
+    url: '/api/drugstock/getdrugcancelorder',
388
+    method: 'get',
389
+    params: params
390
+  })
400
 }
391
 }
401
 
392
 
402
-export function getDrugOutDetail(params){
403
-  
393
+export function getDrugOutDetail(params) {
404
   return request({
394
   return request({
405
-    url:"/api/drugstock/getdrugoutdetail",
406
-    method:"get",
407
-    params:params
395
+    url: '/api/drugstock/getdrugoutdetail',
396
+    method: 'get',
397
+    params: params
408
   })
398
   })
409
 }
399
 }
410
 
400
 
411
-export function getDrugCancelDetail(params){
412
-
401
+export function getDrugCancelDetail(params) {
413
   return request({
402
   return request({
414
-    url:"/api/drugstock/getdrugcanceldetail",
415
-    method:"Get",
416
-    params:params
403
+    url: '/api/drugstock/getdrugcanceldetail',
404
+    method: 'Get',
405
+    params: params
417
   })
406
   })
418
 }
407
 }
419
 
408
 
420
-
421
-export function getDrugAutoMaticList(params){
422
-  
409
+export function getDrugAutoMaticList(params) {
423
   return request({
410
   return request({
424
-    url:"/api/drugstock/getdrugautomaticlist",
425
-    method:"Get",
426
-    params:params,
411
+    url: '/api/drugstock/getdrugautomaticlist',
412
+    method: 'Get',
413
+    params: params
427
   })
414
   })
428
 }
415
 }
429
 
416
 
430
-
431
-export function getDrugWarehouseOrderInfo(params){
432
-   
417
+export function getDrugWarehouseOrderInfo(params) {
433
   return request({
418
   return request({
434
-    url:"/api/drugstock/getdrugwarehouseorderinfo",
435
-    method:"get",
436
-    params:params
419
+    url: '/api/drugstock/getdrugwarehouseorderinfo',
420
+    method: 'get',
421
+    params: params
437
   })
422
   })
438
 }
423
 }
439
 
424
 
440
-
441
-export function getDrugStockList(params){
442
-  
425
+export function getDrugStockList(params) {
443
   return request({
426
   return request({
444
-    url:"/api/drugstock/drugstocklist",
445
-    method:"get",
446
-    params:params
427
+    url: '/api/drugstock/drugstocklist',
428
+    method: 'get',
429
+    params: params
447
   })
430
   })
448
 }
431
 }
449
 
432
 
433
+export function getDrugStockFlow(params) {
434
+  return request({
435
+    url: '/api/drugstock/getdrugstockflow',
436
+    method: 'Get',
437
+    params: params
438
+  })
439
+}
450
 
440
 
451
-export function getDrugStockFlow(params){
452
-  
441
+export function getOutDrugStockFlow(params) {
453
   return request({
442
   return request({
454
-    url:"/api/drugstock/getdrugstockflow",
455
-    method:"Get",
456
-    params:params
443
+    url: '/api/drugoutstock/getoutdrugstockflow',
444
+    method: 'get',
445
+    params: params
457
   })
446
   })
458
 }
447
 }
459
 
448
 
449
+export function getBatchOrderDetail(params) {
450
+  return request({
451
+    url: '/api/drug/getbatchorderdetail',
452
+    method: 'get',
453
+    params: params
454
+  })
455
+}
460
 
456
 

+ 8 - 0
src/api/stock.js Целия файл

617
     params: params
617
     params: params
618
   })
618
   })
619
 }
619
 }
620
+
621
+export function getAllStockList(params) {
622
+  return request({
623
+    url: '/api/good/getallstocklist',
624
+    method: 'get',
625
+    params: params
626
+  })
627
+}

+ 58 - 17
src/xt_pages/stock/drugs/drugBatchNumber.vue Целия файл

43
         :data="tableList"
43
         :data="tableList"
44
         border
44
         border
45
         style="width: 100%">
45
         style="width: 100%">
46
-        <el-table-column prop="date" label="序号" width="180">
46
+        <el-table-column prop="date" label="序号" width="180" align="center">
47
            <template  slot-scope="scope">
47
            <template  slot-scope="scope">
48
-              
48
+              {{scope.$index + 1}}
49
            </template>
49
            </template>
50
         </el-table-column>
50
         </el-table-column>
51
-        <el-table-column prop="drug_type" label="入库单据编码" width="180">
51
+        <el-table-column prop="drug_type" label="入库单据编码" width="180" align="center">
52
            <template slot-scope="scope">
52
            <template slot-scope="scope">
53
-           
53
+              {{scope.row.warehousing_order}}
54
            </template>
54
            </template>
55
         </el-table-column>
55
         </el-table-column>
56
-        <el-table-column prop="drug_name" label="操作日期">
56
+        <el-table-column prop="drug_name" label="操作日期" align="center">
57
            <template slot-scope="scope">
57
            <template slot-scope="scope">
58
-            
58
+              {{getTime(scope.row.ctime)}}
59
            </template>
59
            </template>
60
         </el-table-column>
60
         </el-table-column>
61
-        <el-table-column prop="drug_name" label="有效期">
61
+        <el-table-column prop="drug_name" label="有效期" align="center">
62
            <template slot-scope="scope">
62
            <template slot-scope="scope">
63
-          
63
+              {{getTime(scope.row.expiry_date)}}
64
            </template>
64
            </template>
65
         </el-table-column>
65
         </el-table-column>
66
-         <el-table-column prop="drug_name" label="批号">
66
+         <el-table-column prop="drug_name" label="批号" align="center">
67
            <template slot-scope="scope">
67
            <template slot-scope="scope">
68
-           
68
+              {{scope.row.number}}
69
            </template>
69
            </template>
70
         </el-table-column>
70
         </el-table-column>
71
-         <el-table-column prop="drug_name" label="入库数量">
71
+         <el-table-column prop="drug_name" label="入库数量" align="center">
72
            <template slot-scope="scope">
72
            <template slot-scope="scope">
73
-            
73
+              {{scope.row.stock_max_number}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}}
74
            </template>
74
            </template>
75
         </el-table-column>
75
         </el-table-column>
76
-        <el-table-column prop="drug_name" label="进货单价">
76
+        <el-table-column prop="drug_name" label="进货单价" align="center">
77
            <template slot-scope="scope">
77
            <template slot-scope="scope">
78
-            
78
+              {{scope.row.price}}
79
            </template>
79
            </template>
80
         </el-table-column>
80
         </el-table-column>
81
        </el-table>
81
        </el-table>
104
 <script>
104
 <script>
105
   import { uParseTime } from '@/utils/tools'
105
   import { uParseTime } from '@/utils/tools'
106
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
106
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
107
-  import { getAllDrugStockQueryList,getDrugStockList } from '@/api/drug/drug_stock'
107
+  import { getBatchOrderDetail } from '@/api/drug/drug_stock'
108
   import SettingDialog from './settingDialog/index'
108
   import SettingDialog from './settingDialog/index'
109
   import { getDictionaryDataConfig } from "@/utils/data";
109
   import { getDictionaryDataConfig } from "@/utils/data";
110
   export default {
110
   export default {
113
       var drugCategory = getDictionaryDataConfig('system','drug_category')
113
       var drugCategory = getDictionaryDataConfig('system','drug_category')
114
       this.drugCategory.push(...drugCategory)
114
       this.drugCategory.push(...drugCategory)
115
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
115
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
116
-    //   this.getlist()
116
+       this.getlist()
117
     },
117
     },
118
     components: {
118
     components: {
119
       SettingDialog,
119
       SettingDialog,
153
       }
153
       }
154
     },
154
     },
155
     methods:{
155
     methods:{
156
-
156
+      getlist(){
157
+         var params = {
158
+           drug_id:this.$route.query.drug_id,
159
+           page:this.page,
160
+           limit:this.limit,
161
+         }
162
+        getBatchOrderDetail(params).then(response=>{
163
+           if(response.data.state == 1){
164
+              var detail =  response.data.data.detail
165
+              console.log("detail2343434",detail)
166
+              this.tableList = detail
167
+              var total = response.data.data.total
168
+              console.log("total",total)
169
+           }
170
+        })
171
+      },
172
+      getTime(val) {
173
+       if(val < 0){
174
+           return ""
175
+       }
176
+       if(val == ""){
177
+          return ""
178
+        }else {
179
+          return uParseTime(val, '{y}-{m}-{d}')
180
+        }
181
+     },
182
+   handleSizeChange(val) {
183
+      this.limit = val;
184
+      this.getlist();
185
+    },
186
+    handleCurrentChange(val) {
187
+      this.page = val;
188
+      this.getlist();
189
+    },
190
+    startTimeChange(val){
191
+      this.start_time = val
192
+      this.getlist()
193
+    },
194
+    endTimeChange(val){
195
+      this.end_time = val
196
+      this.getlist()
197
+    }
157
     }
198
     }
158
   }
199
   }
159
 </script>
200
 </script>

+ 62 - 16
src/xt_pages/stock/drugs/drugStockFlow.vue Целия файл

57
         style="width: 100%">
57
         style="width: 100%">
58
         <el-table-column prop="date" label="序号" width="180">
58
         <el-table-column prop="date" label="序号" width="180">
59
            <template  slot-scope="scope">
59
            <template  slot-scope="scope">
60
-              
60
+              {{scope.$index + 1}}
61
            </template>
61
            </template>
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
-           
65
+             <span v-if="scope.row.drug_way == 4">入库</span>
66
+             <span v-if="scope.row.drug_way == 2">出库</span>
66
            </template>
67
            </template>
67
         </el-table-column>
68
         </el-table-column>
68
         <el-table-column prop="drug_name" label="出/入库单据编码">
69
         <el-table-column prop="drug_name" label="出/入库单据编码">
69
            <template slot-scope="scope">
70
            <template slot-scope="scope">
71
+             <span v-if="scope.row.drug_way == 2"> {{scope.row.warehouse_out_order_number}}</span>
72
+             <span v-if="scope.row.drug_way == 4">{{scope.row.warehousing_order}}</span>
70
             
73
             
71
            </template>
74
            </template>
72
         </el-table-column>
75
         </el-table-column>
73
         <el-table-column prop="drug_name" label="操作日期">
76
         <el-table-column prop="drug_name" label="操作日期">
74
            <template slot-scope="scope">
77
            <template slot-scope="scope">
75
-          
78
+             {{getTime(scope.row.ctime)}}
76
            </template>
79
            </template>
77
         </el-table-column>
80
         </el-table-column>
78
          <el-table-column prop="drug_name" label="出入库数量">
81
          <el-table-column prop="drug_name" label="出入库数量">
79
            <template slot-scope="scope">
82
            <template slot-scope="scope">
80
-           
83
+             <span v-if="scope.row.drug_way == 4"> {{scope.row.warehouse_out_order_number}}</span>
84
+             <span v-if="scope.row.drug_way == 2">{{scope.row.warehousing_order}}</span>
81
            </template>
85
            </template>
82
         </el-table-column>
86
         </el-table-column>
83
          <el-table-column prop="drug_name" label="库存剩余量">
87
          <el-table-column prop="drug_name" label="库存剩余量">
84
            <template slot-scope="scope">
88
            <template slot-scope="scope">
85
-            
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>
86
            </template>
91
            </template>
87
         </el-table-column>
92
         </el-table-column>
88
         <el-table-column prop="drug_name" label="进/出货单价">
93
         <el-table-column prop="drug_name" label="进/出货单价">
89
            <template slot-scope="scope">
94
            <template slot-scope="scope">
90
-            
95
+             <span v-if="scope.row.drug_way == 4"> {{scope.row.price}}</span>
96
+             <span v-if="scope.row.drug_way == 2">{{scope.row.price}}</span>
91
            </template>
97
            </template>
92
         </el-table-column>
98
         </el-table-column>
93
          <el-table-column prop="drug_name" label="有效期">
99
          <el-table-column prop="drug_name" label="有效期">
94
            <template slot-scope="scope">
100
            <template slot-scope="scope">
95
-            
101
+             <span v-if="scope.row.drug_way == 4"> {{getTime(scope.row.expiry_date)}}</span>
102
+             <span v-if="scope.row.drug_way == 2">{{getTime(scope.row.expiry_date)}}</span>
96
            </template>
103
            </template>
97
         </el-table-column>
104
         </el-table-column>
98
         <el-table-column prop="drug_name" label="批号">
105
         <el-table-column prop="drug_name" label="批号">
99
            <template slot-scope="scope">
106
            <template slot-scope="scope">
100
-            
107
+             <span v-if="scope.row.drug_way == 2"> {{scope.row.number}}</span>
108
+             <span v-if="scope.row.drug_way == 4">{{scope.row.number}}</span>
101
            </template>
109
            </template>
102
         </el-table-column>
110
         </el-table-column>
103
         <el-table-column prop="drug_name" label="供应商">
111
         <el-table-column prop="drug_name" label="供应商">
104
            <template slot-scope="scope">
112
            <template slot-scope="scope">
105
-            
113
+             <span v-if="scope.row.drug_way == 4"> {{getManufacturer(scope.row.manufacturer)}}</span>
114
+             <span v-if="scope.row.drug_way == 2">{{getManufacturer(scope.row.manufacturer)}}</span>
106
            </template>
115
            </template>
107
         </el-table-column>
116
         </el-table-column>
108
        </el-table>
117
        </el-table>
131
 <script>
140
 <script>
132
   import { uParseTime } from '@/utils/tools'
141
   import { uParseTime } from '@/utils/tools'
133
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
142
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
134
-  import { getDrugStockFlow } from '@/api/drug/drug_stock'
143
+  import { getDrugStockFlow,getOutDrugStockFlow } from '@/api/drug/drug_stock'
135
   import SettingDialog from './settingDialog/index'
144
   import SettingDialog from './settingDialog/index'
136
   import { getDictionaryDataConfig } from "@/utils/data";
145
   import { getDictionaryDataConfig } from "@/utils/data";
137
   export default {
146
   export default {
141
       this.drugCategory.push(...drugCategory)
150
       this.drugCategory.push(...drugCategory)
142
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
151
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
143
       this.getlist()
152
       this.getlist()
153
+      this.getOutList()
144
     },
154
     },
145
     components: {
155
     components: {
146
       SettingDialog,
156
       SettingDialog,
197
              end_time:this.end_time,
207
              end_time:this.end_time,
198
              page:this.page,
208
              page:this.page,
199
              limit:this.limit,
209
              limit:this.limit,
200
-             stock_type:this.stockType,  
210
+             stock_type:this.stock_type,  
201
            }
211
            }
202
           console.log("params",params)
212
           console.log("params",params)
203
          getDrugStockFlow(params).then(response=>{
213
          getDrugStockFlow(params).then(response=>{
204
            if(response.data.state == 1){
214
            if(response.data.state == 1){
205
             var list = response.data.data.list
215
             var list = response.data.data.list
206
             console.log("入库数据",list)
216
             console.log("入库数据",list)
207
-            this.list = list
217
+            for(let i=0;i<list.length;i++){
218
+               list[i].drug_way = 4
219
+               this.tableList.push(list[i])
220
+            }
221
+           
208
             var total = response.data.data.total
222
             var total = response.data.data.total
209
             this.total = total
223
             this.total = total
210
             var manufacturerList = response.data.data.manufacturerList
224
             var manufacturerList = response.data.data.manufacturerList
211
             this.manufacturerList = manufacturerList
225
             this.manufacturerList = manufacturerList
212
-            var outList = response.data.data.outList
213
-            console.log("出库数据",outList)
214
-            this.outList = outList
226
+           
215
            }
227
            }
216
          })  
228
          })  
217
        },
229
        },
230
+       getOutList(){
231
+          var params = {
232
+             drug_id:this.$route.query.drug_id,
233
+             start_time:this.start_time,
234
+             end_time:this.end_time,
235
+             page:this.page,
236
+             limit:this.limit,
237
+             stock_type:this.stock_type,  
238
+           }
239
+          console.log("出库数据",params)
240
+         getOutDrugStockFlow(params).then(response=>{
241
+            if(response.data.state == 1){
242
+               var outList = response.data.data.outList
243
+               for(let i=0;i<outList.length;i++){
244
+                  outList[i].drug_way = 2
245
+                  this.tableList.push(outList[i])
246
+               }
247
+              // for(let i=0;i<this.tableList.length;i++){
248
+              //   this.tableList[i].index = i+1
249
+              // }
250
+              console.log("列表数据",this.tableList)
251
+            }
252
+         })
253
+       },
218
        handleSizeChange(val) {
254
        handleSizeChange(val) {
219
         this.limit = val
255
         this.limit = val
220
         this.GetAllDrugStockQueryList()
256
         this.GetAllDrugStockQueryList()
252
          }
288
          }
253
        }
289
        }
254
        return name
290
        return name
255
-     }
291
+     },
292
+    getTime(val) {
293
+      if(val < 0){
294
+          return ""
295
+      }
296
+      if(val == ""){
297
+        return ""
298
+      }else {
299
+        return uParseTime(val, '{y}-{m}-{d}')
300
+      }
301
+     },
256
     }
302
     }
257
   }
303
   }
258
 </script>
304
 </script>

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrder.vue Целия файл

320
 
320
 
321
         <el-table-column label="规格&单位" align="center">
321
         <el-table-column label="规格&单位" align="center">
322
           <template slot-scope="scope">
322
           <template slot-scope="scope">
323
-             {{scope.row.drug.dosage}}&nbsp;{{scope.row.drug.max_unit}}*{{scope.row.drug.unval}}{{scope.row.drug.min_unit}}/{{scope.row.drug.packing_unit}}
323
+             {{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}}
324
           </template>
324
           </template>
325
         </el-table-column>
325
         </el-table-column>
326
        
326
        

+ 162 - 32
src/xt_pages/stock/drugs/drugStockOutOrder.vue Целия файл

9
         style="float:right;"
9
         style="float:right;"
10
         type="primary"
10
         type="primary"
11
         icon="el-icon-circle-plus-outline"
11
         icon="el-icon-circle-plus-outline"
12
-        >新增</el-button
13
-      >
12
+        >新增</el-button>
14
     </div>
13
     </div>
15
     <div class="app-container">
14
     <div class="app-container">
16
       <div class="cell clearfix">
15
       <div class="cell clearfix">
75
       </div>
74
       </div>
76
 
75
 
77
       <el-table
76
       <el-table
77
+        @current-change="handleSearch"
78
         :data="warehouseOutDate"
78
         :data="warehouseOutDate"
79
         :class="signAndWeighBoxPatients"
79
         :class="signAndWeighBoxPatients"
80
         style="width: 100%"
80
         style="width: 100%"
135
         <el-table-column label="操作" align="center" width="240">
135
         <el-table-column label="操作" align="center" width="240">
136
           <template slot-scope="scope">
136
           <template slot-scope="scope">
137
            
137
            
138
-            <el-tooltip
138
+            <!-- <el-tooltip
139
               class="item"
139
               class="item"
140
               effect="dark"
140
               effect="dark"
141
               content="详情"
141
               content="详情"
148
                 @click="handleSearch(scope.row.id,scope.row.warehouse_out_time,scope.row.warehouse_out_order_number)"
148
                 @click="handleSearch(scope.row.id,scope.row.warehouse_out_time,scope.row.warehouse_out_order_number)"
149
               >
149
               >
150
               </el-button>
150
               </el-button>
151
-            </el-tooltip>
151
+            </el-tooltip> -->
152
 
152
 
153
             <el-tooltip
153
             <el-tooltip
154
               class="item"
154
               class="item"
195
       </el-pagination>
195
       </el-pagination>
196
     </div>
196
     </div>
197
 
197
 
198
+    <div v-show="tableShow" style="margin-bottom:10px">
199
+      <el-table
200
+        :data="tableList"
201
+        :class="signAndWeighBoxPatients"
202
+        style="width: 100%"
203
+        border
204
+        highlight-current-row
205
+        ref="multipleTable"
206
+        @selection-change="select"
207
+        :row-style="{ color: '#303133' }"
208
+        :header-cell-style="{
209
+          backgroundColor: 'rgb(245, 247, 250)',
210
+          color: '#606266'
211
+        }"
212
+      >
213
+        <el-table-column type="selection" width="55" align="center"> </el-table-column>
214
+
215
+        <el-table-column label="药品名称" align="center">
216
+          <template slot-scope="scope">
217
+             {{scope.row.drug.drug_name}}
218
+          </template>
219
+        </el-table-column>
220
+        <el-table-column label="药品类型" align="center">
221
+          <template slot-scope="scope">
222
+              {{getDrugType(scope.row.drug.drug_type)}}
223
+          </template>
224
+        </el-table-column>
225
+         <el-table-column label="规格&单位" align="center">
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}}
228
+          </template>
229
+        </el-table-column>
230
+       
231
+        <el-table-column label="批号" align="center">
232
+          <template slot-scope="scope">
233
+           {{scope.row.number}}
234
+          </template>
235
+        </el-table-column>
236
+        
237
+        <el-table-column label="出库数量" align="center">
238
+          <template slot-scope="scope">
239
+             {{scope.row.count}}
240
+          </template>
241
+        </el-table-column>
242
+
243
+       <el-table-column label="进货价" align="center">
244
+          <template slot-scope="scope">
245
+            {{scope.row.price}}
246
+          </template>
247
+        </el-table-column>
248
+
249
+      
250
+       <el-table-column label="总价" align="center">
251
+          <template slot-scope="scope">
252
+             {{scope.row.total_price}}
253
+          </template>
254
+        </el-table-column>
255
+      
256
+
257
+       <el-table-column label="生产厂家" align="center">
258
+          <template slot-scope="scope">
259
+             {{getManufacturerName(scope.row.drug.manufacturer)}}
260
+          </template>
261
+        </el-table-column>
262
+
263
+
264
+       <el-table-column label="生产日期" align="center">
265
+          <template slot-scope="scope">
266
+             {{getTime(scope.row.product_date)}}
267
+          </template>
268
+        </el-table-column>
269
+       
270
+
271
+       <el-table-column label="有效日期" align="center">
272
+          <template slot-scope="scope">
273
+             {{getTime(scope.row.expiry_date)}}
274
+          </template>
275
+        </el-table-column>
276
+
277
+        <el-table-column label="批准文号" align="center">
278
+          <template slot-scope="scope">
279
+             {{scope.row.number}}
280
+          </template>
281
+        </el-table-column>
282
+
283
+
284
+        <el-table-column label="备注" align="center">
285
+          <template slot-scope="scope">
286
+            {{scope.row.remark}}
287
+          </template>
288
+        </el-table-column>
289
+      </el-table>
290
+
291
+    </div>
292
+
198
 
293
 
199
     <el-dialog
294
     <el-dialog
200
       title="出库详细"
295
       title="出库详细"
249
           </el-table-column>
344
           </el-table-column>
250
           <el-table-column label="总价" min-width="20" align="center">
345
           <el-table-column label="总价" min-width="20" align="center">
251
             <template slot-scope="scope">
346
             <template slot-scope="scope">
252
-              <!-- {{calculate(scope.row.price*scope.row.count)}} -->
253
               <span v-if="drugConfig.is_open == 0 || drugConfig.is_open == 2">{{(scope.row.count * getRetailPrice(scope.row.drug_id)).toFixed(2)}}</span>
347
               <span v-if="drugConfig.is_open == 0 || drugConfig.is_open == 2">{{(scope.row.count * getRetailPrice(scope.row.drug_id)).toFixed(2)}}</span>
254
               <span v-if="drugConfig.is_open == 1">{{(getRetailPrice(scope.row.drug_id) * getDrugCount(scope.row.drug_id)).toFixed(2)}}</span>
348
               <span v-if="drugConfig.is_open == 1">{{(getRetailPrice(scope.row.drug_id) * getDrugCount(scope.row.drug_id)).toFixed(2)}}</span>
255
             </template>
349
             </template>
364
   getDrugAutoMaticList
458
   getDrugAutoMaticList
365
 } from "@/api/drug/drug_stock";
459
 } from "@/api/drug/drug_stock";
366
 import BreadCrumb from "../../components/bread-crumb";
460
 import BreadCrumb from "../../components/bread-crumb";
367
-
461
+import { getInitializtion } from '@/api/stock'
368
 export default {
462
 export default {
369
   name: "salesReturnOrder",
463
   name: "salesReturnOrder",
370
   components: { BreadCrumb },
464
   components: { BreadCrumb },
389
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
483
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
390
       "-" +
484
       "-" +
391
       (nowDay < 10 ? "0" + nowDay : nowDay);
485
       (nowDay < 10 ? "0" + nowDay : nowDay);
392
-    //    var date1 = new Date();
393
-    // var date2 = new Date(date1);
394
-
395
-    // //-30为30天前,+30可以获得30天后的日期
396
-    // date2.setDate(date1.getDate() - 30);
397
-
398
-    // //30天前(月份判断是否小于10,小于10的前面+0)
399
-    // var agoDay = `${date2.getFullYear()}-${date2.getMonth() + 1<10?`0${date2.getMonth() + 1}`:date2.getMonth() + 1}-${date2.getDate()}`;
400
-      
401
-    // //当前日期
402
-    // var nowDay = `${date1.getFullYear()}-${date1.getMonth() + 1<10?`0${date1.getMonth() + 1}`:date1.getMonth() + 1}-${date1.getDate()}`;
403
-
404
-    //  this.start_time = agoDay
405
-    //  console.log("333333332222",this.start_time)
406
     this.GetWarehouseOut();
486
     this.GetWarehouseOut();
407
     this.GetConfigInfo();
487
     this.GetConfigInfo();
408
     this.fetchAllAdminUsers();
488
     this.fetchAllAdminUsers();
442
       userList:[],
522
       userList:[],
443
       list:[],
523
       list:[],
444
       drugConfig:{},
524
       drugConfig:{},
445
-      drugList:[]
525
+      drugList:[],
526
+      tableList:[],
527
+      drugTypeList:[],
528
+      tableShow:false,
529
+      manufacturerList:[],
446
     };
530
     };
447
   },
531
   },
448
   methods: {
532
   methods: {
588
         query: { id: row.id, type: this.type }
672
         query: { id: row.id, type: this.type }
589
       });
673
       });
590
     },
674
     },
591
-    handleSearch(id,time,warehouse_out_order_number){
592
-    
593
-      this.warehousingOutInfo.warehousingOutData = []
594
-      this.GetOrderDetail(id)
595
-      this.list = []
596
-      this.getDrugAutoMaticList(id,time,warehouse_out_order_number)
597
-      this.dialogVisible = true
598
-      
675
+    // handleSearch(id,time,warehouse_out_order_number){
676
+    //   this.warehousingOutInfo.warehousingOutData = []
677
+    //   this.GetOrderDetail(id)
678
+    //   this.list = []
679
+    //   this.getDrugAutoMaticList(id,time,warehouse_out_order_number)
680
+    //   this.dialogVisible = true
681
+    // },
682
+    handleSearch(val){
683
+       this.getInitializtion()
684
+       this.GetOrderDetail(val.id)
685
+       this.list = []
686
+       this.getDrugAutoMaticList(val.id,val.time,val.warehouse_out_order_number)
599
     },
687
     },
600
     GetOrderDetail(order_id) {
688
     GetOrderDetail(order_id) {
601
         const params = {
689
         const params = {
607
             this.$message.error(response.data.msg)
695
             this.$message.error(response.data.msg)
608
             return false
696
             return false
609
           } else {
697
           } else {
610
-          
698
+            this.tableShow = true
611
             this.warehousingOutInfo.warehousingOutData=[]
699
             this.warehousingOutInfo.warehousingOutData=[]
612
             for (let i = 0; i < response.data.data.list.length; i++) {
700
             for (let i = 0; i < response.data.data.list.length; i++) {
613
-
614
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
701
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
702
+              this.tableList.push(response.data.data.list[i])
703
+
615
             }
704
             }
705
+            console.log("详情",this.tableList)
616
             this.warehousingOutInfo.info = response.data.data.info
706
             this.warehousingOutInfo.info = response.data.data.info
707
+            var manulist = response.data.data.manulist
708
+            this.manufacturerList = manulist
709
+            console.log("厂家列表",this.manufacturerList)
617
             this.handleSpanTempArr()
710
             this.handleSpanTempArr()
618
           }
711
           }
619
         })
712
         })
828
          }
921
          }
829
       }
922
       }
830
       return price
923
       return price
831
-    }
924
+    },
925
+    getTime(val) {
926
+      if(val < 0){
927
+          return ""
928
+      }
929
+      if(val == ""){
930
+        return ""
931
+      }else {
932
+        return uParseTime(val, '{y}-{m}-{d}')
933
+      }
934
+    },
935
+    getInitializtion(){
936
+      getInitializtion().then(response=>{
937
+          if(response.data.state ==1){
938
+            var drugTypeList = response.data.data.drugTypeList
939
+            console.log("hhhhhhh",drugTypeList)
940
+            this.drugTypeList = drugTypeList
941
+          }
942
+      })
943
+    },
944
+   getDrugType(id){
945
+     var name = ""
946
+     for(let i=0;i<this.drugTypeList.length;i++){
947
+       if(id == this.drugTypeList[i].value){
948
+           name = this.drugTypeList[i].name
949
+       } 
950
+     }
951
+     return name
952
+   },
953
+   getManufacturerName(id){
954
+     var name = ""
955
+     for(let i=0;i<this.manufacturerList.length;i++){
956
+       if(id == this.manufacturerList[i].id){
957
+          name = this.manufacturerList[i].manufacturer_name
958
+       }
959
+     }
960
+     return name
961
+   }
832
   }
962
   }
833
 };
963
 };
834
 </script>
964
 </script>

+ 8 - 8
src/xt_pages/stock/drugs/query.vue Целия файл

87
         :data="tableList"
87
         :data="tableList"
88
         border
88
         border
89
         style="width: 100%">
89
         style="width: 100%">
90
-        <el-table-column prop="date" label="药品编号" width="180">
90
+        <!-- <el-table-column prop="date" label="药品编号" width="180">
91
            <template  slot-scope="scope">
91
            <template  slot-scope="scope">
92
               
92
               
93
            </template>
93
            </template>
94
-        </el-table-column>
94
+        </el-table-column> -->
95
         <el-table-column prop="drug_type" label="药品类型" width="180">
95
         <el-table-column prop="drug_type" label="药品类型" width="180">
96
            <template slot-scope="scope">
96
            <template slot-scope="scope">
97
              {{getDrugType(scope.row.drug_type)}}
97
              {{getDrugType(scope.row.drug_type)}}
104
         </el-table-column>
104
         </el-table-column>
105
         <el-table-column prop="drug_name" label="规格&&单位">
105
         <el-table-column prop="drug_name" label="规格&&单位">
106
            <template slot-scope="scope">
106
            <template slot-scope="scope">
107
-             {{scope.row.dosage + scope.row.max_unit +"*"+scope.row.min_number+scope.row.min_unit+"/"+scope.row.packing_unit}}
107
+             {{scope.row.dose + scope.row.dose_unit +"*"+scope.row.min_number+scope.row.min_unit+"/"+scope.row.max_unit}}
108
            </template>
108
            </template>
109
         </el-table-column>
109
         </el-table-column>
110
          <el-table-column prop="drug_name" label="进货单价">
110
          <el-table-column prop="drug_name" label="进货单价">
120
         <el-table-column prop="drug_name" label="剩余库存量">
120
         <el-table-column prop="drug_name" label="剩余库存量">
121
            <template slot-scope="scope">
121
            <template slot-scope="scope">
122
             <span v-if="scope.row.stock_max_number!=''">
122
             <span v-if="scope.row.stock_max_number!=''">
123
-              {{scope.row.stock_max_number}}{{scope.row.packing_unit}}
123
+              {{scope.row.stock_max_number}}{{scope.row.max_unit}}
124
               <span v-if="scope.row.stock_min_number!=''">
124
               <span v-if="scope.row.stock_min_number!=''">
125
                 {{scope.row.stock_min_number}}{{scope.row.min_unit}}
125
                 {{scope.row.stock_min_number}}{{scope.row.min_unit}}
126
               </span>
126
               </span>
137
             >
137
             >
138
               <el-button
138
               <el-button
139
                 size="small"
139
                 size="small"
140
-                type="warning"
140
+                type="primary"
141
                 icon="el-icon-edit-outline"
141
                 icon="el-icon-edit-outline"
142
                 @click="handleDetail(scope.row.drug_id)"
142
                 @click="handleDetail(scope.row.drug_id)"
143
               >
143
               >
427
        
427
        
428
         
428
         
429
          const data = this.formatJson(filterVal, this.tableData)
429
          const data = this.formatJson(filterVal, this.tableData)
430
-         console.log("data",data)
430
+        //  console.log("data",data)
431
         
431
         
432
          excel.export_json_to_excel({
432
          excel.export_json_to_excel({
433
            header: tHeader,
433
            header: tHeader,
470
         getDrugStockList(params).then(response=>{
470
         getDrugStockList(params).then(response=>{
471
           if(response.data.state == 1){
471
           if(response.data.state == 1){
472
              var list = response.data.data.list
472
              var list = response.data.data.list
473
-           
473
+             console.log("list",list)
474
              this.tableList = list
474
              this.tableList = list
475
              var total = response.data.data.total
475
              var total = response.data.data.total
476
              this.total = total
476
              this.total = total
504
         this.$router.push({path:'/drugstock/in/drugstockflow?drug_id='+id})
504
         this.$router.push({path:'/drugstock/in/drugstockflow?drug_id='+id})
505
       },
505
       },
506
       handleBatch(id){
506
       handleBatch(id){
507
-        this.$router.push({path:'/drugstock/in/drugbatchnumber?drug_id'+id})
507
+        this.$router.push({path:'/drugstock/in/drugbatchnumber?drug_id='+id})
508
       }
508
       }
509
     }
509
     }
510
   }
510
   }

+ 130 - 8
src/xt_pages/stock/stockQuery.vue Целия файл

64
       </div>
64
       </div>
65
       
65
       
66
 
66
 
67
-      <el-table
67
+      <!-- <el-table
68
         :row-style="{ color: '#303133' }"
68
         :row-style="{ color: '#303133' }"
69
         :header-cell-style="{
69
         :header-cell-style="{
70
           backgroundColor: 'rgb(245, 247, 250)',
70
           backgroundColor: 'rgb(245, 247, 250)',
153
             <span>{{stockInCount(scope.row)  - stockOutCount(scope.row) }}</span>
153
             <span>{{stockInCount(scope.row)  - stockOutCount(scope.row) }}</span>
154
           </template>
154
           </template>
155
         </el-table-column>
155
         </el-table-column>
156
+      </el-table> -->
157
+       <el-table
158
+        :row-style="{ color: '#303133' }"
159
+        :header-cell-style="{
160
+          backgroundColor: 'rgb(245, 247, 250)',
161
+          color: '#606266'
162
+        }"
163
+        :data="tableList"
164
+        :class="signAndWeighBoxPatients"
165
+        border
166
+        v-loading="WarehouseInfo.loading"
167
+      >
168
+        <el-table-column label="耗材类型" align="center">
169
+          <template slot-scope="scope">
170
+            <span>{{getGoodType(scope.row.good_type_id)}}</span>
171
+         </template>
172
+        </el-table-column>
173
+        <el-table-column label="耗材名称" align="center">
174
+          <template slot-scope="scope">
175
+            {{ scope.row.good_name }}
176
+          </template>
177
+        </el-table-column>
178
+        <el-table-column label="规格&单位" align="center">
179
+            <template slot-scope="scope">
180
+              <span>{{ scope.row.specification_name }}*{{scope.row.min_number}}{{scope.row.min_unit}}</span>
181
+            </template>
182
+         </el-table-column>
183
+        <el-table-column label="进货单价" align="center">
184
+          <template slot-scope="scope">
185
+            {{scope.row.price}}
186
+          </template>
187
+        </el-table-column>
188
+        <el-table-column label="厂商">
189
+          <template slot-scope="scope">
190
+           {{getManufacture(scope.row.manufacturer)}}
191
+          </template>
192
+        </el-table-column>
193
+       <el-table-column label="剩余库存量">
194
+         <template slot-scope="scope">
195
+          <span v-if="scope.row.stock_count!=0">{{scope.row.stock_count}}</span>
196
+         </template>
197
+       </el-table-column>
198
+       <el-table-column label="操作" align="center" width="260px">
199
+          <template slot-scope="scope">
200
+            <el-tooltip
201
+              class="item"
202
+              effect="dark"
203
+              content="库存流水"
204
+              placement="top"
205
+            >
206
+              <el-button
207
+                size="small"
208
+                type="primary"
209
+                icon="el-icon-edit-outline"
210
+              >
211
+              </el-button>
212
+            </el-tooltip>
213
+
214
+            <el-tooltip
215
+              class="item"
216
+              type="primary"
217
+              content="批次"
218
+              placement="top"
219
+            >
220
+              <el-button
221
+                size="small"
222
+                type="danger"
223
+                icon="el-icon-edit-outline"
224
+              >
225
+              </el-button>
226
+            </el-tooltip>
227
+          </template>
228
+        </el-table-column>
156
       </el-table>
229
       </el-table>
157
       <el-pagination
230
       <el-pagination
158
         @size-change="handleSizeChange"
231
         @size-change="handleSizeChange"
176
 import {
249
 import {
177
   GetAllGoodInfo,
250
   GetAllGoodInfo,
178
   GetAllGoodType,
251
   GetAllGoodType,
179
-  getAllStockQueryList
252
+  getAllStockQueryList,
253
+  getAllStockList
180
 } from "@/api/stock";
254
 } from "@/api/stock";
181
 
255
 
182
 export default {
256
 export default {
183
   name: "stockIn",
257
   name: "stockIn",
184
   created() {
258
   created() {
185
-    this.GetAllStockQuery();
259
+    // this.GetAllStockQuery();
186
     this.GetAllGoodInfo();
260
     this.GetAllGoodInfo();
187
     this.GetAllGoodType();
261
     this.GetAllGoodType();
262
+    this.getlist()
188
   },
263
   },
189
   components: {
264
   components: {
190
     BreadCrumb
265
     BreadCrumb
213
       value:"",
288
       value:"",
214
       type_name:"",
289
       type_name:"",
215
       types:[],
290
       types:[],
291
+      tableList:[],
292
+      manufacturerList:[]
216
     };
293
     };
217
   },
294
   },
218
   methods: {
295
   methods: {
290
             this.goodType.push(response.data.data.goodType[i]);
367
             this.goodType.push(response.data.data.goodType[i]);
291
             this.types.push(response.data.data.goodType[i])
368
             this.types.push(response.data.data.goodType[i])
292
           }
369
           }
370
+          
293
           console.log("商品类型",this.types)
371
           console.log("商品类型",this.types)
294
         }
372
         }
295
       });
373
       });
311
     },
389
     },
312
     handleSizeChange(val) {
390
     handleSizeChange(val) {
313
       this.limit = val;
391
       this.limit = val;
314
-      this.GetAllStockQuery();
392
+      // this.GetAllStockQuery();
393
+      this.getlist()
315
     },
394
     },
316
     handleCurrentChange(val) {
395
     handleCurrentChange(val) {
317
       this.page = val;
396
       this.page = val;
318
-      this.GetAllStockQuery();
397
+      // this.GetAllStockQuery();
398
+       this.getlist()
319
     },
399
     },
320
     calculate: function(val) {
400
     calculate: function(val) {
321
       return Math.round(parseFloat(val) * 100) / 100;
401
       return Math.round(parseFloat(val) * 100) / 100;
328
         this.start_time = "";
408
         this.start_time = "";
329
       } else {
409
       } else {
330
         this.start_time = val
410
         this.start_time = val
331
-        this.GetAllStockQuery();
411
+        // this.GetAllStockQuery();
412
+         this.getlist()
332
       }
413
       }
333
     },
414
     },
334
     endTimeChange: function(val) {
415
     endTimeChange: function(val) {
338
         this.end_time = "";
419
         this.end_time = "";
339
       } else {
420
       } else {
340
         this.end_time = val
421
         this.end_time = val
341
-        this.GetAllStockQuery();
422
+        // this.GetAllStockQuery();
423
+         this.getlist()
342
       }
424
       }
343
      
425
      
344
     },
426
     },
376
     showStockOutDetailDialog: function() {},
458
     showStockOutDetailDialog: function() {},
377
     showCancelStockDetailDialog: function() {},
459
     showCancelStockDetailDialog: function() {},
378
     search: function() {
460
     search: function() {
379
-      this.GetAllStockQuery();
461
+      // this.GetAllStockQuery();
462
+      this.getlist()
380
     },
463
     },
381
 
464
 
382
     exportList(){
465
     exportList(){
421
       // 把时间日期转成时间戳
504
       // 把时间日期转成时间戳
422
       return new Date(time).getTime() / 1000;
505
       return new Date(time).getTime() / 1000;
423
     },
506
     },
507
+    getGoodType(id){
508
+      var name = ""
509
+      for(let i=0;i<this.goodType.length;i++){
510
+        if(id == this.goodType[i].id){
511
+           name = this.goodType[i].type_name
512
+        }
513
+      }
514
+      return name
515
+    },
516
+    getlist(){
517
+      const params = {
518
+        page: this.page,
519
+        limit: this.limit,
520
+        keyword: this.keywords,
521
+        start_time:this.start_time,
522
+        end_time:this.end_time,
523
+        type_name:this.type_name,
524
+      };
525
+
526
+      getAllStockList(params).then(response=>{
527
+         if(response.data.state == 1){
528
+          var list = response.data.data.list
529
+          console.log("list22222",list)
530
+          this.tableList = list
531
+          var total = response.data.data.total
532
+           var manufacturerList = response.data.data.manufacturerList
533
+           this.manufacturerList = manufacturerList
534
+         }
535
+      })
536
+    },
537
+    getManufacture(id){
538
+       var name = ""
539
+       for(let i=0;i<this.manufacturerList.length;i++){
540
+         if(id == this.manufacturerList[i].id){
541
+           name = this.manufacturerList[i].manufacturer_name
542
+         }
543
+       }
544
+       return name
545
+    }
424
   }
546
   }
425
 };
547
 };
426
 </script>
548
 </script>