XMLWAN vor 3 Jahren
Ursprung
Commit
f6c8203518

+ 8 - 0
src/api/stock.js Datei anzeigen

641
     params: params
641
     params: params
642
   })
642
   })
643
 }
643
 }
644
+
645
+export function getOrderDetailById(params) {
646
+  return request({
647
+    url: '/api/good/getorderdetaibyid',
648
+    method: 'Get',
649
+    params: params
650
+  })
651
+}

+ 8 - 26
src/xt_pages/stock/stockBatchNumber.vue Datei anzeigen

166
       }
166
       }
167
     },
167
     },
168
     methods:{
168
     methods:{
169
-    
170
-     
171
        handleSizeChange(val) {
169
        handleSizeChange(val) {
172
         this.limit = val
170
         this.limit = val
173
-        this.GetAllDrugStockQueryList()
171
+        this.getlist()
174
       },
172
       },
175
       handleCurrentChange(val) {
173
       handleCurrentChange(val) {
176
         this.page = val
174
         this.page = val
177
-        this.GetAllDrugStockQueryList()
175
+        this.getlist()
178
       },
176
       },
179
         
177
         
180
     startTimeChange: function(val) {
178
     startTimeChange: function(val) {
184
         this.$message.error("开始时间不能大于结束时间");
182
         this.$message.error("开始时间不能大于结束时间");
185
         this.start_time = "";
183
         this.start_time = "";
186
       } else {
184
       } else {
187
-        this.GetAllDrugStockQueryList();
185
+        this.getlist()
188
       }
186
       }
189
     },
187
     },
190
     endTimeChange: function(val) {
188
     endTimeChange: function(val) {
193
         this.$message.error("结束时间不能小于开始时间");
191
         this.$message.error("结束时间不能小于开始时间");
194
         this.end_time = "";
192
         this.end_time = "";
195
       } else {
193
       } else {
196
-        this.GetAllDrugStockQueryList();
194
+       this.getlist()
197
       }
195
       }
198
      },
196
      },
199
      changeDrug(){},
197
      changeDrug(){},
238
          }
236
          }
239
       })
237
       })
240
      },
238
      },
241
-    //  getOutList(){
242
-    //   var params= {
243
-    //       limit:this.limit,
244
-    //       page:this.page,
245
-    //       id:this.$route.query.id,
246
-    //       start_time:this.start_time,
247
-    //       end_time:this.end_time, 
248
-    //     } 
249
-    //    getStockOutList(params).then(response=>{
250
-    //       if(response.data.state == 1){
251
-    //          var outlist = response.data.data.outList
252
-    //          console.log("出库数据",outlist)
253
-    //          for(let i=0;i<outlist.length;i++){
254
-    //            outlist[i].stock_way = 2
255
-    //            this.tableList.push(outlist[i])
256
-    //          }
257
-    //          console.log("hhhhhhhhhhh",this.tableList)
258
-    //       }
259
-    //    })  
260
-    //  }
239
+     getTimestamp(time) {
240
+      // 把时间日期转成时间戳
241
+      return new Date(time).getTime() / 1000;
242
+     },
261
     }
243
     }
262
   }
244
   }
263
 </script>
245
 </script>

+ 75 - 38
src/xt_pages/stock/stockFlow.vue Datei anzeigen

6
     <div class="app-container ">
6
     <div class="app-container ">
7
       <div class="cell clearfix">
7
       <div class="cell clearfix">
8
        耗材名称:{{this.$route.query.good_name}}
8
        耗材名称:{{this.$route.query.good_name}}
9
-       <!-- 库存:
10
-       厂家: -->
9
+       库存:{{getInCount(this.$route.query.id)}}
10
+       <!-- 厂家:{{this.$route.query.manufacturer}}
11
+       规格: -->
11
       </div>
12
       </div>
12
       <div class="cell clearfix">
13
       <div class="cell clearfix">
13
         <span>日期查询:</span>
14
         <span>日期查询:</span>
