XMLWAN il y a 3 ans
Parent
révision
cca7fd721d

+ 8 - 0
src/api/stock.js Voir le fichier

713
     params: params
713
     params: params
714
   })
714
   })
715
 }
715
 }
716
+
717
+export function getGoodDetailPrintList(params) {
718
+  return request({
719
+    url: '/api/stock/getgooddetailprintlist',
720
+    method: 'get',
721
+    params: params
722
+  })
723
+}

+ 4 - 0
src/xt_pages/stock/cancelStockOrderAdd.vue Voir le fichier

128
                 style="padding-top: 17px"
128
                 style="padding-top: 17px"
129
               >
129
               >
130
                 <el-input
130
                 <el-input
131
+                 oninput="value=value.replace(/[^0-9.]/g,'')"
131
                   placeholder="请输入退库数量"
132
                   placeholder="请输入退库数量"
132
                   type="number"
133
                   type="number"
133
                   v-model="scope.row.price"
134
                   v-model="scope.row.price"
528
           for (let i = 0; i < array.length; i++) {
529
           for (let i = 0; i < array.length; i++) {
529
             array[i].price = (array[i].price).toString()
530
             array[i].price = (array[i].price).toString()
530
             total = total + array[i].price * array[i].return_count;
531
             total = total + array[i].price * array[i].return_count;
532
+            if(array[i].number == undefined){
533
+               array[i].number = ""
534
+            }
531
           }
535
           }
532
 
536
 
533
           if (this.recordInfo.recordData.length <= 0) {
537
           if (this.recordInfo.recordData.length <= 0) {

+ 1 - 1
src/xt_pages/stock/cancelStockOrderEdit.vue Voir le fichier

75
             <template slot-scope="scope">
75
             <template slot-scope="scope">
76
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
76
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
77
                             style="padding-top: 17px">
77
                             style="padding-top: 17px">
78
-                <el-input type="number" v-model="scope.row.count"></el-input>
78
+                <el-input type="number" v-model="scope.row.count"  oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
79
               </el-form-item>
79
               </el-form-item>
80
             </template>
80
             </template>
81
           </el-table-column>
81
           </el-table-column>

+ 9 - 9
src/xt_pages/stock/detail/cancelStockDetail.vue Voir le fichier

252
         query: {
252
         query: {
253
           type: 4,
253
           type: 4,
254
           start_time: this.start_time,
254
           start_time: this.start_time,
255
-          end_time: this.end_time
255
+          end_time: this.end_time,
256
+          limit:this.limit,
257
+          page:this.page
256
         }
258
         }
257
       });
259
       });
258
     },
260
     },
558
      
560
      
559
         for(let i=0;i<this.tableList.length;i++){
561
         for(let i=0;i<this.tableList.length;i++){
560
           this.tableList[i].index = i+1
562
           this.tableList[i].index = i+1
561
-          this.tableList[i].drug_name =  this.typeNameOne(this.tableList[i].good_id) 
562
-          this.tableList[i].drug_spec =  this.specificationName(this.tableList[i].good_id)
563
-          this.tableList[i].min_unit = this.getUnit(this.tableList[i].GoodInfo.good_unit)
564
-          this.tableList[i].remark = this.tableList[i].GoodInfo.remark
565
-          this.tableList[i].packing_unit = this.tableList[i].packing_unit
566
-         
563
+          this.tableList[i].good_name = this.tableList[i].GoodInfo.good_name
564
+          this.tableList[i].specification_name = this.tableList[i].GoodInfo.specification_name
565
+          this.tableList[i].packing_unit = this.tableList[i].GoodInfo.packing_unit
566
+          this.tableList[i].total_price = (this.tableList[i].count * this.tableList[i].price).toFixed(2)
567
         }
567
         }
