XMLWAN 3 년 전
부모
커밋
63fc6a5e05

+ 8 - 0
src/api/drug/drug.js 파일 보기

451
     params: params
451
     params: params
452
   })
452
   })
453
 }
453
 }
454
+
455
+export function SaveDrugProofInventory(params) {
456
+  return request({
457
+    url: '/api/drug/savedrugproofinventory',
458
+    method: 'Get',
459
+    params: params
460
+  })
461
+}

+ 193 - 66
src/xt_pages/stock/drugs/drugDamaged.vue 파일 보기

11
                 style="width: 200px;"
11
                 style="width: 200px;"
12
                 class="filter-item"
12
                 class="filter-item"
13
                 v-model.trim="searchKey"
13
                 v-model.trim="searchKey"
14
-                placeholder=""
14
+                placeholder="请输入单据编号或操作人姓名"
15
                 />
15
                 />
16
                 <el-button
16
                 <el-button
17
                 size="small"
17
                 size="small"
26
                 v-model="start_time"
26
                 v-model="start_time"
27
                 type="date"
27
                 type="date"
28
                 style="margin-left:5px;width:140px;"
28
                 style="margin-left:5px;width:140px;"
29
-                placeholder="选择日期">
29
+                placeholder="选择日期"
30
+                @change="changeStartTime">
30
                 </el-date-picker>
31
                 </el-date-picker>
31
                 <el-date-picker
32
                 <el-date-picker
32
                 size="small"
33
                 size="small"
33
                 v-model="end_time"
34
                 v-model="end_time"
34
                 type="date"
35
                 type="date"
35
                 style="margin-left:5px;width:140px;"
36
                 style="margin-left:5px;width:140px;"
36
-                placeholder="选择日期">
37
+                placeholder="选择日期"
38
+                @change="changeEndTime">
37
                 </el-date-picker>
39
                 </el-date-picker>
38
             </div>
40
             </div>
39
             <div>
41
             <div>
100
         </el-pagination>
102
         </el-pagination>
101
     </div>
103
     </div>
102
     <el-dialog
104
     <el-dialog
103
-        title="库房调价"
105
+        title="库房报损"
104
         :visible.sync="dialogVisible"
106
         :visible.sync="dialogVisible"
105
         width="1200px">
107
         width="1200px">
106
         <el-form :model="form" class="modifyDialog" label-width="120px">
108
         <el-form :model="form" class="modifyDialog" label-width="120px">
108
                 <el-input v-model="form.drug_id"></el-input>
110
                 <el-input v-model="form.drug_id"></el-input>
109
             </el-form-item>
111
             </el-form-item>
110
             <el-form-item label="药品名称">
112
             <el-form-item label="药品名称">
111
-            <el-autocomplete
112
-                class="checkSearch"
113
-                popper-class="my-autocomplete"
114
-                v-model="form.drug_name"
115
-                :fetch-suggestions="querySearchAsync"
116
-                :trigger-on-focus="true"
117
-                placeholder="请输入药品名称"
118
-                @select="handleSelect"
119
-                @input="changeGoodName(scope.$index)"
120
-                style="width:160px;"
121
-                >
122
-                <i class="el-icon-search el-input__icon" slot="suffix"></i>
123
-                <template slot-scope="{ item }">
124
-                <div class="name">{{ item.drug_name + item.dose + item.dose_unit + "*" +item.min_number + item.min_unit +"/" + item.max_unit + "  "+item.manufacturer}}</div>
125
-                </template>
126
-                </el-autocomplete>  
113
+              <el-autocomplete
114
+                  class="checkSearch"
115
+                  popper-class="my-autocomplete"
116
+                  v-model="form.drug_name"
117
+                  :fetch-suggestions="querySearchAsync"
118
+                  :trigger-on-focus="true"
119
+                  placeholder="请输入药品名称"
120
+                  @select="handleSelect"
121
+                  @input="changeGoodName(scope.$index)"
122
+                  style="width:160px;"
123
+                  >
124
+                  <i class="el-icon-search el-input__icon" slot="suffix"></i>
125
+                  <template slot-scope="{ item }">
126
+                  <div class="name">{{ item.drug_name + item.dose + item.dose_unit + "*" +item.min_number + item.min_unit +"/" + item.max_unit + "  "+item.manufacturer}}</div>
127
+                  </template>
128
+              </el-autocomplete>  
127
             </el-form-item>
129
             </el-form-item>
128
-            <!-- <el-form-item label="规格">
129
-                <el-input v-model="form.name"></el-input>
130
-            </el-form-item> -->
130
+
131
+            <el-form-item label="批次">
132
+               <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
133
+                  <el-option
134
+                    v-for="(item,index) in numberList"
135
+                    :key="index"
136
+                    :label="item.batch_number"
137
+                    :value="item.id">
138
+                  </el-option>
139
+               </el-select>
140
+            </el-form-item>
141
+         
131
             <el-form-item label="单位">
142
             <el-form-item label="单位">
132
                 <el-input v-model="form.warehousing_unit"></el-input>
143
                 <el-input v-model="form.warehousing_unit"></el-input>
144
+              <!-- <el-select v-model="scope.row.warehousing_unit" filterable placeholder="请选择单位" style="width:80px">
145
+                <el-option
146
+                  v-for="(option, index) in unitList"
147
+                  :key="index"
148
+                  :label="option.name"
149
+                  :value="option.name">
150
+                </el-option>
151
+              </el-select> -->
133
             </el-form-item>
152
             </el-form-item>
134
             <el-form-item label="进货价">
153
             <el-form-item label="进货价">
135
                 <el-input v-model="form.last_price"></el-input>
154
                 <el-input v-model="form.last_price"></el-input>
160
             </el-form-item>
179
             </el-form-item>
161
         </el-form>
180
         </el-form>
162
         <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
181
         <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
163
-            <el-table-column  prop="date" label="药品ID" width="100">
182
+            <el-table-column  prop="date" label="药品ID" width="100" align="center">
164
                 <template slot-scope="scope">
183
                 <template slot-scope="scope">
165
                   {{scope.row.drug_id}}
184
                   {{scope.row.drug_id}}
166
                 </template>
185
                 </template>
167
             </el-table-column>
186
             </el-table-column>
168
-            <el-table-column prop="date" label="药品名称"  width="100">
187
+            <el-table-column prop="date" label="药品名称"  width="100" align="center">
169
                   <template slot-scope="scope">
188
                   <template slot-scope="scope">
170
                   {{scope.row.drug_name}}
189
                   {{scope.row.drug_name}}
171
                 </template>
190
                 </template>
172
             </el-table-column>
191
             </el-table-column>
173
-            <el-table-column prop="name" label="规格" width="100">
192
+            <el-table-column prop="name" label="规格" width="100" align="center">
174
               <template slot-scope="scope">
193
               <template slot-scope="scope">