38
               @change="endTimeChange"
39
               @change="endTimeChange"
39
           ></el-date-picker>
40
           ></el-date-picker>
40
 
41
 
41
-        <span>出入库方式:</span>
42
-        <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
42
+        <!-- <span>出入库方式:</span> -->
43
+        <!-- <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
43
             <el-option
44
             <el-option
44
               v-for="(item,index) in stockType"
45
               v-for="(item,index) in stockType"
45
               :key="index"
46
               :key="index"
46
               :label="item.name"
47
               :label="item.name"
47
               :value="item.id">
48
               :value="item.id">
48
             </el-option>
49
             </el-option>
49
-        </el-select>
50
+        </el-select> -->
50
         
51
         
51
         
52
         
52
       </div>
53
       </div>
84
              <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
85
              <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
85
            </template>
86
            </template>
86
         </el-table-column>
87
         </el-table-column>
87
-         <el-table-column prop="drug_name" label="库存剩余量"  align="center">
88
+         <el-table-column prop="drug_name" label="剩余库存量"  align="center">
88
            <template slot-scope="scope">
89
            <template slot-scope="scope">
89
-             <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span>
90
+             <!-- <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span> -->
91
+              {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id)}}
90
            </template>
92
            </template>
91
         </el-table-column>
93
         </el-table-column>
92
         <el-table-column prop="drug_name" label="进/出货单价"  align="center">
94
         <el-table-column prop="drug_name" label="进/出货单价"  align="center">
133
 <script>
135
 <script>
134
   import { uParseTime } from '@/utils/tools'
136
   import { uParseTime } from '@/utils/tools'
135
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
137
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
136
-  import {getStockInList,getStockOutList} from "@/api/drug/drug_stock";
138
+  import {getStockInList} from "@/api/drug/drug_stock";
139
+  import {getStockDrugCount} from "@/api/stock"
137
   export default {
140
   export default {
138
     name: 'stockIn',
141
     name: 'stockIn',
139
     created() {
142
     created() {
140
-    //   var drugCategory = getDictionaryDataConfig('system','drug_category')
141
-    //   this.drugCategory.push(...drugCategory)
142
-    //   this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
143
+     
143
       this.getlist()
144
       this.getlist()
144
-      this.getOutList()
145
+      this.getStockDrugCount()
146
+
145
     },
147
     },
146
     components: {
148
     components: {
147
       BreadCrumb
149
       BreadCrumb
184
           {id:2,name:"自动出库"},
186
           {id:2,name:"自动出库"},
185
           {id:3,name:"入库"},
187
           {id:3,name:"入库"},
186
         ],
188
         ],
187
-      
189
+        countList:[],
190
+        outCountList:[],
191
+        autoCountList:[],
192
+        keywords:"",
193
+        obj:{},
188
       }
194
       }
189
     },
195
     },
190
     methods:{
196
     methods:{
192
      
198
      
193
        handleSizeChange(val) {
199
        handleSizeChange(val) {
194
         this.limit = val
200
         this.limit = val
195
-        this.GetAllDrugStockQueryList()
201
+        this.getlist()
196
       },
202
       },
197
       handleCurrentChange(val) {
203
       handleCurrentChange(val) {
198
         this.page = val
204
         this.page = val
199
-        this.GetAllDrugStockQueryList()
205
+        this.getlist()
200
       },
206
       },
201
         
207
         
202
     startTimeChange: function(val) {
208
     startTimeChange: function(val) {
206
         this.$message.error("开始时间不能大于结束时间");
212
         this.$message.error("开始时间不能大于结束时间");
207
         this.start_time = "";
213
         this.start_time = "";
208
       } else {
214
       } else {
209
-        this.GetAllDrugStockQueryList();
215
+        this.getlist()
210
       }
216
       }
211
     },
217
     },