568
        import('@/vendor/Export2Excel').then(excel => {
568
        import('@/vendor/Export2Excel').then(excel => {
569
-       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','备注']
570
-       const filterVal = ['index','drug_name', 'drug_spec', 'packing_unit','count','remark']
569
+       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','退库价','总价','备注']
570
+       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total_price','remark']
571
        
571
        
572
        const data = this.formatJson(filterVal, this.tableList)
572
        const data = this.formatJson(filterVal, this.tableList)
573
        console.log("data",data)
573
        console.log("data",data)

+ 82 - 45
src/xt_pages/stock/detail/print.vue Voir le fichier

10
         <div class="dialysis-print-order">
10
         <div class="dialysis-print-order">
11
           <div class="order-yy-name">{{orgname}}</div>
11
           <div class="order-yy-name">{{orgname}}</div>
12
           <div class="order-title" v-if="type == 1">入库单</div>
12
           <div class="order-title" v-if="type == 1">入库单</div>
13
-          <div class="order-title" v-if="type == 2">退货单</div>
14
-          <div class="order-title" v-if="type == 3">出库单</div>
13
+        
14
+          <div class="order-title" v-if="type == 2">出库单</div>
15
           <div class="order-title" v-if="type == 4">退库单</div>
15
           <div class="order-title" v-if="type == 4">退库单</div>
16
 
16
 
17
           <div style="float: left;margin-bottom: 10px;">{{getDateOne()}}</div>
17
           <div style="float: left;margin-bottom: 10px;">{{getDateOne()}}</div>
23
             <tbody>
23
             <tbody>
24
             <tr>
24
             <tr>
25
               <td style="line-height: 50px" width="50">序号</td>
25
               <td style="line-height: 50px" width="50">序号</td>
26
-              <td style="line-height: 50px" width="250">耗材名称</td>
27
-              <td style="line-height: 50px" width="250">规格型号</td>
26
+              <td style="line-height: 50px" width="200">耗材名称</td>
27
+              <td style="line-height: 50px" width="200">规格型号</td>
28
+              <td style="line-height: 50px" width="80">数量</td>
28
               <td style="line-height: 50px" width="50">单位</td>
29
               <td style="line-height: 50px" width="50">单位</td>
29
             
30
             
30
-              <td style="line-height: 50px" width="80">数量</td>
31
-              <td style="line-height:50px" width="80" v-if="type == 1">进货价</td>
32
-              <td style="line-height:50px" width="80" v-if="type == 3">出货价</td>
33
-              <td style="line-height: 50px" width="80" v-if="type == 1 || type == 3">总价</td>
34
-              <td style="line-height: 50px" width="">备 注</td>
31
+              <td style="line-height:50px" width="80">
32
+                <span v-if="type == 1">进货价</span> 
33
+                <span v-if="type == 2">出货价</span> 
34
+                <span v-if="type == 4">退库价</span> 
35
+              </td>
36
+              <td style="line-height: 50px" width="80">总价</td>
37
+              <td style="line-height: 50px" width="80">备 注</td>
35
             </tr>
38
             </tr>
36
 
39
 
37
-            <tr v-for="(stock,index) in stockDatas" :key="stock.id">
40
+            <tr v-for="(item,index) in stockDatas" :key="item.id">
38
               <td style="line-height: 50px">&nbsp;
41
               <td style="line-height: 50px">&nbsp;
39
                 {{index+1}}
42
                 {{index+1}}
40
               </td>
43
               </td>
41
               <td style="line-height: 50px">
44
               <td style="line-height: 50px">
42
-                <span>{{stock.good_name}}</span>
45
+                <span>{{item.GoodInfo.good_name}}</span>
43
               </td>
46
               </td>
44
               <td style="line-height: 50px">
47
               <td style="line-height: 50px">
45
-                <span v-if="stock">{{stock.specification_name}}</span>
48
+                <span>{{item.GoodInfo.specification_name}}</span>
46
               </td>
49
               </td>
50
+             
47
               <td style="line-height: 50px">
51
               <td style="line-height: 50px">
48
-                <span>{{stock.packing_unit}}</span>
52
+                <span v-if="type == 1"> {{ item.warehousing_count }}</span>
53
+                <span v-if="type == 2"> {{ item.count }}</span>
54
+                <span v-if="type == 4"> {{ item.count }}</span>
49
               </td>
55
               </td>
50
-            
51
               <td style="line-height: 50px">
56
               <td style="line-height: 50px">
52
-                <span v-if="type == 3">
53
-                  <span v-if="org_id == 10090">{{getWareOut(stock.id)}}</span>
54
-                  <span else>{{getStockCount(stock.id)}}</span>
55
-                </span>
56
-                <span v-else>{{calCount(stock)}}</span> 
57
+                <span>{{item.GoodInfo.packing_unit}}</span>
57
               </td>
58
               </td>
58
-              <td style="line-height:50px" v-if="type == 1 && stock.query_warehousing_info.length > 0">{{stock.query_warehousing_info[0].price}}</td>
59
-              <td style="line-height:50px" v-if="type == 3 && stock.query_warehouseout_info.length > 0">
60
-                <!-- {{stock.query_warehouseout_info[0].price}} -->
61
-                {{getReailPrice(stock.id)}}
59
+              <td style="line-height:50px">
60
+                <span v-if="type == 1"> {{ item.price }}</span>
61
+                <span v-if="type == 2"> {{ item.price }}</span>
62
+                 <span v-if="type == 4"> {{ item.price }}</span>
63
+              </td>
64
+              <td style="line-height:50px">
65
+                <span v-if="type == 1">{{(item.warehousing_count * item.price).toFixed(2)}}</span>
66
+                <span v-if="type == 2">{{(item.count * item.price).toFixed(2)}}</span>
67
+                <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
68
+              </td>
69
+              <td style="line-height: 50px">
70
+                 <span v-if="type == 1">{{item.remark}}</span>
62
               </td>
71
               </td>
63
-              <td style="line-height: 50px" v-if="type == 1">{{calTotal(stock)}}</td>
64
-              <td style="line-height: 50px" v-if="type == 3">
65
-                
66
-                  <span v-if="org_id == 10090">{{getPrice(stock.id)}}</span>
67
-                  <span v-else>{{(getStockCount(stock.id) * getReailPrice(stock.id)).toFixed(2)}}</span> 
68
-               
69
-             </td>
70
-              <td style="line-height: 50px"></td>
71
             </tr>
72
             </tr>
72
             </tbody>
73
             </tbody>
73
           </table>
74
           </table>
74
-          <table class="print-table" border="1" v-if="type == 1 || type == 3">
75
-            <tbody>
75
+          <table class="print-table" border="1">
76
             <tr>
76
             <tr>
77
-              <td width="633" style="line-height: 50px">合计</td>
77
+              <td style="line-height: 50px" colspan="6" width="550">合计</td>
78
+              <td width="80" style="line-height: 50px" >
79
+                <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
80
+                <span v-if="type == 2">{{getWareOutTotal().toFixed(2)}}</span> 
81
+                <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
82
+              </td>
78
               <td width="80" style="line-height: 50px">
83
               <td width="80" style="line-height: 50px">
79
-                <span v-if="type == 1">{{calTotalPrice()}}</span>
80
-                <span v-if="type == 3 && org_id!=10090">{{getTotalPrice().toFixed(2)}}</span>
81
-                <span v-if="type == 3 && org_id==10090">{{getTotalPriceOne().toFixed(2)}}</span>
84
+
82
               </td>
85
               </td>
83
-              <td></td>
84
             </tr>
86
             </tr>
85
-
86
-            </tbody>
87
-          </table>
87
+          </table> 
88
 
88
 
89
           <div style="display:flex;margin-top:20px;float:right;">
89
           <div style="display:flex;margin-top:20px;float:right;">
90
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
90
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
104
 </template>
104
 </template>
105
 
105
 
106
 <script>
106
 <script>
107
-  import { getPrintStockGood } from '@/api/stock'
107
+  import { getPrintStockGood,getGoodDetailPrintList,getStockDetail } from '@/api/stock'
108
   import { getDataConfig } from '@/utils/data'
108
   import { getDataConfig } from '@/utils/data'
109
   import { jsGetAge, uParseTime } from '@/utils/tools'
109
   import { jsGetAge, uParseTime } from '@/utils/tools'
110
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
110
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
127
         queryParams: {
127
         queryParams: {
128
           start_time: this.$route.query.start_time,
128
           start_time: this.$route.query.start_time,
129
           end_time: this.$route.query.end_time,
129
           end_time: this.$route.query.end_time,
130
-          type: this.$route.query.type
130
+          type: this.$route.query.type,
131
+          limit:this.$route.query.limit,
132
+          page:this.$route.query.page,
131
         },
133
         },
132
         totalPrice: 0,
134
         totalPrice: 0,
133
         stockDatas: [],
135
         stockDatas: [],
414
         const res = new Map();
416
         const res = new Map();
415
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
417
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
416
      },
418
      },
419
+     getGoodDetailPrintList(){
420
+      getGoodDetailPrintList(this.queryParams).then(response=>{
421
+         if(response.data.state == 1){
422
+           var list = response.data.data.list
423
+           console.log("list",list)
424
+           
425
+         }
426
+      })
427
+     },
428
+
429
+     getStockDetail(){
430
+      getStockDetail(this.queryParams).then(response=>{
431
+        if(response.data.state == 1){
432
+          var total =   response.data.data.total
433
+          var list = response.data.data.list
434
+          console.log("list2323223",list)
435
+          this.stockDatas = list
436
+        }
437
+      })
438
+     },
439
+     getWareInfoTotal(){
440
+       var total = 0
441
+       for(let i=0;i<this.stockDatas.length;i++){
442
+         total+= this.stockDatas[i].warehousing_count * this.stockDatas[i].price
443
+       }
444
+       return total
445
+     },
446
+     getWareOutTotal(){
447
+       var total = 0
448
+       for(let i=0;i<this.stockDatas.length;i++){
449
+         total+= this.stockDatas[i].count * this.stockDatas[i].price
450
+       }
451
+       return total
452
+     }
417
     },
453
     },