175
-                 {{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
194
+                {{scope.row.specification_name}}
176
               </template>
195
               </template>
177
             </el-table-column>
196
             </el-table-column>
178
-            <el-table-column prop="name" label="单位" width="100">
197
+            <el-table-column prop="name" label="单位" width="100" align="center">
179
                <template slot-scope="scope">
198
                <template slot-scope="scope">
180
                  {{scope.row.warehousing_unit}}
199
                  {{scope.row.warehousing_unit}}
181
               </template> 
200
               </template> 
182
             </el-table-column>
201
             </el-table-column>
183
-            <el-table-column prop="name" label="报损数量" width="100">
202
+            <el-table-column prop="name" label="报损数量" width="100" align="center">
184
               <template slot-scope="scope">
203
               <template slot-scope="scope">
185
                  {{scope.row.count}}
204
                  {{scope.row.count}}
186
               </template> 
205
               </template> 
187
             </el-table-column>
206
             </el-table-column>
188
-            <el-table-column prop="name" label="原进货价"  width="100">
207
+            <el-table-column prop="name" label="原进货价"  width="100" align="center">
189
              <template slot-scope="scope">
208
              <template slot-scope="scope">
190
                  {{scope.row.last_price}}
209
                  {{scope.row.last_price}}
191
               </template> 
210
               </template> 
192
             </el-table-column>
211
             </el-table-column>
193
-            <el-table-column  prop="name" label="原零售价" width="100">
212
+            <el-table-column  prop="name" label="原零售价" width="100" align="center">
194
                <template slot-scope="scope">
213
                <template slot-scope="scope">
195
                 {{scope.row.retail_price}}
214
                 {{scope.row.retail_price}}
196
               </template>
215
               </template>
197
             </el-table-column>
216
             </el-table-column>
198
-            <el-table-column prop="name" label="新零售价" width="100">
217
+            <!-- <el-table-column prop="name" label="新零售价" width="100" align="center">
199
                 <template slot-scope="scope">
218
                 <template slot-scope="scope">
200
                 {{scope.row.new_price}}
219
                 {{scope.row.new_price}}
201
                </template>
220
                </template>
202
-            </el-table-column>
203
-            <el-table-column  prop="name"  label="生产厂商"  width="100">
221
+            </el-table-column> -->
222
+            <el-table-column  prop="name"  label="生产厂商"  width="100" align="center">
204
               <template slot-scope="scope">
223
               <template slot-scope="scope">
205
                 {{scope.row.manufacturer}}
224
                 {{scope.row.manufacturer}}
206
               </template>
225
               </template>
207
             </el-table-column>
226
             </el-table-column>
208
-            <el-table-column prop="name" label="产地" width="100">
227
+            <el-table-column prop="name" label="产地" width="100" align="center">
209
               <template slot-scope="scope">
228
               <template slot-scope="scope">
210
                 {{scope.row.drug_origin_place}}
229
                 {{scope.row.drug_origin_place}}
211
               </template>
230
               </template>
212
             </el-table-column>
231
             </el-table-column>
213
-            <el-table-column prop="name" label="批准文号" width="100">
232
+            <el-table-column prop="name" label="批准文号" width="100" align="center">
214
              <template slot-scope="scope">
233
              <template slot-scope="scope">
215
                 {{scope.row.number}}
234
                 {{scope.row.number}}
216
               </template>
235
               </template>
217
             </el-table-column>
236
             </el-table-column>
218
-            <el-table-column  prop="name" label="备注"  width="100">
237
+            <el-table-column  prop="name" label="备注"  width="100" align="center">
219
                <template slot-scope="scope">
238
                <template slot-scope="scope">
220
                 {{scope.row.remark}}
239
                 {{scope.row.remark}}
221
               </template>
240
               </template>
420
 
439
 
421
 <script>
440
 <script>
422
 import BreadCrumb from "../../components/bread-crumb";
441
 import BreadCrumb from "../../components/bread-crumb";
423
-import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage } from "@/api/drug/drug"
442
+import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage,getDrugWarehouseInfoList } from "@/api/drug/drug"
443
+import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
424
 import { uParseTime } from '@/utils/tools'
444
 import { uParseTime } from '@/utils/tools'
425
 export default {
445
 export default {
426
     name: "stockModifyPrice",
446
     name: "stockModifyPrice",
431
         return{
451
         return{
432
             crumbs: [
452
             crumbs: [
433
                 { path: false, name: "库存管理" },
453
                 { path: false, name: "库存管理" },
434
-                { path: false, name: "耗材管理" },
454
+                { path: false, name: "药品管理" },
435
                 { path: false, name: "药品报损" }
455
                 { path: false, name: "药品报损" }
436
             ],
456
             ],
437
             searchKey:'',
457
             searchKey:'',
465
                 max_unit:"",
485
                 max_unit:"",
466
                 batch_number:"",
486
                 batch_number:"",
467
                 last_price:"",
487
                 last_price:"",
468
-                batch_number:"",
488
+                warehouse_info_id:"",
489
+                expiry_date:"",
490
+                product_date:"",
469
             },
491
             },
470
             drugList:[],
492
             drugList:[],
471
             manufacturerList:[],
493
             manufacturerList:[],
485
             editDialogVisible:false,
507
             editDialogVisible:false,
486
             modifyDialogVisible:false,
508
             modifyDialogVisible:false,
487
             id:"",
509
             id:"",
510
+            numberList:[],
488
         }
511
         }
489
     },
512
     },
490
     methods:{
513
     methods:{
550
         },
573
         },
551
          handleSelect(val){
574
          handleSelect(val){
552
             console.log("val232323223",val)
575
             console.log("val232323223",val)
553
-            this.form.id = val.id
554
-            this.form.drug_id = val.drug_id,
555
-            this.form.drug_name = val.drug_name
556
-            this.form.retail_price = val.retail_price
557
-            this.form.warehousing_order = val.warehousing_order
558
-            this.form.number = val.number
559
-            this.form.dealer = val.dealer
560
-            this.form.manufacturer = val.manufacturer
561
-            this.form.remark = val.remark
562
-            this.form.warehousing_unit = val.warehouseing_unit  
563
-            this.form.total = val.total
564
-            this.form.batch_number = val.batch_number
565
-            this.form.last_price = val.last_price
566
-           
576
+            this.getDrugBatchNumber(val.drug_id)
577
+            var params = {
578
+              id:val.drug_id
579
+            }
580
+           getDrugWarehouseInfoList(params).then(response=>{
581
+             if(response.data.state == 1){
582
+               var list =   response.data.data.list
583
+               for(let i=0;i<list.length;i++){
584
+                  list[i].stock_max_number = val.min_number * list[i].stock_max_number
585
+                }
586
+                var total = 0
587
+                for(let i=0;i<list.length;i++){
588
+                   total += (list[i].stock_max_number+list[i].stock_min_number)
589
+                }
590
+                this.form.id = val.id
591
+                this.form.drug_id = val.drug_id,
592
+                this.form.drug_name = val.drug_name
593
+                this.form.retail_price = val.retail_price
594
+                this.form.warehousing_order = val.warehousing_order
595
+                this.form.number = val.number
596
+                this.form.dealer = val.dealer
597
+                this.form.manufacturer = val.manufacturer
598
+                this.form.remark = val.remark
599
+                this.form.warehousing_unit = val.max_unit  
600
+                this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
601
+                this.form.batch_number = val.batch_number
602
+                this.form.last_price = val.last_price
603
+                this.form.expiry_date = val.expiry_date
604
+                this.form.product_date = val.product_date
605
+                this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
606
+                this.form.drug_origin_place = val.drug_origin_place
607
+             }
608
+           }) 
609
+        },
610
+
611
+        getTotal(total,max_unit,min_unit,min_number){
612
+            var str = ""
613
+            var min_str = ""
614
+            if(total<min_number){
615
+            str = ""
616
+            min_str = total + min_unit
617
+            }
618
+            if(total >= min_number){
619
+            if(parseInt(total/min_number)!=0){
620
+                str = parseInt(total/min_number)+ max_unit
621
+            }
622
+            if((total%min_number)!=0){
623
+                min_str =  total%min_number + min_unit
624
+            }
625
+            }
626
+        
627
+            return str + min_str
628
+        },
629
+        changeNumber(val){
630
+          console.log("val",val)
631
+          this.form.warehousing_info_id = val
632
+        },
633
+        getDrugBatchNumber(id){
634
+            var params = {
635
+              id:id
636
+            }
637
+          getDrugBatchNumber(params).then(response=>{
638
+            if(response.data.state == 1){
639
+              var list = response.data.data.list
640
+              console.log("list2222",list)
641
+              this.numberList = list
642
+            }
643
+          })
567
         },
644
         },