212
     endTimeChange: function(val) {
218
     endTimeChange: function(val) {
215
         this.$message.error("结束时间不能小于开始时间");
221
         this.$message.error("结束时间不能小于开始时间");
216
         this.end_time = "";
222
         this.end_time = "";
217
       } else {
223
       } else {
218
-        this.GetAllDrugStockQueryList();
224
+       this.getlist()
219
       }
225
       }
220
      },
226
      },
221
-     changeDrug(){},
222
      getManufacturer(id){
227
      getManufacturer(id){
223
        var name = ""
228
        var name = ""
224
        for(let i=0;i<this.manufacturerList.length;i++){
229
        for(let i=0;i<this.manufacturerList.length;i++){
262
          }
267
          }
263
       })
268
       })
264
      },
269
      },
265
-    //  getOutList(){
266
-    //   var params= {
267
-    //       limit:this.limit,
268
-    //       page:this.page,
269
-    //       id:this.$route.query.id,
270
-    //       start_time:this.start_time,
271
-    //       end_time:this.end_time, 
272
-    //     } 
273
-    //    getStockOutList(params).then(response=>{
274
-    //       if(response.data.state == 1){
275
-    //          var outlist = response.data.data.outList
276
-    //          console.log("出库数据",outlist)
277
-    //          for(let i=0;i<outlist.length;i++){
278
-    //            outlist[i].stock_way = 2
279
-    //            this.tableList.push(outlist[i])
280
-    //          }
281
-    //          console.log("hhhhhhhhhhh",this.tableList)
282
-    //       }
283
-    //    })  
284
-    //  }
270
+    getStockDrugCount(){
271
+        var params ={
272
+          keywords: this.keywords,
273
+          start_time:this.start_time,
274
+          end_time:this.end_time,
275
+        }
276
+      getStockDrugCount(params).then(response=>{
277
+         if(response.data.state == 1){
278
+           var count = response.data.data.count
279
+           console.log("详情入库统计",count)
280
+           this.countList = count
281
+           var outlist = response.data.data.outList
282
+           console.log("详情出库数量",outlist)
283
+           this.outCountList = outlist
284
+           var autoCount = response.data.data.autoCount
285
+           console.log("详情自动出库",autoCount)
286
+           this.autoCountList = autoCount
287
+         }
288
+      })
289
+    },
290
+    getInCount(id){
291
+      var count= ""
292
+      for(let i=0;i<this.countList.length;i++){
293
+          if(id == this.countList[i].good_id){
294
+              count = this.countList[i].count
295
+          }
296
+        }
297
+        return count
298
+        },
299
+      getOutCount(id){
300
+        console.log("id222",id)
301
+        var count = ""
302
+        for(let i=0;i<this.outCountList.length;i++){
303
+          if(id == this.outCountList[i].good_id){
304
+            count = this.outCountList[i].count
305
+          }
306
+        }
307
+        return count
308
+      },
309
+      getAutoCount(id){
310
+        var count= ""
311
+        for(let i=0;i<this.autoCountList.length;i++){
312
+          if(id == this.autoCountList[i].good_id){
313
+            count = this.outCountList[i].count
314
+          }
315
+        }
316
+        return count
317
+      },
318
+     getTimestamp(time) {
319
+      // 把时间日期转成时间戳
320
+      return new Date(time).getTime() / 1000;
321
+     },
285
     }
322
     }
286
   }
323
   }
287
 </script>
324
 </script>

+ 34 - 5
src/xt_pages/stock/stockOutOrder.vue Datei anzeigen

232
         
232
         
233
         <el-table-column label="出库数量" align="center">
233
         <el-table-column label="出库数量" align="center">
234
           <template slot-scope="scope">
234
           <template slot-scope="scope">
235
-            {{ scope.row.count}}
235
+           <span v-if="scope.row.is_sys == 0">{{ scope.row.count}}</span> 
236
+           <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}</span> 
236
           </template>
237
           </template>
237
         </el-table-column>
238
         </el-table-column>
238
 
239
 
277
         </el-table-column>
278
         </el-table-column>
278
         <el-table-column label="操作" align="center">
279
         <el-table-column label="操作" align="center">