418
     created() {
454
     created() {
419
       var xtuser = this.$store.getters.xt_user
455
       var xtuser = this.$store.getters.xt_user
420
       this.orgname = xtuser.org.org_name
456
       this.orgname = xtuser.org.org_name
421
       this.goodUnit = this.$store.getters.good_unit
457
       this.goodUnit = this.$store.getters.good_unit
422
 
458
 
423
-      this.getDialysisRecord()
424
-
459
+      // this.getDialysisRecord()
460
+      // this.getGoodDetailPrintList()
461
+      this.getStockDetail()
425
     }
462
     }
426
 
463
 
427
   }
464
   }

+ 3 - 1
src/xt_pages/stock/detail/salesReturnDetail.vue Voir le fichier

329
         query: {
329
         query: {
330
           type: 2,
330
           type: 2,
331
           start_time: this.start_time,
331
           start_time: this.start_time,
332
-          end_time: this.end_time
332
+          end_time: this.end_time,
333
+          limit:this.limit,
334
+          page:this.page
333
         }
335
         }
334
       });
336
       });
335
     },
337
     },

+ 96 - 60
src/xt_pages/stock/detail/stockInDetail.vue Voir le fichier

233
     this.fetchAllAdminUsers();
233
     this.fetchAllAdminUsers();
234
     this.goodUnit = this.$store.getters.good_unit
234
     this.goodUnit = this.$store.getters.good_unit
235
 
235
 
236
-    this.getPrintStockGood()
236
+    // this.getPrintStockGood()
237
     this.org_id = this.$store.getters.xt_user.template_info.org_id
237
     this.org_id = this.$store.getters.xt_user.template_info.org_id
238
     console.log("机构ID",this.org_id)
238
     console.log("机构ID",this.org_id)
239
   },
239
   },
277
     changeType: function(val) {
277
     changeType: function(val) {
278
       this.order_type = val;
278
       this.order_type = val;
279
       this.GetCancelStock();
279
       this.GetCancelStock();
280
-      this.getPrintStockGood()
280
+      // this.getPrintStockGood()
281
     },
281
     },
282
     changeManufacturer: function(val) {
282
     changeManufacturer: function(val) {
283
       this.manufacturer_id = val;
283
       this.manufacturer_id = val;
284
       this.GetCancelStock();
284
       this.GetCancelStock();
285
-      this.getPrintStockGood()
285
+      // this.getPrintStockGood()
286
     },
286
     },
287
     changeDealer: function(val) {
287
     changeDealer: function(val) {
288
       this.dealer_id = val;
288
       this.dealer_id = val;
289
       this.GetCancelStock();
289
       this.GetCancelStock();
290
-      this.getPrintStockGood()
290
+      // this.getPrintStockGood()
291
     },
291
     },
292
     getTypeName: function(row) {
292
     getTypeName: function(row) {
293
       let name = "";
293
       let name = "";
336
         keywords: this.searchKey
336
         keywords: this.searchKey
337
       };
337
       };
338
       this.cancelStockDate = [];
338
       this.cancelStockDate = [];