568
         getTime(val) {
645
         getTime(val) {
569
          if(val < 0){
646
          if(val < 0){
580
             drug_id:this.form.drug_id,
657
             drug_id:this.form.drug_id,
581
             drug_name:this.form.drug_name,
658
             drug_name:this.form.drug_name,
582
             warehousing_unit:this.form.warehousing_unit,
659
             warehousing_unit:this.form.warehousing_unit,
583
-            count:parseInt(this.form.count),
660
+            count:this.form.count,
584
             retail_price:this.form.retail_price.toString(),
661
             retail_price:this.form.retail_price.toString(),
585
             manufacturer:this.form.manufacturer,
662
             manufacturer:this.form.manufacturer,
586
             drug_origin_place:this.form.drug_origin_place,
663
             drug_origin_place:this.form.drug_origin_place,
592
             last_price:this.form.last_price,
669
             last_price:this.form.last_price,
593
             start_time:this.getTime(new Date()),
670
             start_time:this.getTime(new Date()),
594
             number:this.form.number,
671
             number:this.form.number,
595
-            } 
596
-          this.tableData.push(obj)     
672
+            expiry_date:this.form.expiry_date,
673
+            product_date:this.form.product_date,
674
+            specification_name:this.form.specification_name,
675
+            drug_origin_place:this.form.drug_origin_place,
676
+            warehousing_info_id:this.form.warehousing_info_id,
677
+            batch_number:this.form.batch_number
678
+          } 
679
+          this.tableData.push(obj)   
680
+          this.form.drug_name = ""
681
+          this.form.warehousing_unit = ""
682
+          this.form.count = ""
683
+          this.form.retail_price = ""
684
+          this.form.manufacturer = ""
685
+          this.form.drug_origin_place = ""
686
+          this.form.number = ""
687
+          this.form.remark = ""
688
+          this.form.new_price = ""
689
+          this.form.warehousing_order = ""
690
+          this.form.dealer = ""
691
+          this.form.last_price = ""
692
+          this.form.number = ""
693
+          this.form.expiry_date = ""
694
+          this.form.product_date = ""
695
+          this.form.specification_name = ""
696
+          this.form.drug_origin_place = "" 
597
         },
697
         },
598
         saveDrugDamage(){
698
         saveDrugDamage(){
599
-            for(let i=0;i<this.tableData.length;i++){
600
-            this.tableData[i].retail_price = this.tableData[i].retail_price.toString()
601
-            this.tableData[i].last_price = this.tableData[i].last_price.toString()
602
-            this.tableData[i].new_price = this.tableData[i].new_price.toString()
603
-            this.tableData[i].count =  parseInt(this.tableData[i].count)
604
-            }
605
-            var params= {
699
+          console.log("hhhh",this.tableData)
700
+          console.log("oooo",this.numberList)
701
+          for(let i=0;i<this.tableData.length;i++){
702
+              this.tableData[i].retail_price = this.tableData[i].retail_price.toString()
703
+              this.tableData[i].last_price = this.tableData[i].last_price.toString()
704
+              this.tableData[i].new_price = this.tableData[i].new_price.toString()
705
+              this.tableData[i].count =  parseInt(this.tableData[i].count)
706
+              if(this.tableData[i].expiry_date == undefined){
707
+                this.tableData[i].expiry_date  = 0
708
+              }else{
709
+               this.tableData[i].expiry_date = this.tableData[i].expiry_date
710
+              }
711
+              if( this.tableData[i].product_date  == undefined){
712
+                this.tableData[i].product_date = 0
713
+              }else{
714
+               this.tableData[i].product_date = this.tableData[i].product_date
715
+              }
716
+             if(this.tableData[i].dealer == 0){
717
+                console.log("你啦")
718
+                this.tableData[i].dealer = ""
719
+             }
720
+            
721
+          }
722
+          var params= {
606
             tableData:this.tableData,
723
             tableData:this.tableData,
607
-            }
608
-            console.log("parasm222",params)
724
+          }
725
+          console.log("parasm222",params)
726
+ 
609
         saveDrugDamage(params).then(response=>{
727
         saveDrugDamage(params).then(response=>{
610
             if(response.data.state == 1){
728
             if(response.data.state == 1){
611
             var msg =  response.data.data.msg
729
             var msg =  response.data.data.msg
612
             console.log("msg",msg)
730
             console.log("msg",msg)
613
             this.$message.success("保存成功!")
731
             this.$message.success("保存成功!")
614
             this.dialogVisible = false
732
             this.dialogVisible = false
733
+            this.tableData = []
615
             this.getlist()
734
             this.getlist()
616
           }
735
           }
617
          })  
736
          })  
789
         }).catch(() => {
908
         }).catch(() => {
790
           this.loading = false
909
           this.loading = false
791
         });
910
         });
911
+     },
912
+     changeStartTime(val){
913
+       this.start_time = this.getTime(val)
914
+       this.getlist()
915
+     },
916
+     changeEndTime(val){
917
+       this.end_time = this.getTime(val)
918
+       this.getlist()
792
      }
919
      }
793
     },
920
     },