279
           <template slot-scope="scope">
280
           <template slot-scope="scope">
280
-            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetail(scope.row.id)">使用明细</span>
281
+            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetailById(scope.row)">使用明细</span>
281
           </template>
282
           </template>
282
         </el-table-column>
283
         </el-table-column>
283
       </el-table>  
284
       </el-table>  
697
   deleteWarehouseOutInfo,
698
   deleteWarehouseOutInfo,
698
   GetAllGoodInfoByID,
699
   GetAllGoodInfoByID,
699
   editWarehouseoutInfo,
700
   editWarehouseoutInfo,
700
-  getOrderDetailByOrderId
701
+  getOrderDetailByOrderId,
702
+  getOrderDetailById
701
 } from "@/api/stock";
703
 } from "@/api/stock";
702
 import BreadCrumb from "../components/bread-crumb";
704
 import BreadCrumb from "../components/bread-crumb";
703
 import StockInDialog from './Dialog/stockInDialog'
705
 import StockInDialog from './Dialog/stockInDialog'
1521
         })
1523
         })
1522
       }, 
1524
       }, 
1523
      
1525
      
1524
-     
1525
-
1526
+      GetOrderDetailById(val){
1527
+         this.userList =[]
1528
+         var params = {
1529
+           good_id:val.good_id,
1530
+           record_time:val.sys_record_time,
1531
+          }
1532
+         getOrderDetailById(params).then(response=>{
1533
+            if(response.data.state == 1){
1534
+              var total = 0
1535
+              var list = response.data.data.list
1536
+              var arrList =  this.unique(list)
1537
+              for (let i = 0; i < arrList.length; i++) {
1538
+                var obj = arrList[i]
1539
+                obj['is_total'] = 0
1540
+                this.userList.push(obj)
1541
+                total = total + arrList[i].count
1542
+              }
1543
+              this.userList.push({
1544
+                is_total: 1,
1545
+                total: total,
1546
+              })
1547
+              // this.type_name = this.userList[0].type.type_name
1548
+              // this.specification_name = this.userList[0].info.specification_name
1549
+              console.log("详情数据区",this.userList)
1550
+              this.editdialogVisibleThree = true
1551
+            }
1552
+         })
1553
+      },
1554
+    
1526
   }
1555
   }
1527
 };
1556
 };
1528
 </script>
1557
 </script>

+ 10 - 3
src/xt_pages/stock/stockQuery.vue Datei anzeigen

108
        </el-table-column>
108
        </el-table-column>
109
        <el-table-column label="出库数量" align="center">
109
        <el-table-column label="出库数量" align="center">
110
          <template slot-scope="scope">
110
          <template slot-scope="scope">
111
-           <span>{{getOutCount(scope.row.good_id)+getAutoCount(scope.row.good_id)}}</span>
111
+           <span>{{getOutCount(scope.row.good_id) + getAutoCount(scope.row.good_id)}}</span>
112
 
112
 
113
          </template>
113
          </template>
114
        </el-table-column>
114
        </el-table-column>
261
 
261
 
262
          }
262
          }
263
 
263
 
264
-        console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
264
+       
265
       });
265
       });
266
     },
266
     },
267
 
267
 
455
        return name
455
        return name
456
     },
456
     },
457
     toClick(val){
457
     toClick(val){
458
-      this.$router.push({path:"/stock/in/stockflow?id="+val.good_id+"&good_name="+val.good_name})
458
+       var manufacturer_name = ""
459
+       for(let i=0;i<this.manufacturerList.length;i++){
460
+          if(val.manufacturer == this.manufacturerList[i].id){
461
+            manufacturer_name = this.manufacturerList[i].manufacturer_name  
462
+          }
463
+       }
464
+      console.log("厂家22222",manufacturer_name)
465
+      this.$router.push({path:"/stock/in/stockflow?id="+val.good_id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name})
459
     },
466
     },
460
     toClickOne(val){
467
     toClickOne(val){
461
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
468
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})