339
+      this.tableList = []
339
       getStockDetail(Params).then(response => {
340
       getStockDetail(Params).then(response => {
340
         if (response.data.state == 0) {
341
         if (response.data.state == 0) {
341
           this.$message.error(response.data.msg);
342
           this.$message.error(response.data.msg);
345
           console.log("hhhhhhshsss",response.data.data.list)
346
           console.log("hhhhhhshsss",response.data.data.list)
346
           var total_price = 0
347
           var total_price = 0
347
           for (let i = 0; i < response.data.data.list.length; i++) {
348
           for (let i = 0; i < response.data.data.list.length; i++) {
349
+            this.tableList.push(response.data.data.list[i])
348
             var obj = response.data.data.list[i];
350
             var obj = response.data.data.list[i];
349
             total_price += response.data.data.list[i].price * response.data.data.list[i].warehousing_count
351
             total_price += response.data.data.list[i].price * response.data.data.list[i].warehousing_count
350
             obj["is_total"] = 0;
352
             obj["is_total"] = 0;
394
         } else {
396
         } else {
395
           this.total = response.data.data.total;
397
           this.total = response.data.data.total;
396
           var total_price = ""
398
           var total_price = ""
399
+         
400
+        
397
           for (let i = 0; i < response.data.data.list.length; i++) {
401
           for (let i = 0; i < response.data.data.list.length; i++) {
402
+            this.tableList.push(response.data.data.list[i])
398
             var obj = response.data.data.list[i];
403
             var obj = response.data.data.list[i];
399
             obj["is_total"] = 0;
404
             obj["is_total"] = 0;
400
             this.cancelStockDate.push(obj);
405
             this.cancelStockDate.push(obj);
401
           }
406
           }
407
+        
402
           this.cancelStockDate.push({
408
           this.cancelStockDate.push({
403
             warehousing_order: "合计",
409
             warehousing_order: "合计",
404
             is_total: 1,
410
             is_total: 1,
453
     handleSizeChange(val) {
459
     handleSizeChange(val) {
454
       this.limit = val;
460
       this.limit = val;
455
       this.GetCancelStock();
461
       this.GetCancelStock();
456
-      this.getPrintStockGood()
462
+      // this.getPrintStockGood()
457
     },
463
     },
458
     handleCurrentChange(val) {
464
     handleCurrentChange(val) {
459
       this.page = val;
465
       this.page = val;
460
       this.GetCancelStock();
466
       this.GetCancelStock();
461
-      this.getPrintStockGood()
467
+      // this.getPrintStockGood()
462
     },
468
     },
463
     startTimeChange(val) {
469
     startTimeChange(val) {
464
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
470
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
467
         this.start_time = "";
473
         this.start_time = "";
468
       } else {
474
       } else {
469
         this.GetCancelStock();
475
         this.GetCancelStock();
470
-        this.getPrintStockGood()
476
+        // this.getPrintStockGood()
471
       }
477
       }
472
     },
478
     },
473
     endTimeChange(val) {
479
     endTimeChange(val) {
477
         this.end_time = "";
483
         this.end_time = "";
478
       } else {
484
       } else {
479
         this.GetCancelStock();
485
         this.GetCancelStock();
480
-        this.getPrintStockGood()
486
+        // this.getPrintStockGood()
481
       }
487
       }
482
     },
488
     },
483
     getTimestamp(time) {
489
     getTimestamp(time) {
634
         query: {
640
         query: {
635
           type: 1,
641
           type: 1,
636
           start_time: this.start_time,
642
           start_time: this.start_time,
637
-          end_time: this.end_time
643
+          end_time: this.end_time,
644
+          limit:this.limit,
645
+          page:this.page,
646
+          keywords:this.$router.keywords,
638
         }
647
         }
639
       });
648
       });
640
     },
649
     },
733
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
742
         return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
734
       },
743
       },
735
       
744
       
736
-      exportList(){
737
-        var obj = {index:"合计",total:0}
738
-        obj.total = this.calTotalPrice()
745
+      // exportList(){
746
+      //   var obj = {index:"合计",total:0}
747
+      //   obj.total = this.calTotalPrice()
739
      
748
      
740
-        for(let i=0;i<this.tableList.length;i++){
741
-          this.tableList[i].index = i+1
742
-          this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
743
-          this.tableList[i].count = this.calCount(this.tableList[i])
744
-          this.tableList[i].total = this.calTotal(this.tableList[i])
745
-          this.tableList[i].price = this.tableList[i].query_warehousing_info[0].price
746
-          this.tableList[i].remark = this.tableList[i].query_warehousing_info[0].remark
747
-          this.tableList[i].packing_unit = this.tableList[i].packing_unit
748
-        }
749
-        console.log("总共条数555",this.tableList)
749
+      //   for(let i=0;i<this.tableList.length;i++){
750
+      //     this.tableList[i].index = i+1
751
+      //     this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
752
+      //     this.tableList[i].count = this.calCount(this.tableList[i])
753
+      //     this.tableList[i].total = this.calTotal(this.tableList[i])
754
+      //     this.tableList[i].price = this.tableList[i].query_warehousing_info[0].price
755
+      //     this.tableList[i].remark = this.tableList[i].query_warehousing_info[0].remark
756
+      //     this.tableList[i].packing_unit = this.tableList[i].packing_unit
757
+      //   }
758
+      //   console.log("总共条数555",this.tableList)
750
          
759
          
751
-        if(this.org_id == 10024){
752
-          var arr = this.uniqueOne(this.tableList)
753
-          this.tableList = arr
754
-          this.tableList.push(obj)
755
-          console.log("去重后条数",this.tableList)
760
+      //   if(this.org_id == 10024){
761
+      //     var arr = this.uniqueOne(this.tableList)
762
+      //     this.tableList = arr
763
+      //     this.tableList.push(obj)
764
+      //     console.log("去重后条数",this.tableList)
756
         
765
         
757
-          import('@/vendor/Export2Excel').then(excel => {
758
-          const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
759
-          const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total','remark']
766
+      //     import('@/vendor/Export2Excel').then(excel => {
767
+      //     const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
768
+      //     const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total','remark']
760
           
769
           
761
-          const data = this.formatJson(filterVal, this.tableList)
762
-
763
-          console.log("data222222222",data)
764
-            excel.export_json_to_excel({
765
-              header: tHeader,
766
-              data,
767
-              filename: '耗材入库明细'
768
-            })
769
-              this.downloadLoading = false
770
-            })
771
-        }
772
-        if(this.org_id !=10024){
773
-           var arr = this.unique(this.tableList)
774
-            this.tableList = arr
775
-            this.tableList.push(obj)
776
-            console.log("去重后条数",this.tableList)
770
+      //     const data = this.formatJson(filterVal, this.tableList)
771
+
772
+      //     console.log("data222222222",data)
773
+      //       excel.export_json_to_excel({
774
+      //         header: tHeader,
775
+      //         data,
776
+      //         filename: '耗材入库明细'
777
+      //       })
778
+      //         this.downloadLoading = false
779
+      //       })
780
+      //   }
781
+      //   if(this.org_id !=10024){
782
+      //      var arr = this.unique(this.tableList)
783
+      //       this.tableList = arr
784
+      //       this.tableList.push(obj)
785
+      //       console.log("去重后条数",this.tableList)
777
           
786
           
778
-            import('@/vendor/Export2Excel').then(excel => {
779
-            const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
780
-            const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total','remark']
787
+      //       import('@/vendor/Export2Excel').then(excel => {
788
+      //       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
789
+      //       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total','remark']
781
             
790
             
782
-            const data = this.formatJson(filterVal, this.tableList)
783
-            console.log("data222222222",data)
784
-              excel.export_json_to_excel({
785
-                header: tHeader,
786
-                data,
787
-                filename: '耗材入库明细'
788
-              })
789
-                this.downloadLoading = false
790
-              })
791
-        }
791
+      //       const data = this.formatJson(filterVal, this.tableList)
792
+      //       console.log("data222222222",data)
793
+      //         excel.export_json_to_excel({
794
+      //           header: tHeader,
795
+      //           data,
796
+      //           filename: '耗材入库明细'
797
+      //         })
798
+      //           this.downloadLoading = false
799
+      //         })
800
+      //   }
792
      
801
      
793
-        },
802
+      //   },
803
+      exportList(){
804
+        // var obj = {index:"合计",total:0}
805
+        // obj.total = this.calTotalPrice()
806
+        console.log("hhhh",this.tableList)
807
+       
808
+        for(let i=0;i<this.tableList.length;i++){
809
+          this.tableList[i].good_name = this.tableList[i].GoodInfo.good_name
810
+          this.tableList[i].specification_name = this.tableList[i].GoodInfo.specification_name
811
+          this.tableList[i].packing_unit = this.tableList[i].GoodInfo.packing_unit
812
+          this.tableList[i].index = i+1  
813
+          this.tableList[i].total_price = (this.tableList[i].warehousing_count * this.tableList[i].price).toFixed(2) 
814
+        }
815
+        console.log("总共条数555",this.tableList)   
816
+        import('@/vendor/Export2Excel').then(excel => {
817
+        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','进货价','总价','备注']
818
+        const filterVal = ['index','good_name', 'specification_name', 'packing_unit','warehousing_count','price','total_price','remark']
819
+        
820
+        const data = this.formatJson(filterVal, this.tableList)
821
+        console.log("data222222222",data)
822
+          excel.export_json_to_excel({
823
+            header: tHeader,
824
+            data,
825
+            filename: '耗材入库明细'
826
+          })
827
+            this.downloadLoading = false
828
+        })
829
+      },
794
      formatJson(filterVal, jsonData) {
830
      formatJson(filterVal, jsonData) {
795
         return jsonData.map(v => filterVal.map(j => v[j]));
831
         return jsonData.map(v => filterVal.map(j => v[j]));
796
      },
832
      },

+ 63 - 34
src/xt_pages/stock/detail/stockOutDetail.vue Voir le fichier

225
     this.GetConfigInfo();
225
     this.GetConfigInfo();
226
     this.fetchAllAdminUsers();
226
     this.fetchAllAdminUsers();
227
     this.goodUnit = this.$store.getters.good_unit
227
     this.goodUnit = this.$store.getters.good_unit
228
-    this.getPrintStockGood()
228
+    // this.getPrintStockGood()
229
     this.getList()
229
     this.getList()
230
     var org_id = this.$store.getters.xt_user.org.id
230
     var org_id = this.$store.getters.xt_user.org.id
231
     this.orgId = org_id
231
     this.orgId = org_id
265
       stockTotal:[],
265
       stockTotal:[],
266
       goodInfoData:[],
266
       goodInfoData:[],
267
       orgId:"",
267
       orgId:"",
268
+      tableData:[]
268
     };
269
     };