794
     created(){
921
     created(){

+ 33 - 19
src/xt_pages/stock/drugs/drugModifyPrice.vue 파일 보기

11
             style="width: 200px;"
11
             style="width: 200px;"
12
             class="filter-item"
12
             class="filter-item"
13
             v-model.trim="searchKey"
13
             v-model.trim="searchKey"
14
-            placeholder=""
14
+            placeholder="请输入单据编号或操作人姓名"
15
             />
15
             />
16
             <el-button
16
             <el-button
17
             size="small"
17
             size="small"
18
             class="filter-item"
18
             class="filter-item"
19
             type="primary"
19
             type="primary"
20
             icon="el-icon-search"
20
             icon="el-icon-search"
21
+          
21
             @click="search"
22
             @click="search"
22
             >搜索</el-button
23
             >搜索</el-button
23
             >
24
             >
24
             <el-date-picker
25
             <el-date-picker
25
             size="small"
26
             size="small"
26
-            v-model="value1"
27
+            v-model="start_time"
27
             type="date"
28
             type="date"
28
             style="margin-left:5px;width:140px;"
29
             style="margin-left:5px;width:140px;"
29
-            placeholder="选择日期">
30
+            placeholder="选择日期"
31
+            @change="changeStartime"
32
+            >
30
             </el-date-picker>
33
             </el-date-picker>
31
             <el-date-picker
34
             <el-date-picker
32
             size="small"
35
             size="small"
33
-            v-model="value2"
36
+            v-model="end_time"
34
             type="date"
37
             type="date"
35
             style="margin-left:5px;width:140px;"
38
             style="margin-left:5px;width:140px;"
36
-            placeholder="选择日期">
39
+            placeholder="选择日期"
40
+            @change="changeEndTime">
37
             </el-date-picker>
41
             </el-date-picker>
38
         </div>
42
         </div>
39
         <div>
43
         <div>
40
             <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
44
             <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
41
             <el-button size="small" type="primary" @click="toCheck">核对</el-button>
45
             <el-button size="small" type="primary" @click="toCheck">核对</el-button>
42
-            <el-button size="small" type="primary" @click="print">打印</el-button>
43
-            <el-button size="small" type="primary" @click="toExport">导出</el-button>
46
+            <!-- <el-button size="small" type="primary" @click="print">打印</el-button>
47
+            <el-button size="small" type="primary" @click="toExport">导出</el-button> -->
44
         </div>
48
         </div>
45
       </div>
49
       </div>
46
       <div style="margin-top:10px">
50
       <div style="margin-top:10px">
127
             <el-form-item label="现价格">
131
             <el-form-item label="现价格">
128
                 <el-input v-model="form.new_price"></el-input>
132
                 <el-input v-model="form.new_price"></el-input>
129
             </el-form-item>
133
             </el-form-item>
130
-            <el-form-item label="调价数量">
134
+            <!-- <el-form-item label="调价数量">
131
                 <el-input v-model="form.count"></el-input>
135
                 <el-input v-model="form.count"></el-input>
132
-            </el-form-item>
136
+            </el-form-item> -->
133
             <el-form-item label="备注" style="width:66%;">
137
             <el-form-item label="备注" style="width:66%;">
134
                 <div style="display:flex;">
138
                 <div style="display:flex;">
135
                     <el-input v-model="form.remark"></el-input>
139
                     <el-input v-model="form.remark"></el-input>
158
               {{scope.row.warehousing_unit}}
162
               {{scope.row.warehousing_unit}}
159
               </template>
163
               </template>
160
             </el-table-column>
164
             </el-table-column>
161
-            <el-table-column prop="name" label="调价数量" width="100">
165
+            <!-- <el-table-column prop="name" label="调价数量" width="100">
162
               <template slot-scope="scope">
166
               <template slot-scope="scope">
163
               {{scope.row.count}}
167
               {{scope.row.count}}
164
               </template>
168
               </template>
165
-            </el-table-column>
169
+            </el-table-column> -->
166
             <el-table-column prop="name" label="原进货价" width="100">
170
             <el-table-column prop="name" label="原进货价" width="100">
167
                 <template slot-scope="scope">
171
                 <template slot-scope="scope">
168
                 {{scope.row.retail_price}}
172
                 {{scope.row.retail_price}}
216
     </el-dialog>
220
     </el-dialog>
217
    
221
    
218
      <el-dialog
222
      <el-dialog
219
-        title="耗材盘点核对"
223
+        title="药品盘点核对"
220
         :visible.sync="checkDialogVisible"
224
         :visible.sync="checkDialogVisible"
221
         width="30%"
225
         width="30%"
222
         >
226
         >
295
             </el-row>
299
             </el-row>
296
             <el-row>
300
             <el-row>
297
              <el-col>
301
              <el-col>
298
-               <el-form-item label="调价数量:">
302
+               <!-- <el-form-item label="调价数量:">
299
                     <el-input v-model="form.count"  style="width:200px"></el-input>
303
                     <el-input v-model="form.count"  style="width:200px"></el-input>
300
-                </el-form-item>
304
+                </el-form-item> -->
301
                 <el-form-item label="备注:">
305
                 <el-form-item label="备注:">
302
                     <div style="display:flex;">
306
                     <div style="display:flex;">
303
                         <el-input v-model="form.remark"  style="width:200px"></el-input>
307
                         <el-input v-model="form.remark"  style="width:200px"></el-input>
350
             </el-row>
354
             </el-row>
351
             <el-row>
355
             <el-row>
352
              <el-col>
356
              <el-col>
353
-               <el-form-item label="调价数量:">
357
+               <!-- <el-form-item label="调价数量:">
354
                     <el-input v-model="form.count"  style="width:200px"></el-input>
358
                     <el-input v-model="form.count"  style="width:200px"></el-input>
355
-                </el-form-item>
359
+                </el-form-item> -->
356
                 <el-form-item label="备注:">
360
                 <el-form-item label="备注:">
357
                     <div style="display:flex;">
361
                     <div style="display:flex;">
358
                         <el-input v-model="form.remark"  style="width:200px"></el-input>
362
                         <el-input v-model="form.remark"  style="width:200px"></el-input>
435
             editPriceDialogVisible:false,
439
             editPriceDialogVisible:false,
436
             modifyPriceDialogVisible:false,
440
             modifyPriceDialogVisible:false,
437
             id:0,
441
             id:0,
442
+            start_time:"",
443
+            end_time:"",
438
         }
444
         }
439
     },
445
     },