269
   },
270
   },
270
   methods: {
271
   methods: {
271
     changeType: function(val) {
272
     changeType: function(val) {
272
       this.order_type = val;
273
       this.order_type = val;
273
       this.GetCancelStock();
274
       this.GetCancelStock();
274
-      this.getPrintStockGood()
275
+      // this.getPrintStockGood()
275
     },
276
     },
276
     changeManufacturer: function(val) {
277
     changeManufacturer: function(val) {
277
       this.manufacturer_id = val;
278
       this.manufacturer_id = val;
278
       this.GetCancelStock();
279
       this.GetCancelStock();
279
-      this.getPrintStockGood()
280
+      // this.getPrintStockGood()
280
     },
281
     },
281
     getTypeName: function(row) {
282
     getTypeName: function(row) {
282
       let name = "";
283
       let name = "";
335
 
336
 
336
           this.total = response.data.data.total;
337
           this.total = response.data.data.total;
337
           for (let i = 0; i < response.data.data.list.length; i++) {
338
           for (let i = 0; i < response.data.data.list.length; i++) {
339
+            this.tableData.push(response.data.data.list[i])
338
             var obj = response.data.data.list[i];
340
             var obj = response.data.data.list[i];
339
             obj["is_total"] = 0;
341
             obj["is_total"] = 0;
340
             this.cancelStockDate.push(obj);
342
             this.cancelStockDate.push(obj);
379
           this.total = response.data.data.total;
381
           this.total = response.data.data.total;
380
           console.log("详情23233323",response.data.data.list)
382
           console.log("详情23233323",response.data.data.list)
381
           for (let i = 0; i < response.data.data.list.length; i++) {
383
           for (let i = 0; i < response.data.data.list.length; i++) {
384
+            this.tableData.push(response.data.data.list[i])
382
             var obj = response.data.data.list[i];
385
             var obj = response.data.data.list[i];
386
+
383
             obj["is_total"] = 0;
387
             obj["is_total"] = 0;
384
             this.cancelStockDate.push(obj);
388
             this.cancelStockDate.push(obj);
385
             
389
             
439
     handleSizeChange(val) {
443
     handleSizeChange(val) {
440
       this.limit = val;
444
       this.limit = val;
441
       this.GetCancelStock();
445
       this.GetCancelStock();
442
-      this.getPrintStockGood()
446
+      // this.getPrintStockGood()
443
     },
447
     },
444
     handleCurrentChange(val) {
448
     handleCurrentChange(val) {
445
       this.page = val;
449
       this.page = val;
446
       this.GetCancelStock();
450
       this.GetCancelStock();
447
-      this.getPrintStockGood()
451
+      // this.getPrintStockGood()
448
     },
452
     },
449
     startTimeChange(val) {
453
     startTimeChange(val) {
450
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
454
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
453
         this.start_time = "";
457
         this.start_time = "";
454
       } else {
458
       } else {
455
         this.GetCancelStock();
459
         this.GetCancelStock();
456
-        this.getPrintStockGood()
460
+        // this.getPrintStockGood()
457
       }
461
       }
458
     },
462
     },
459
     endTimeChange(val) {
463
     endTimeChange(val) {
463
         this.end_time = "";
467
         this.end_time = "";
464
       } else {
468
       } else {
465
         this.GetCancelStock();
469
         this.GetCancelStock();
466
-        this.getPrintStockGood()
470
+        // this.getPrintStockGood()
467
       }
471
       }
468
     },
472
     },
469
     getTimestamp(time) {
473
     getTimestamp(time) {
625
       this.$router.push({
629
       this.$router.push({
626
         path: "/stock/print",
630
         path: "/stock/print",
627
         query: {
631
         query: {
628
-          type: 3,
632
+          type: 2,
629
           start_time: this.start_time,
633
           start_time: this.start_time,
630
-          end_time: this.end_time
634
+          end_time: this.end_time,
635
+          limit:this.limit,
636
+          page:this.page
631
         }
637
         }
632
       });
638
       });
633
     },
639
     },
745
         })
751
         })
746
       },
752
       },
747
 
753
 
748
-     exportList(){
754
+    //  exportList(){
749
       
755
       
750
-      for(let i=0;i<this.tableList.length;i++){
751
-         for(let j=0;j<this.goodInfoData.length;j++){
752
-            if(this.tableList[i].id === this.goodInfoData[j].id){
753
-               this.tableList[i].buy_price = this.goodInfoData[j].buy_price
754
-            }
755
-         }
756
-      }
757
-      console.log('合并后',this.tableList)
756
+    //   for(let i=0;i<this.tableList.length;i++){
757
+    //      for(let j=0;j<this.goodInfoData.length;j++){
758
+    //         if(this.tableList[i].id === this.goodInfoData[j].id){
759
+    //            this.tableList[i].buy_price = this.goodInfoData[j].buy_price
760
+    //         }
761
+    //      }
762
+    //   }
763
+    //   console.log('合并后',this.tableList)
758
       
764
       
759
-      var obj = {index:"合计",total:0}
760
-       obj.total = this.getTotalPrice()
761
-       for(let i=0;i<this.tableList.length;i++){
762
-        this.tableList[i].index = i+1
763
-        this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
764
-        this.tableList[i].count = this.getStockCount(this.tableList[i].id)
765
-        this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].buy_price).toFixed(2)
766
-        this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
767
-        this.tableList[i].packing_unit = this.tableList[i].packing_unit
768
-       }
769
-       var arr = this.unique(this.tableList)
765
+    //   var obj = {index:"合计",total:0}
766
+    //    obj.total = this.getTotalPrice()
767
+    //    for(let i=0;i<this.tableList.length;i++){
768
+    //     this.tableList[i].index = i+1
769
+    //     this.tableList[i].min_unit = this.getUnit(this.tableList[i].good_unit)
770
+    //     this.tableList[i].count = this.getStockCount(this.tableList[i].id)
771
+    //     this.tableList[i].total = (this.getStockCount(this.tableList[i].id) * this.tableList[i].buy_price).toFixed(2)
772
+    //     this.tableList[i].remark = this.tableList[i].query_warehouseout_info[0].remark
773
+    //     this.tableList[i].packing_unit = this.tableList[i].packing_unit
774
+    //    }
775
+    //    var arr = this.unique(this.tableList)
770
      
776
      
771
-       this.tableList = arr
772
-       this.tableList.push(obj)
777
+    //    this.tableList = arr
778
+    //    this.tableList.push(obj)
779
+    //    import('@/vendor/Export2Excel').then(excel => {
780
+    //    const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
781
+    //    const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','buy_price','total','remark']
782
+
783
+    //    const data = this.formatJson(filterVal, this.tableList)
784
+    //    console.log("data",data)
785
+       
786
+    //     excel.export_json_to_excel({
787
+    //        header: tHeader,
788
+    //        data,
789
+    //        filename: '耗材出库明细'
790
+    //      })
791
+    //       this.downloadLoading = false
792
+    //     })
793
+    //    },
794
+    exportList(){
795
+       for(let i=0;i<this.tableData.length;i++){
796
+        this.tableData[i].index = i+1
797
+        this.tableData[i].good_name = this.tableData[i].GoodInfo.good_name
798
+        this.tableData[i].specification_name = this.tableData[i].GoodInfo.specification_name
799
+        this.tableData[i].packing_unit = this.tableData[i].GoodInfo.packing_unit
800
+        this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price).toFixed(2)
801
+       }
773
        import('@/vendor/Export2Excel').then(excel => {
802
        import('@/vendor/Export2Excel').then(excel => {
774
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
803
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
775
-       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','buy_price','total','remark']
804
+       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','count','price','total_price','remark']
776
 
805
 
777
-       const data = this.formatJson(filterVal, this.tableList)
806
+       const data = this.formatJson(filterVal, this.tableData)
778
        console.log("data",data)
807
        console.log("data",data)
779
        
808
        
780
         excel.export_json_to_excel({
809
         excel.export_json_to_excel({
784
          })
813
          })
785
           this.downloadLoading = false
814
           this.downloadLoading = false
786
         })
815
         })
787
-       },
816
+     },
788
      formatJson(filterVal, jsonData) {
817
      formatJson(filterVal, jsonData) {
789
         return jsonData.map(v => filterVal.map(j => v[j]));
818
         return jsonData.map(v => filterVal.map(j => v[j]));
790
      },
819
      },

+ 3 - 1
src/xt_pages/stock/drugs/cancelDrugStockOrder.vue Voir le fichier

303
       searchKey: "",
303
       searchKey: "",
304
       type: 1,
304
       type: 1,
305
       page: 1,
305
       page: 1,
306
-      limit: 10,
306
+      limit: 5,
307
       checked: false,
307
       checked: false,
308
       total: 0,
308
       total: 0,
309
       pageTotal: 0,
309
       pageTotal: 0,
368
           this.$message.error(response.data.msg);
368
           this.$message.error(response.data.msg);
369
           return false;
369
           return false;
370
         } else {
370
         } else {
371
+          console.log("列表23232323232323",response.data.data.list)
372
+          
371
           this.total = response.data.data.total;
373
           this.total = response.data.data.total;
372
           for (let i = 0; i < response.data.data.list.length; i++) {
374
           for (let i = 0; i < response.data.data.list.length; i++) {
373
             this.cancelStockDate.push(response.data.data.list[i]);
375
             this.cancelStockDate.push(response.data.data.list[i]);

+ 5 - 3
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue Voir le fichier

155
               >
155
               >
156
               <div style="display:flex;">
156
               <div style="display:flex;">
157
                 <el-input
157
                 <el-input
158
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
158
                   style="width:100px"
159
                   style="width:100px"
159
                   placeholder="请输入退库数量"
160
                   placeholder="请输入退库数量"
160
                   type="number"
161
                   type="number"
498
       tempObj["product_date"] = ""
499
       tempObj["product_date"] = ""
499
       tempObj["expiry_date"] = ""
500
       tempObj["expiry_date"] = ""
500
       tempObj["batch_number"] = ""
501
       tempObj["batch_number"] = ""
501
-      tempObj["batch_number_id"] = ""
502
+      tempObj["batch_number_id"] = 0
502
       this.recordInfo.recordData.push(tempObj);
503
       this.recordInfo.recordData.push(tempObj);
503
     },
504
     },
504
     handleDelete: function(index, row) {
505
     handleDelete: function(index, row) {
607
           const params = {
608
           const params = {
608
             cancelStock: this.recordInfo.recordData
609
             cancelStock: this.recordInfo.recordData
609
           };
610
           };
610
-          console.log("params2222",params)
611
+          console.log("params2222",params,this.return_time)
612
+        
611
           postDrugCancelStock(
613
           postDrugCancelStock(
612
             params,
614
             params,
613
             this.return_time,
615
             this.return_time,
751
     tempObj["product_date"] = ""
753
     tempObj["product_date"] = ""
752
     tempObj["expiry_date"] = ""
754
     tempObj["expiry_date"] = ""
753
     tempObj["batch_number"] = ""
755
     tempObj["batch_number"] = ""
754
-    tempObj["batch_number_id"] = ""
756
+    tempObj["batch_number_id"] = 0
755
     this.unitList =  getDataConfig('hemodialysis','units')
757
     this.unitList =  getDataConfig('hemodialysis','units')
756
     console.log("单位",this.unitList)
758
     console.log("单位",this.unitList)
757
     this.recordInfo.recordData.push(tempObj);
759
     this.recordInfo.recordData.push(tempObj);

+ 38 - 10
src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue Voir le fichier

81
               >
81
               >
82
               <div style="display:flex;">
82
               <div style="display:flex;">
83
                 <el-input
83
                 <el-input
84
+                 oninput="value=value.replace(/[^0-9.]/g,'')"
84
                   style="width:100px"
85
                   style="width:100px"
85
                   placeholder="请输入退库数量"
86
                   placeholder="请输入退库数量"
86
                   type="number"
87
                   type="number"
133
                 :prop="'recordData.' + scope.$index + '.return_count'"
134
                 :prop="'recordData.' + scope.$index + '.return_count'"
134
                 style="padding-top: 17px"
135
                 style="padding-top: 17px"
135
               >
136
               >
136
-               <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
137
+               <el-select v-model="scope.row.batch_number" filterable placeholder="请选择" :disabled="canCelShow">
137
                   <el-option
138
                   <el-option
138
                     v-for="(item,index) in numberList"
139
                     v-for="(item,index) in numberList"
139
                     :key="index"
140
                     :key="index"
140
                     :label="item.batch_number"
141
                     :label="item.batch_number"
141
-                    :value="item.batch_number">
142
+                    :value="item.id">
142
                   </el-option>
143
                   </el-option>
143
               </el-select>
144
               </el-select>
144
               </el-form-item>
145
               </el-form-item>
341
         dealerList:[],
342
         dealerList:[],
342
         numberList:[],
343
         numberList:[],
343
         unitList:[],
344
         unitList:[],
345
+        canCelShow:true
344
       }
346
       }
345
     },
347
     },
346
     methods: {
348
     methods: {
426
         }
428
         }
427
         return name;
429
         return name;
428
       }, handleEdit: function(index, row) {
430
       }, handleEdit: function(index, row) {
431
+        this.canCelShow = false
429
         const tempObj = {}
432
         const tempObj = {}
430
         tempObj['id'] = 0
433
         tempObj['id'] = 0
431
-        tempObj['drug_id'] = 0
432
-        tempObj['count'] = ''
433
-        tempObj['price'] = ''
434
-        tempObj['retail_price'] = ''
435
-
434
+        tempObj["return_count"] = "";
435
+        tempObj["price"] = "";
436
+        tempObj["retail_price"] = "";
437
+        tempObj["register_account"] = ""
438
+        tempObj["dealer"] = ""
439
+        tempObj["manufacturer"] =""
440
+        tempObj["remark"] = ""
441
+        tempObj["product_date"] = ""
442
+        tempObj["expiry_date"] = ""
443
+        tempObj["batch_number"] = ""
444
+        tempObj["batch_number_id"] = 0
436
 
445
 
437
         this.recordInfo.recordData.push(tempObj)
446
         this.recordInfo.recordData.push(tempObj)
438
       }, handleDelete: function(index, row) {
447
       }, handleDelete: function(index, row) {
529
                 return
538
                 return
530
               }