440
     methods:{
446
     methods:{
441
         search(){
447
         search(){
442
-
448
+          this.getlist()
443
         },
449
         },
444
         print(){
450
         print(){
445
            if(this.ids == ""){
451
            if(this.ids == ""){
721
       },
727
       },
722
      toExport(){
728
      toExport(){
723
       import('@/vendor/Export2Excel').then(excel => {
729
       import('@/vendor/Export2Excel').then(excel => {
724
-        const tHeader = ['药品名称','规格','单位','批次','调价数量','原进货价','新进货价','进货差价','原零售价','新零售价','零售差价',]
725
-        const filterVal = ['drug_name', '','warehousing_unit','number','count','retail_price','new_price','','new_price','']
730
+        const tHeader = ['药品名称','规格','单位','批次','原进货价','新进货价','进货差价','原零售价','新零售价','零售差价',]
731
+        const filterVal = ['drug_name', '','warehousing_unit','number','retail_price','new_price','','new_price','']
726
         console.log("table",this.tableList)
732
         console.log("table",this.tableList)
727
       
733
       
728
         const data = this.formatJson(filterVal, this.tableList)
734
         const data = this.formatJson(filterVal, this.tableList)
737
     formatJson(filterVal, jsonData) {
743
     formatJson(filterVal, jsonData) {
738
       return jsonData.map(v => filterVal.map(j => v[j]));
744
       return jsonData.map(v => filterVal.map(j => v[j]));
739
      },
745
      },
746
+    changeStartime(val){
747
+      this.start_time = this.getTime(val)
748
+      this.getlist()
749
+    },
750
+    changeEndTime(val){
751
+      this.end_time = this.getTime(val)
752
+      this.getlist()
753
+    }
740
     },
754
     },
741
     created(){
755
     created(){
742
         let tableHeight = document.body.clientHeight - 200;
756
         let tableHeight = document.body.clientHeight - 200;

+ 194 - 47
src/xt_pages/stock/drugs/inventory.vue 파일 보기

2
     <div>
2
     <div>
3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
4
             <div>
4
             <div>
5
-                <!-- <el-select v-model="value" size="small" placeholder="请选择">
6
-                    <el-option
7
-                    v-for="item in options"
8
-                    :key="item.value"
9
-                    :label="item.label"
10
-                    :value="item.value">
11
-                    </el-option>
12
-                </el-select> -->
13
                 <el-input
5
                 <el-input
14
                 size="small"
6
                 size="small"
15
                 style="width: 200px;margin-left:10px;"
7
                 style="width: 200px;margin-left:10px;"
16
                 class="filter-item"
8
                 class="filter-item"
17
                 v-model.trim="searchKey"
9
                 v-model.trim="searchKey"
18
-                placeholder=""
10
+                placeholder="请输入单据编号或操作人姓名"
19
                 />
11
                 />
20
                 <el-button
12
                 <el-button
21
                 size="small"
13
                 size="small"
30
                 v-model="start_time"
22
                 v-model="start_time"
31
                 type="date"
23
                 type="date"
32
                 style="margin-left:5px;width:140px;"
24
                 style="margin-left:5px;width:140px;"
33
-                placeholder="选择日期">
25
+                placeholder="选择日期"
26
+                @change="changeStartTime">
34
                 </el-date-picker>
27
                 </el-date-picker>
35
                 <el-date-picker
28
                 <el-date-picker
36
                 size="small"
29
                 size="small"
37
                 v-model="end_time"
30
                 v-model="end_time"
38
                 type="date"
31
                 type="date"
39
                 style="margin-left:5px;width:140px;"
32
                 style="margin-left:5px;width:140px;"
40
-                placeholder="选择日期">
33
+                placeholder="选择日期"
34
+                @change="changeEndTime">
41
                 </el-date-picker>
35
                 </el-date-picker>
42
             </div>
36
             </div>
43
             <div>
37
             <div>
44
                 <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
38
                 <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
45
                 <el-button size="small" type="primary" @click="toCheck">核对</el-button>
39
                 <el-button size="small" type="primary" @click="toCheck">核对</el-button>
46
-                <el-button size="small" type="primary" @click="print">打印</el-button>
47
-                <el-button size="small" type="primary" @click="exportList">导出</el-button>
40
+                <!-- <el-button size="small" type="primary" @click="print">打印</el-button>
41
+                <el-button size="small" type="primary" @click="exportList">导出</el-button> -->
48
             </div>
42
             </div>
49
         </div>
43
         </div>
50
         <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"  @selection-change="changePrice">
44
         <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"  @selection-change="changePrice">
59
                   {{getTime(scope.row.start_time)}}
53
                   {{getTime(scope.row.start_time)}}
60
                 </template>
54
                 </template>
61
             </el-table-column>
55
             </el-table-column>
62
-             <el-table-column prop="name" label="盘点数量" align="center">
56
+            <el-table-column prop="name" label="盘点数量" align="center">
63
                 <template slot-scope="scope">
57
                 <template slot-scope="scope">
64
                   {{scope.row.count}}
58
                   {{scope.row.count}}
65
                 </template>
59
                 </template>
81
             </el-table-column>
75
             </el-table-column>
82
             <el-table-column prop="name" label="状态" align="center">
76
             <el-table-column prop="name" label="状态" align="center">
83
               <template slot-scope="scope">
77
               <template slot-scope="scope">
84
-                 <span v-if="scope.row.checker_status == 1">已核对</span>
85
-                 <span v-if="scope.row.checker_status == 2">未核对</span>
78
+                 <span v-if="scope.row.checker_status == 1">盘点完成</span>
79
+                 <span v-if="scope.row.checker_status == 2">正在盘点</span>
86
               </template>
80
               </template>
87
             </el-table-column>
81
             </el-table-column>
88
-            <el-table-column label="操作" align="center">
82
+            <el-table-column label="操作" align="center" width="260">
89
                 <template slot-scope="scope">
83
                 <template slot-scope="scope">
90
                   <el-button type="primary" size="small" @click="editInventory(scope.row.id,scope.row.checker_status,scope.$index)">编辑</el-button>
84
                   <el-button type="primary" size="small" @click="editInventory(scope.row.id,scope.row.checker_status,scope.$index)">编辑</el-button>
85
+                  <el-button type="primary" size="small" @click="toProof(scope.row.id)">校正</el-button>
91
                   <el-button type="danger" size="small" @click="deleteDrugInventory(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
86
                   <el-button type="danger" size="small" @click="deleteDrugInventory(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
87
+                 
92
                 </template>
88
                 </template>
93
             </el-table-column>
89
             </el-table-column>
94
         </el-table>
90
         </el-table>
128
                   </template>
124
                   </template>
129
                  </el-autocomplete>  
125
                  </el-autocomplete>  
130
                 </el-form-item>
126
                 </el-form-item>
127
+                <el-form-item label="批次">
128
+                  <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
129
+                      <el-option
130
+                        v-for="(item,index) in numberList"
131
+                        :key="index"
132
+                        :label="item.batch_number"
133
+                        :value="item.id">
134
+                      </el-option>
135
+                  </el-select>
136
+                </el-form-item>
137
+         
131
                 <el-form-item label="规格">
138
                 <el-form-item label="规格">
132
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
139
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
133
                 </el-form-item>
140
                 </el-form-item>
163
                 </el-form-item>
170
                 </el-form-item>
164
             </el-form>
171
             </el-form>
165
             <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
172
             <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
166
-                <el-table-column prop="date" label="耗材ID" width="100">
173
+                <el-table-column prop="date" label="耗材ID" width="100" align="center">
167
                     <template slot-scope="scope">
174
                     <template slot-scope="scope">
168
                        {{scope.row.drug_id}}
175
                        {{scope.row.drug_id}}
169
                     </template>
176
                     </template>
170
                 </el-table-column>
177
                 </el-table-column>
171
-                <el-table-column prop="date" label="耗材名称" width="100">
178
+                <el-table-column prop="date" label="耗材名称" width="100" align="center">
172
                    <template slot-scope="scope">
179
                    <template slot-scope="scope">
173
                        {{scope.row.drug_name}}
180
                        {{scope.row.drug_name}}
174
                     </template>
181
                     </template>
175
                 </el-table-column>
182
                 </el-table-column>
176
-                <el-table-column prop="name" label="规格" width="100">
183
+                <el-table-column prop="name" label="规格" width="100" align="center">
177
                    <template slot-scope="scope">
184
                    <template slot-scope="scope">
178
                        {{scope.row.specification_name}}
185
                        {{scope.row.specification_name}}
179
                     </template>
186
                     </template>
180
                 </el-table-column>
187
                 </el-table-column>
181
-                <el-table-column prop="name" label="单位" width="100">
188
+                <el-table-column prop="name" label="单位" width="100" align="center">
182
                      <template slot-scope="scope">
189
                      <template slot-scope="scope">
183
                        {{scope.row.warehousing_unit}}
190
                        {{scope.row.warehousing_unit}}
184
                     </template>
191
                     </template>
185
                 </el-table-column>
192
                 </el-table-column>
186
-                <el-table-column prop="name"  label="盘点数量" width="100">
193
+                <el-table-column prop="name"  label="盘点数量" width="100" align="center">
187
                      <template slot-scope="scope">
194
                      <template slot-scope="scope">
188
                        {{scope.row.count}}
195
                        {{scope.row.count}}
189
                     </template>
196
                     </template>
190
                 </el-table-column>
197
                 </el-table-column>
191
-                <el-table-column prop="name" label="原进货价" width="100">
198
+                <el-table-column prop="name" label="原进货价" width="100" align="center">
192
                    <template slot-scope="scope">
199
                    <template slot-scope="scope">
193
                        {{scope.row.last_price}}
200
                        {{scope.row.last_price}}
194
                     </template>
201
                     </template>
195
                 </el-table-column>
202
                 </el-table-column>
196
-                <el-table-column prop="name" label="原零售价" width="100">
203
+                <el-table-column prop="name" label="原零售价" width="100" align="center">
197
                     <template slot-scope="scope">
204
                     <template slot-scope="scope">
198
                        {{scope.row.retail_price}}
205
                        {{scope.row.retail_price}}
199
                     </template>
206
                     </template>
200
                 </el-table-column>
207
                 </el-table-column>
201
-                <!-- <el-table-column prop="name" label="新零售价" width="100">
202
-                     <template slot-scope="scope">
203
-                       {{scope.row.new_price}}
204
-                    </template>
205
-                </el-table-column> -->
206
-                <el-table-column  prop="name" label="生产厂商" width="100">
208
+             
209
+                <el-table-column  prop="name" label="生产厂商" width="100" align="center">
207
                     <template slot-scope="scope">
210
                     <template slot-scope="scope">
208
                        {{scope.row.manufacturer}}
211
                        {{scope.row.manufacturer}}
209
                     </template> 
212
                     </template> 
210
                 </el-table-column>
213
                 </el-table-column>
211
-                <el-table-column prop="name" label="产地"  width="100">
214
+                <el-table-column prop="name" label="产地"  width="100" align="center">
212
                   <template slot-scope="scope">
215
                   <template slot-scope="scope">
213
                        {{scope.row.drug_origin_place}}
216
                        {{scope.row.drug_origin_place}}
214
                   </template> 
217
                   </template> 
215
                 </el-table-column>
218
                 </el-table-column>
216
-                <el-table-column prop="name" label="批准文号" width="100">
219
+                <el-table-column prop="name" label="批准文号" width="100" align="center">
217
                  <template slot-scope="scope">
220
                  <template slot-scope="scope">
218
                        {{scope.row.number}}
221
                        {{scope.row.number}}
219
                   </template> 
222
                   </template> 
220
                 </el-table-column>
223
                 </el-table-column>
221
-                <el-table-column prop="name" label="备注" width="100">
224
+                <el-table-column prop="name" label="备注" width="100" align="center">
222
                     <template slot-scope="scope">
225
                     <template slot-scope="scope">
223
                        {{scope.row.remark}}
226
                        {{scope.row.remark}}
224
                     </template> 
227
                     </template> 
248
             <el-form :model="form" class="modifyDialog" label-width="120px">
251
             <el-form :model="form" class="modifyDialog" label-width="120px">
249
 
252
 
250
                 <el-form-item label="耗材ID">
253
                 <el-form-item label="耗材ID">
251
-                    <el-input v-model="form.drug_id"></el-input>
254
+                    <el-input v-model="form.drug_id" :disabled="true"></el-input>
252
                 </el-form-item>
255
                 </el-form-item>
253
                 <el-form-item label="药品名称">
256
                 <el-form-item label="药品名称">
254
                   <el-autocomplete
257
                   <el-autocomplete
271
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
274
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
272
                 </el-form-item>
275
                 </el-form-item>
273
                 <el-form-item label="单位">
276
                 <el-form-item label="单位">
274
-                    <el-input v-model="form.warehousing_unit"></el-input>
277
+                    <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
275
                 </el-form-item>
278
                 </el-form-item>
276
                 <el-form-item label="进货价">
279
                 <el-form-item label="进货价">
277
-                    <el-input v-model="form.last_price"></el-input>
280
+                    <el-input v-model="form.last_price" :disabled="true"></el-input>
278
                 </el-form-item>
281
                 </el-form-item>
279
                 <el-form-item label="零售价">
282
                 <el-form-item label="零售价">
280
-                    <el-input v-model="form.retail_price"></el-input>
283
+                    <el-input v-model="form.retail_price" :disabled="true"></el-input>
281
                 </el-form-item>
284
                 </el-form-item>
282
                 <el-form-item label="盘点数量">
285
                 <el-form-item label="盘点数量">
283
                     <el-input v-model="form.count"></el-input>
286
                     <el-input v-model="form.count"></el-input>
413
                 <el-button type="primary" @click="modifyInventory">确 定</el-button>
416
                 <el-button type="primary" @click="modifyInventory">确 定</el-button>
414
             </span>
417
             </span>
415
         </el-dialog>
418
         </el-dialog>
419
+
420
+
421
+         <el-dialog
422
+            title="校正"
423
+            :visible.sync="profdialogVisible"
424
+            width="1200px">
425
+            <el-form :model="form" class="modifyDialog" label-width="120px">
426
+
427
+                <el-form-item label="药品名称">
428
+                  <el-autocomplete
429
+                    class="checkSearch"
430
+                    popper-class="my-autocomplete"
431
+                    v-model="form.drug_name"
432
+                    :fetch-suggestions="querySearchAsync"
433
+                    :trigger-on-focus="true"
434
+                    placeholder="请输入药品名称"
435
+                    @select="handleSelect"
436
+                    style="width:160px;"
437
+                  >
438
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
439
+                  <template slot-scope="{ item }">
440
+                    <div class="name">{{ item.drug_name + item.dose + item.dose_unit + "*" +item.min_number + item.min_unit +"/" + item.max_unit + "  "+item.manufacturer}}</div>
441
+                  </template>
442
+                 </el-autocomplete>  
443
+                </el-form-item>
444
+                <el-form-item label="单位">
445
+                    <el-input v-model="form.warehousing_unit"></el-input>
446
+                </el-form-item>
447
+                <el-form-item label="盘点数量">
448
+                    <el-input v-model="form.count"></el-input>
449
+                </el-form-item>
450
+                <el-form-item label="校正数量">
451
+                    <el-input v-model="form.proof_count" type="number"></el-input>
452
+                </el-form-item>
453
+              
454
+                <el-form-item label="库存">
455
+                    <el-input v-model="form.total" :disabled="true"></el-input>
456
+                </el-form-item>
457
+                
458
+                <el-form-item label="备注">
459
+                    <div style="display:flex;">
460
+                        <el-input v-model="form.remark"></el-input>
461
+                    </div>
462
+                </el-form-item>
463
+            </el-form>
464
+            <span slot="footer" class="dialog-footer">
465
+                <el-button @click="profdialogVisible = false">取 消</el-button>
466
+                <el-button type="primary" @click="proofInventory">确 定</el-button>
467
+            </span>
468
+        </el-dialog>
416
     </div>
469
     </div>
417
 </template>
470
 </template>
418
 
471
 
419
 <script>
472
 <script>
420
 import { uParseTime } from '@/utils/tools'
473
 import { uParseTime } from '@/utils/tools'
421
-import { postSearchDrugWarehouseList,getDrugWarehouseInfoList,saveDrugInventory,getDrugInventoryList,SaveDrugCheckedInventory,getDrugInventoryDetail,modifyInventory} from "@/api/drug/drug"
474
+import { postSearchDrugWarehouseList,getDrugWarehouseInfoList,saveDrugInventory,getDrugInventoryList,SaveDrugCheckedInventory,getDrugInventoryDetail,modifyInventory,SaveDrugProofInventory} from "@/api/drug/drug"
475
+import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
422
 export default {
476
 export default {
423
     name: "drugInventory",
477
     name: "drugInventory",
424
     data() {
478
     data() {
456
                 batch_number:"",
510
                 batch_number:"",
457
                 product_date:"",
511
                 product_date:"",
458
                 expiry_date:"",
512
                 expiry_date:"",
513
+                warehouse_info_id:"",
514
+                proof_count:"",
459
             },
515
             },
460
             total: 0,
516
             total: 0,
461
             editdialogVisible:false,
517
             editdialogVisible:false,
471
             check_time:new Date(),
527
             check_time:new Date(),
472
             id:"",
528
             id:"",
473
             modifydialogVisible:false,
529
             modifydialogVisible:false,
530
+            numberList:[],
531
+            profdialogVisible:false,
474
         }
532
         }
475
     },
533
     },
476
     methods:{
534
     methods:{
535
+        changeNumber(val){
536
+          this.form.warehouse_info_id = val
537
+        },
477
         search(){
538
         search(){
478
-
539
+          this.getlist()
479
         },
540
         },
480
         print(){
541
         print(){
481
           if(this.ids == ""){
542
           if(this.ids == ""){
531
           })
592
           })
532
          },
593
          },
533
          handleSelect(val){
594
          handleSelect(val){
534
-            console.log("999999",val)
595
+           console.log("val233223232332",val)
596
+           this.getDrugBatchNumber(val.drug_id)
535
             var params = {
597
             var params = {
536
               id:val.drug_id
598
               id:val.drug_id
537
             }
599
             }
546
                    total += (list[i].stock_max_number+list[i].stock_min_number)
608
                    total += (list[i].stock_max_number+list[i].stock_min_number)
547
                 }
609
                 }
548
                 console.log("total",total)
610
                 console.log("total",total)
549
-               
550
-
551
                 console.log("库存",list)
611
                 console.log("库存",list)
552
                 this.form.id = val.id
612
                 this.form.id = val.id
553
                 this.form.drug_id = val.drug_id,
613
                 this.form.drug_id = val.drug_id,
558
                 this.form.dealer = val.dealer
618
                 this.form.dealer = val.dealer
559
                 this.form.manufacturer = val.manufacturer
619
                 this.form.manufacturer = val.manufacturer
560
                 this.form.remark = val.remark
620
                 this.form.remark = val.remark
561
-                this.form.warehousing_unit = val.warehouseing_unit  
621
+                this.form.warehousing_unit = val.max_unit  
562
                 this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
622
                 this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
563
                 this.form.batch_number = val.batch_number
623
                 this.form.batch_number = val.batch_number
564
                 this.form.last_price = val.last_price
624
                 this.form.last_price = val.last_price
565
                 this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
625
                 this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
566
                 this.form.expiry_date = val.expiry_date
626
                 this.form.expiry_date = val.expiry_date
567
                 this.form.product_date =val.product_date
627
                 this.form.product_date =val.product_date
628
+                this.form.drug_origin_place = val.drug_origin_place
568
              }
629
              }
569
            })
630
            })
570
         },
631
         },