539
               }
531
             }
540
             }
541
+            console.log("hhhhh3223",this.recordInfo.recordData)
542
+            console.log("900000000",this.numberList)
543
+            for(let i=0;i<this.recordInfo.recordData.length;i++){
544
+              for(let j=0;j<this.numberList.length;j++){
545
+                 if(this.recordInfo.recordData[i].batch_number == this.numberList[j].id){
546
+                   this.recordInfo.recordData[i].batch_number = this.numberList[j].batch_number
547
+                   this.recordInfo.recordData[i].batch_number_id = this.numberList[j].id
548
+                 }
549
+              }
550
+             
551
+            }
532
 
552
 
533
             const params = {
553
             const params = {
534
               'cancelStock': this.recordInfo.recordData
554
               'cancelStock': this.recordInfo.recordData
535
             }
555
             }
556
+            console.log("232323223",this.recordInfo.recordData)
557
+           
536
             editDrugCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
558
             editDrugCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
537
               if (response.data.state == 0) {
559
               if (response.data.state == 0) {
538
                 this.$message.error(response.data.msg)
560
                 this.$message.error(response.data.msg)
539
                 return false
561
                 return false
540
               } else {
562
               } else {
541
-                this.$message.success('退库成功')
542
-
543
-                this.$router.back(-1)
563
+                if (response.data.data.msg == 1){
564
+                   this.$message.success('退库成功')
565
+                   this.$router.back(-1)
566
+                }
567
+                if(response.data.data.msg == 2){
568
+                   this.$message.error("退库数量大于入库数量")
569
+                }
570
+              
544
               }
571
               }
545
             })
572
             })
546
           } else {
573
           } else {
569
               this.recordInfo.recordData.push(response.data.data.list[i])
596
               this.recordInfo.recordData.push(response.data.data.list[i])
570
             }
597
             }
571
             this.cancelStock = response.data.data.info
598
             this.cancelStock = response.data.data.info
599
+            console.log("hhhh23hh2hh23h223",this.cancelStock)
572
             this.return_time = this.getTime(this.cancelStock.return_time, '{y}-{m}-{d}')
600
             this.return_time = this.getTime(this.cancelStock.return_time, '{y}-{m}-{d}')
573
             this.form.manufacturer = this.cancelStock.manufacturer
601
             this.form.manufacturer = this.cancelStock.manufacturer
574
             this.form.dealer = this.cancelStock.dealer
602
             this.form.dealer = this.cancelStock.dealer

+ 4 - 2
src/xt_pages/stock/drugs/drugStockFlow.vue Voir le fichier

67
              <span v-if="scope.row.consumable_type == 1">手动入库</span>
67
              <span v-if="scope.row.consumable_type == 1">手动入库</span>
68
              <span v-if="scope.row.consumable_type == 2">手动出库</span>
68
              <span v-if="scope.row.consumable_type == 2">手动出库</span>
69
              <span v-if="scope.row.consumable_type == 3">自动出库</span>
69
              <span v-if="scope.row.consumable_type == 3">自动出库</span>
70
+             <span v-if="scope.row.consumable_type == 4">手动退库</span>
70
            </template>
71
            </template>
71
         </el-table-column>
72
         </el-table-column>
72
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
73
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
73
            <template slot-scope="scope">
74
            <template slot-scope="scope">
74
              <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
75
              <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
75
               <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>
76
               <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>
77
+              <span v-if="scope.row.consumable_type == 4">{{scope.row.cancel_order_number}}</span>
76
            </template>
78
            </template>
77
         </el-table-column>
79
         </el-table-column>
78
         <el-table-column prop="drug_name" label="操作日期" align="center">
80
         <el-table-column prop="drug_name" label="操作日期" align="center">
85
              <span v-if="scope.row.consumable_type == 1">{{scope.row.count}}{{scope.row.max_unit}}</span>
87
              <span v-if="scope.row.consumable_type == 1">{{scope.row.count}}{{scope.row.max_unit}}</span>
86
              <span v-if="scope.row.consumable_type == 2">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
88
              <span v-if="scope.row.consumable_type == 2">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
87
              <span v-if="scope.row.consumable_type == 3">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
89
              <span v-if="scope.row.consumable_type == 3">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
88
-
90
+             <span v-if="scope.row.consumable_type == 4">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
89
             