617
             specification_name:this.form.specification_name,
678
             specification_name:this.form.specification_name,
618
             batch_number:this.form.batch_number,
679
             batch_number:this.form.batch_number,
619
             expiry_date:this.form.expiry_date,
680
             expiry_date:this.form.expiry_date,
620
-            product_date:this.form.product_date
681
+            product_date:this.form.product_date,
682
+            warehouse_info_id:this.form.warehouse_info_id,
621
          } 
683
          } 
622
-         this.tableData.push(obj)   
684
+         this.tableData.push(obj) 
685
+         this.form.drug_name = ""  
686
+         this.form.warehousing_unit = ""
687
+         this.form.count = ""
688
+         this.form.retail_price = ""
689
+         this.form.manufacturer = ""
690
+         this.form.drug_origin_place = ""
691
+         this.form.number = ""
692
+         this.form.remark = ""
693
+         this.form.new_price = ""
694
+         this.form.warehousing_order = ""
695
+         this.form.dealer = ""
696
+         this.form.last_price = ""
697
+         this.form.number = ""
698
+         this.form.total = ""
699
+         this.form.specification_name = ""
700
+         this.form.batch_number = ""
701
+         this.form.expiry_date = ""
702
+         this.form.product_date = ""
623
         },
703
         },
624
         toDelete(index){
704
         toDelete(index){
625
           this.tableData.splice(index,1)
705
           this.tableData.splice(index,1)
635
            this.form.dealer = val.dealer
715
            this.form.dealer = val.dealer
636
            this.form.manufacturer = val.manufacturer
716
            this.form.manufacturer = val.manufacturer
637
            this.form.remark = val.remark
717
            this.form.remark = val.remark
638
-           this.form.warehousing_unit = val.warehouseing_unit  
718
+           this.form.warehousing_unit = val.max_unit  
639
            this.form.total = val.total
719
            this.form.total = val.total
640
            this.form.batch_number = val.batch_number
720
            this.form.batch_number = val.batch_number
641
            this.form.last_price = val.last_price
721
            this.form.last_price = val.last_price
643
            this.form.expiry_date = val.expiry_date
723
            this.form.expiry_date = val.expiry_date
644
            this.form.product_date =val.product_date  
724
            this.form.product_date =val.product_date  
645
            this.form.count = val.count
725
            this.form.count = val.count
726
+          
646
            this.editdialogVisible = true
727
            this.editdialogVisible = true
647
         },
728
         },
648
         saveInventory(){
729
         saveInventory(){
703
             if(response.data.state == 1){
784
             if(response.data.state == 1){
704
               var msg = response.data.data.msg
785
               var msg = response.data.data.msg
705
               this.$message.success("保存成功")
786
               this.$message.success("保存成功")
787
+              this.getlist()
706
               this.editdialogVisible = false
788
               this.editdialogVisible = false
789
+              this.dialogVisible = false
707
             }
790
             }
708
           })
791
           })
709
         },
792
         },
767
            this.$message.success("保存成功")
850
            this.$message.success("保存成功")
768
            var msg = response.data.data.msg
851
            var msg = response.data.data.msg
769
            this.checkDialogVisible = false
852
            this.checkDialogVisible = false
853
+           this.tableData = []
770
            this.getlist()
854
            this.getlist()
771
          }
855
          }
772
        })
856
        })
790
             this.form.manufacturer = detail.manufacturer
874
             this.form.manufacturer = detail.manufacturer
791
             this.form.remark = detail.remark
875
             this.form.remark = detail.remark
792
             this.form.warehousing_unit = detail.warehousing_unit
876
             this.form.warehousing_unit = detail.warehousing_unit
793
-            this.form.total = parseInt(detail.total)
877
+            this.form.total = detail.total
794
         
878
         
795
             this.form.last_price = detail.last_price
879
             this.form.last_price = detail.last_price
796
           
880
           
866
        formatJson(filterVal, jsonData) {
950
        formatJson(filterVal, jsonData) {
867
         return jsonData.map(v => filterVal.map(j => v[j]));
951
         return jsonData.map(v => filterVal.map(j => v[j]));
868
       },
952
       },
953
+      getDrugBatchNumber(id){
954
+            var params = {
955
+              id:id
956
+            }
957
+          getDrugBatchNumber(params).then(response=>{
958
+            if(response.data.state == 1){
959
+              var list = response.data.data.list
960
+              console.log("list2222",list)
961
+              this.numberList = list
962
+            }
963
+          })
964
+       },
965
+       toProof(id){
966
+         getDrugInventoryDetail(id).then(response=>{
967
+          if(response.data.state == 1){
968
+            var detail = response.data.data.detail
969
+            console.log("detail22222222",detail)
970
+            this.id = detail.id
971
+            this.form.drug_id = detail.drug_id
972
+            this.form.drug_name = detail.drug_name
973
+            this.form.specification_name = detail.specification_name
974
+            this.form.retail_price = detail.retail_price
975
+            this.form.warehousing_order =detail.warehousing_order
976
+            this.form.number = detail.number
977
+            this.form.manufacturer = detail.manufacturer
978
+            this.form.remark = detail.remark
979
+            this.form.warehousing_unit = detail.warehousing_unit
980
+            this.form.total = detail.total
981
+            this.form.last_price = detail.last_price
982
+            this.form.count =  parseInt(detail.count)
983
+            this.form.drug_origin_place = detail.drug_origin_place
984
+            this.form.warehouse_info_id = detail.warehouse_info_id
985
+            this.profdialogVisible = true
986
+         }
987
+        })
988
+       },
989
+       proofInventory(){
990
+           var params = {
991
+             id:this.id,
992
+             warehouseing_unit:this.form.warehousing_unit,
993
+             warehouse_info_id:this.form.warehouse_info_id,
994
+             total:this.total.toString(),
995
+             remark:this.remark,
996
+             prof_count:parseInt(this.prof_count),
997
+           }
998
+          console.log("params",params)
999
+         SaveDrugProofInventory(params).then(response=>{
1000
+            if(response.data.state == 1){
1001
+              var inventory = response.data.data.inventory
1002
+              console.log("inventory",inventory)
1003
+              this.profdialogVisible = false
1004
+              this.getlist()
1005
+            }
1006
+         })
1007
+       },
1008
+       changeStartTime(val){
1009
+          this.start_time = this.getTime(val)
1010
+          this.getlist()
1011
+       },
1012
+       changeEndTime(val){
1013
+         this.end_time = this.getTime(val)
1014
+         this.getlist()
1015
+       }
869
     },
1016
     },
870
     created(){
1017
     created(){
871
       this.getlist()
1018
       this.getlist()

+ 1 - 0
src/xt_pages/stock/stockDamaged.vue 파일 보기

570
                 this.tableData[i].warehousing_info_id = this.numberList[j].id
570
                 this.tableData[i].warehousing_info_id = this.numberList[j].id
571
               }
571
               }
572
            }
572
            }
573
+          
573
          }
574
          }