91
             
90
            </template>
92
            </template>
91
         </el-table-column>
93
         </el-table-column>
214
           {id:1,name:"手动入库"},
216
           {id:1,name:"手动入库"},
215
           {id:2,name:"手动出库"},
217
           {id:2,name:"手动出库"},
216
           {id:3,name:"自动出库"},
218
           {id:3,name:"自动出库"},
217
-        
219
+          {id:4,name:"手动退库"},
218
 
220
 
219
         ],
221
         ],
220
         outList:[],
222
         outList:[],

+ 1 - 0
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue Voir le fichier

124
               >
124
               >
125
               <div style="display:flex;">
125
               <div style="display:flex;">
126
                 <el-input
126
                 <el-input
127
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
127
                   placeholder="请输入入库数量"
128
                   placeholder="请输入入库数量"
128
                   type="number"
129
                   type="number"
129
                   v-model="scope.row.warehousing_count"
130
                   v-model="scope.row.warehousing_count"

+ 1 - 0
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue Voir le fichier

189
               >
189
               >
190
                 <div style="display:flex;">
190
                 <div style="display:flex;">
191
                   <el-input
191
                   <el-input
192
+                    oninput="value=value.replace(/[^0-9.]/g,'')"
192
                     placeholder="请输入入库数量"
193
                     placeholder="请输入入库数量"
193
                     type="number"
194
                     type="number"
194
                     v-model="scope.row.warehousing_count"
195
                     v-model="scope.row.warehousing_count"

+ 1 - 0
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Voir le fichier

149
               >
149
               >
150
                 <div style="display:flex;">
150
                 <div style="display:flex;">
151
                   <el-input
151
                   <el-input
152
+                    oninput="value=value.replace(/[^0-9.]/g,'')"
152
                     style="width:80px"
153
                     style="width:80px"
153
                     placeholder="请输入出库数量"
154
                     placeholder="请输入出库数量"
154
                     type="number"
155
                     type="number"

+ 1 - 0
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Voir le fichier

110
               >
110
               >
111
                 <div style="display:flex;">
111
                 <div style="display:flex;">
112
                   <el-input
112
                   <el-input
113
+                   oninput="value=value.replace(/[^0-9.]/g,'')"
113
                    style="width:100px"
114
                    style="width:100px"
114
                    :disabled="drug_show"
115
                    :disabled="drug_show"
115
                     placeholder="请输入出库数量"
116
                     placeholder="请输入出库数量"

+ 1 - 1
src/xt_pages/stock/drugs/query.vue Voir le fichier

123
         </el-table-column>
123
         </el-table-column>
124
         <el-table-column prop="drug_name" label="退库数量" align="center">
124
         <el-table-column prop="drug_name" label="退库数量" align="center">
125
            <template slot-scope="scope">
125
            <template slot-scope="scope">
126
-             {{getCancelCount(scope.row.drug_id)}}
126
+             {{getCancelCount(scope.row.drug_id)}}{{scope.row.max_unit}}
127
            </template>
127
            </template>
128
         </el-table-column>
128
         </el-table-column>
129
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
129
         <el-table-column prop="drug_name" label="剩余库存量" align="center">

+ 3 - 0
src/xt_pages/stock/stockFlow.vue Voir le fichier

65
              <span v-if="scope.row.consumable_type == 1">手动入库</span>
65
              <span v-if="scope.row.consumable_type == 1">手动入库</span>
66
              <span v-if="scope.row.consumable_type == 2">手动出库</span>
66
              <span v-if="scope.row.consumable_type == 2">手动出库</span>
67
              <span v-if="scope.row.consumable_type == 3">自动出库</span>
67
              <span v-if="scope.row.consumable_type == 3">自动出库</span>
68
+             <span v-if="scope.row.consumable_type == 4">手动退库</span>
68
            </template>
69
            </template>
69
         </el-table-column>
70
         </el-table-column>
70
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
71
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
72
             <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
73
             <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
73
             <span v-if="scope.row.consumable_type == 2">{{scope.row.warehouse_out_order_number}}</span>  
74
             <span v-if="scope.row.consumable_type == 2">{{scope.row.warehouse_out_order_number}}</span>  
74
             <span v-if="scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>  
75
             <span v-if="scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>  
76
+            <span v-if="scope.row.consumable_type == 4">{{scope.row.cancel_order_number}}</span>  
75
            </template>
77
            </template>
76
         </el-table-column>
78
         </el-table-column>
77
         <el-table-column prop="drug_name" label="操作日期" align="center">
79
         <el-table-column prop="drug_name" label="操作日期" align="center">
210
           {id:1,name:"手动入库"},
212
           {id:1,name:"手动入库"},
211
           {id:2,name:"手动出库"},
213
           {id:2,name:"手动出库"},
212
           {id:3,name:"自动出库"},
214
           {id:3,name:"自动出库"},
215
+          {id:4,name:"手动退库"},
213
         ],
216
         ],
214
         countList:[],
217
         countList:[],
215
         outCountList:[],
218
         outCountList:[],

+ 1 - 1
src/xt_pages/stock/stockInOrderAdd.vue Voir le fichier

101
             <template slot-scope="scope">
101
             <template slot-scope="scope">
102
               <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
102
               <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
103
                             :rules='tableRules.warehousing_count' style="padding-top: 20px">
103
                             :rules='tableRules.warehousing_count' style="padding-top: 20px">
104
-                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count"></el-input>
104
+                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count"  oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
105
                   {{scope.row.min_unit}}
105
                   {{scope.row.min_unit}}
106
               </el-form-item>
106
               </el-form-item>
107
             
107
             

+ 2 - 1
src/xt_pages/stock/stockInOrderEdit.vue Voir le fichier

198
                 style="padding-top: 20px"
198
                 style="padding-top: 20px"
199
               >
199
               >
200
                 <el-input
200
                 <el-input
201
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
201
                   placeholder="请输入入库数量"
202
                   placeholder="请输入入库数量"
202
                   type="number"
203
                   type="number"
203
                   v-model="scope.row.warehousing_count"
204
                   v-model="scope.row.warehousing_count"
824
           
825
           
825
           }
826
           }
826
          
827
          
827
-         if(val.xt_warehouse_info.length > 0){
828
+         if(val.xt_warehouse_info !=null &&  val.xt_warehouse_info.length > 0){
828
            
829
            
829
           for(let j=0;j<val.xt_warehouse_info.length;j++){
830
           for(let j=0;j<val.xt_warehouse_info.length;j++){
830
               this.numberList.push(val.xt_warehouse_info[j])
831
               this.numberList.push(val.xt_warehouse_info[j])