574
           var params = {
575
           var params = {
575
             tableData:this.tableData,
576
             tableData:this.tableData,

+ 38 - 8
src/xt_pages/user/templateSummary.vue 파일 보기

303
                         :value="item.value">
303
                         :value="item.value">
304
                         </el-option>
304
                         </el-option>
305
                      </el-select>
305
                      </el-select>
306
-                     <el-input style="margin:10px 0;" type="textarea" autosize v-model="form.template_summary_content"></el-input>
306
+                     <keep-alive>
307
+                        <editor ref="edit_neditor"
308
+                                id="edit_editor1"
309
+                                style="width: 800px"
310
+                                v-bind:r_content="form.template_summary_content">
311
+                        </editor>
312
+                    </keep-alive>
313
+                     <!-- <el-input style="margin:10px 0;" type="textarea" autosize v-model="form.template_summary_content"></el-input> -->
307
                   </el-row>
314
                   </el-row>
308
                   <el-row>
315
                   <el-row>
309
                     <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
316
                     <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
315
                         :value="item.value">
322
                         :value="item.value">
316
                         </el-option>
323
                         </el-option>
317
                      </el-select>
324
                      </el-select>
318
-                     <el-input style="margin:10px 0;" type="textarea"  autosize v-model="form.template_plan_content"></el-input>
325
+                     <keep-alive>
326
+                        <editor ref="edit_neditorOne"
327
+                                id="edit_editor"
328
+                                style="width: 800px"
329
+                                v-bind:r_content="form.template_plan_content">
330
+                        </editor>
331
+                    </keep-alive>
332
+                     <!-- <el-input style="margin:10px 0;" type="textarea"  autosize v-model="form.template_plan_content"></el-input> -->
319
                   </el-row>
333
                   </el-row>
320
                   <el-row>
334
                   <el-row>
321
                     <label class="title"><span class="name">阶段小结化验结果</span> : </label>
335
                     <label class="title"><span class="name">阶段小结化验结果</span> : </label>
561
                         :value="item.value">
575
                         :value="item.value">
562
                         </el-option>
576
                         </el-option>
563
                      </el-select>
577
                      </el-select>
564
-                     <el-input style="margin:10px 0;" type="textarea" autosize v-model="form.template_summary_content"></el-input>
578
+                      <keep-alive>
579
+                        <editor ref="editor"
580
+                                id="edit_editor1"
581
+                                style="width: 800px"
582
+                                v-bind:r_content="form.template_summary_content">
583
+                        </editor>
584
+                    </keep-alive>
585
+                     <!-- <el-input style="margin:10px 0;" type="textarea" autosize v-model="form.template_summary_content"></el-input> -->
565
                   </el-row>
586
                   </el-row>
566
                   <el-row>
587
                   <el-row>
567
                     <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
588
                     <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
573
                         :value="item.value">
594
                         :value="item.value">
574
                         </el-option>
595
                         </el-option>
575
                      </el-select>
596
                      </el-select>
576
-                     <el-input style="margin:10px 0;" type="textarea" autosize v-model="form.template_plan_content"></el-input>
597
+                      <keep-alive>
598
+                        <editor ref="editorOne"
599
+                                id="edit_editor"
600
+                                style="width: 800px"
601
+                                v-bind:r_content="form.template_plan_content">
602
+                        </editor>
603
+                    </keep-alive>
604
+                     <!-- <el-input style="margin:10px 0;" type="textarea" autosize v-model="form.template_plan_content"></el-input> -->
577
                   </el-row>
605
                   </el-row>
578
                   <el-row>
606
                   <el-row>
579
                     <label class="title"><span class="name">阶段小结化验结果</span> : </label>
607
                     <label class="title"><span class="name">阶段小结化验结果</span> : </label>
850
           template_summary_id:"",
878
           template_summary_id:"",
851
           template_summary_content:"",
879
           template_summary_content:"",
852
           template_plan_id:"",
880
           template_plan_id:"",
853
-          template_summary_content:"",
854
           template_inspection_id:0,
881
           template_inspection_id:0,
855
           template_inspection_content:"",
882
           template_inspection_content:"",
856
           admin_user_id:this.$store.getters.xt_user.user.id,
883
           admin_user_id:this.$store.getters.xt_user.user.id,
1257
         console.log("年",year)
1284
         console.log("年",year)
1258
         var month = this.form.start_year+"-"+this.form.start_month+"-"+"01"
1285
         var month = this.form.start_year+"-"+this.form.start_month+"-"+"01"
1259
         console.log("月",month)
1286
         console.log("月",month)
1287
+        console.log("hhhhhh",this.$refs.edit_neditor.r_content)
1288
+        console.log("ooooo",this.$refs.edit_neditorOne.r_content)
1260
          var params = {
1289
          var params = {
1261
             title:this.form.title,
1290
             title:this.form.title,
1262
             dry_weight:this.form.dry_weight.toString(),
1291
             dry_weight:this.form.dry_weight.toString(),
1276
             befor_weight:this.form.befor_weight.toString(),
1305
             befor_weight:this.form.befor_weight.toString(),
1277
             after_weight:this.form.after_weight.toString(),
1306
             after_weight:this.form.after_weight.toString(),
1278
             befor_pressure:this.form.befor_pressure,
1307
             befor_pressure:this.form.befor_pressure,
1279
-            template_summary_content:this.form.template_summary_content,
1280
-            template_plan_content:this.form.template_plan_content,
1308
+            // template_plan_content:this.form.template_plan_content,
1309
+            template_plan_content:this.$refs.edit_neditor.r_content,
1281
             // template_inspection_content:JSON.stringify(this.form.template_inspection_content),
1310
             // template_inspection_content:JSON.stringify(this.form.template_inspection_content),
1282
             admin_user_id:this.form.admin_user_id,
1311
             admin_user_id:this.form.admin_user_id,
1283
             record_time:this.form.record_time,
1312
             record_time:this.form.record_time,
1284
             after_pressure:this.form.after_pressure,
1313
             after_pressure:this.form.after_pressure,
1285
             template_summary_id:this.form.template_summary_id,
1314
             template_summary_id:this.form.template_summary_id,
1286
-            template_summary_content:this.form.template_summary_content,
1315
+            // template_summary_content:this.form.template_summary_content,
1316
+            template_summary_content:this.$refs.edit_neditorOne.r_content,
1287
             template_plan_id:this.form.template_plan_id,
1317
             template_plan_id:this.form.template_plan_id,
1288
             template_inspection_id:this.form.template_inspection_id,
1318
             template_inspection_id:this.form.template_inspection_id,
1289
             patient_id:parseInt(this.patient_id),
1319
             patient_id:parseInt(this.patient_id),

+ 0 - 1
src/xt_pages/workforce/remind.vue 파일 보기

68
         console.log(tab, event);
68
         console.log(tab, event);
69
       },
69
       },
70
       changeActiveName(val){
70
       changeActiveName(val){
71
-        console.log("val------",val)
72
         this.activeName = val
71
         this.activeName = val
73
       }
72
       }
74
     },
73
     },

+ 17 - 10
src/xt_pages/workforce/remind_print_setting.vue 파일 보기

22
               <div class="signPrint">
22
               <div class="signPrint">
23
                 <div>分区/床位号:{{main_collection.zone.name}}/{{main_collection.number.number}}</div> 
23
                 <div>分区/床位号:{{main_collection.zone.name}}/{{main_collection.number.number}}</div> 
24
                 <div>姓名:{{main_collection.patient.name}}</div> 
24
                 <div>姓名:{{main_collection.patient.name}}</div> 
25
-                <div>抗凝剂: {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name + ' 5000iu/瓶' : ''}}</div> 
25
+                <div>抗凝剂: 
26
+                  <span v-if="org_id == 10138">{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name + ' 5000iu/瓶' : ''}}</span>
27
+                  <span v-else >{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name: ''}}</span>
28
+                </div> 
26
                 <div>用量:  
29
                 <div>用量:  
27
-                  <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
28
-                  <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
29
-                  <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
30
-                  <span v-if="main_collection.prescription.anticoagulant == 4">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
31
-                  <span v-if="main_collection.prescription.anticoagulant == 5">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
32
-                  <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
33
-                  <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
30
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'mg':''}}</span>
31
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 2">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
32
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 3">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
33
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 4">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'mg':''}}</span>
34
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 5">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'mg':''}}</span>
35
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 6">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
36
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 7">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
37
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 8">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
38
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 9">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
39
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 10">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
40
+                  <span v-if="main_collection.dialysissolution.anticoagulant == 11">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
34
                 </div> 
41
                 </div> 
35
                 <div>用法:静脉注射</div> 
42
                 <div>用法:静脉注射</div> 
36
                 <div>打印时间:{{currentDate}}</div>
43
                 <div>打印时间:{{currentDate}}</div>
104
               list[i].sort = list[i].number.sort
111
               list[i].sort = list[i].number.sort
105
            }
112
            }
106
            var arr = list.sort(this.compare('sort'))
113
            var arr = list.sort(this.compare('sort'))
107
-            
108
-             this.scheduleData = arr
114
+            console.log("Arr222222",arr)
115
+           this.scheduleData = arr
109
             
116
             
110
              let a = response.data.data.day
117
              let a = response.data.data.day
111
               console.log("a",a)
118
               console.log("a",a)