Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 3 years ago
parent
commit
d5e7c2704a

+ 2 - 2
src/views/layout/Layout.vue View File

19
 
19
 
20
        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
20
        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
21
          <i class="iconfont icon-kccx navIcon"></i>
21
          <i class="iconfont icon-kccx navIcon"></i>
22
-        <p>采购管理</p>
23
-       </div>
22
+         <p>采购管理</p>
23
+      </div>
24
 
24
 
25
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
25
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
26
           <i class="iconfont icon-kccx navIcon"></i>
26
           <i class="iconfont icon-kccx navIcon"></i>

+ 1 - 1
src/xt_pages/role/components/AdminRoleInfoForm.vue View File

43
       <el-form-item label="职位 : ">
43
       <el-form-item label="职位 : ">
44
         <el-input v-model="form.user_title_name" placeholder="输入职位"></el-input>
44
         <el-input v-model="form.user_title_name" placeholder="输入职位"></el-input>
45
       </el-form-item>
45
       </el-form-item>
46
-      
46
+
47
       <el-form-item label="介绍 : ">
47
       <el-form-item label="介绍 : ">
48
         <Tinymce :height="400" menubar ref="editor" v-model="form.intro" :show_upload_img="false"/>
48
         <Tinymce :height="400" menubar ref="editor" v-model="form.intro" :show_upload_img="false"/>
49
       </el-form-item>
49
       </el-form-item>

+ 38 - 38
src/xt_pages/stock/drugs/drugStockOutOrder.vue View File

60
         </div>
60
         </div>
61
       </div>
61
       </div>
62
 
62
 
63
-      
63
+
64
 
64
 
65
       <div class="cell clearfix">
65
       <div class="cell clearfix">
66
         <el-checkbox
66
         <el-checkbox
135
 
135
 
136
         <el-table-column label="操作" align="center" width="240">
136
         <el-table-column label="操作" align="center" width="240">
137
           <template slot-scope="scope">
137
           <template slot-scope="scope">
138
-           
139
-         
138
+
139
+
140
             <el-tooltip
140
             <el-tooltip
141
               class="item"
141
               class="item"
142
               effect="dark"
142
               effect="dark"
261
           </el-table-column>
261
           </el-table-column>
262
           <el-table-column label="批准文号" align="center">
262
           <el-table-column label="批准文号" align="center">
263
             <template slot-scope="scope">
263
             <template slot-scope="scope">
264
-             <span v-if="scope.row.number!=''">{{scope.row.number}}</span> 
264
+             <span v-if="scope.row.number!=''">{{scope.row.number}}</span>
265
              <span v-if="scope.row.number == '0'"></span>
265
              <span v-if="scope.row.number == '0'"></span>
266
             </template>
266
             </template>
267
           </el-table-column>
267
           </el-table-column>
323
               <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
323
               <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
324
             </template>
324
             </template>
325
           </el-table-column>
325
           </el-table-column>
326
-      
326
+
327
         </el-table>
327
         </el-table>
328
       </span>
328
       </span>
329
       <span slot="footer" class="dialog-footer">
329
       <span slot="footer" class="dialog-footer">
538
           for (let i = 0; i < response.data.data.list.length; i++) {
538
           for (let i = 0; i < response.data.data.list.length; i++) {
539
             this.warehouseOutDate.push(response.data.data.list[i]);
539
             this.warehouseOutDate.push(response.data.data.list[i]);
540
           }
540
           }
541
-         
541
+
542
         }
542
         }
543
       });
543
       });
544
     },
544
     },
627
     },
627
     },
628
 
628
 
629
     handleEdit: function(index, row) {
629
     handleEdit: function(index, row) {
630
-   
630
+
631
       this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys+"&supply_cancel_out_id="+row.supply_cancel_out_id})
631
       this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys+"&supply_cancel_out_id="+row.supply_cancel_out_id})
632
     },
632
     },
633
     handleSearch(val){
633
     handleSearch(val){
634
-      
634
+
635
        this.getInitializtion()
635
        this.getInitializtion()
636
        this.getSinleOrderDetail(val.id,val.warehouse_out_time,val.is_sys)
636
        this.getSinleOrderDetail(val.id,val.warehouse_out_time,val.is_sys)
637
        this.list = []
637
        this.list = []
688
       }
688
       }
689
     },
689
     },
690
     select(selection) {
690
     select(selection) {
691
-     
691
+
692
       var ids= []
692
       var ids= []
693
       for(let i=0;i<selection.length;i++){
693
       for(let i=0;i<selection.length;i++){
694
          ids.push(selection[i].id)
694
          ids.push(selection[i].id)
699
     },
699
     },
700
     batchDelete() {
700
     batchDelete() {
701
       console.log("232322323",this.selectedTableData)
701
       console.log("232322323",this.selectedTableData)
702
-      
702
+
703
       if (this.selectedTableData.length <= 0) {
703
       if (this.selectedTableData.length <= 0) {
704
         this.$message.error("请选择要删除的记录");
704
         this.$message.error("请选择要删除的记录");
705
         return;
705
         return;
718
       }
718
       }
719
       if(idsOne.length > 0){
719
       if(idsOne.length > 0){
720
         this.$message.error("采购出库数据不能删除!")
720
         this.$message.error("采购出库数据不能删除!")
721
-        return 
721
+        return
722
       }
722
       }
723
       const idStr = ids.join(",");
723
       const idStr = ids.join(",");
724
       const params = {
724
       const params = {
755
     },
755
     },
756
 
756
 
757
     jump(id){
757
     jump(id){
758
-    
758
+
759
       this.GetOrderDetailTwo(id)
759
       this.GetOrderDetailTwo(id)
760
       this.userList=[]
760
       this.userList=[]
761
       this.dialogVisibleTwo = true
761
       this.dialogVisibleTwo = true
779
               this.userList.push(obj)
779
               this.userList.push(obj)
780
               total = total + response.data.data.list[i].count
780
               total = total + response.data.data.list[i].count
781
             }
781
             }
782
-           
782
+
783
             this.userList.push({
783
             this.userList.push({
784
               is_total: 1,
784
               is_total: 1,
785
               total: total,
785
               total: total,
786
             })
786
             })
787
 
787
 
788
-            
788
+
789
           }
789
           }
790
         })
790
         })
791
       },
791
       },
845
            var list =   response.data.data.list
845
            var list =   response.data.data.list
846
            this.list = list
846
            this.list = list
847
            var drugConfig =  response.data.data.drugConfig
847
            var drugConfig =  response.data.data.drugConfig
848
-         
848
+
849
            this.drugConfig = drugConfig
849
            this.drugConfig = drugConfig
850
            var drugList = response.data.data.drugList
850
            var drugList = response.data.data.drugList
851
            this.drugList = drugList
851
            this.drugList = drugList
855
       })
855
       })
856
     },
856
     },
857
     getDrugCount(id){
857
     getDrugCount(id){
858
-      
859
-      var count = 0 
858
+
859
+      var count = 0
860
       for(let i=0;i<this.list.length;i++){
860
       for(let i=0;i<this.list.length;i++){
861
          if(this.list[i].drug_id == id){
861
          if(this.list[i].drug_id == id){
862
             count = this.list[i].Total
862
             count = this.list[i].Total
897
      for(let i=0;i<this.drugTypeList.length;i++){
897
      for(let i=0;i<this.drugTypeList.length;i++){
898
        if(id == this.drugTypeList[i].value){
898
        if(id == this.drugTypeList[i].value){
899
            name = this.drugTypeList[i].name
899
            name = this.drugTypeList[i].name
900
-       } 
900
+       }
901
      }
901
      }
902
      return name
902
      return name
903
    },
903
    },
924
          id:id,
924
          id:id,
925
          start_time:start_time,
925
          start_time:start_time,
926
        }
926
        }
927
-      console.log("is_sys22222",is_sys) 
927
+      console.log("is_sys22222",is_sys)
928
      getSinleOrderDetail(params).then(response=>{
928
      getSinleOrderDetail(params).then(response=>{
929
         if(response.data.state == 1){
929
         if(response.data.state == 1){
930
           this.tableShow = true
930
           this.tableShow = true
931
           this.tableList = []
931
           this.tableList = []
932
           var list =  response.data.data.list
932
           var list =  response.data.data.list
933
-         
933
+
934
          this.manufacturerList = response.data.data.manufacturerList
934
          this.manufacturerList = response.data.data.manufacturerList
935
          this.dealerList = response.data.data.dealerList
935
          this.dealerList = response.data.data.dealerList
936
          var drugFlowList = response.data.data.drugFlowList
936
          var drugFlowList = response.data.data.drugFlowList
940
                   drugFlowList[i].count = drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number
940
                   drugFlowList[i].count = drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number
941
               }
941
               }
942
               if(drugFlowList[i].count_unit == drugFlowList[i].XtBaseDrug.min_unit){
942
               if(drugFlowList[i].count_unit == drugFlowList[i].XtBaseDrug.min_unit){
943
-                  drugFlowList[i].count = drugFlowList[i].count 
943
+                  drugFlowList[i].count = drugFlowList[i].count
944
               }
944
               }
945
 
945
 
946
            }
946
            }
954
                   flowlist[i].count = flowlist[i].count * list[i].min_number
954
                   flowlist[i].count = flowlist[i].count * list[i].min_number
955
               }
955
               }
956
               if(flowlist[i].count_unit == flowlist[i].min_unit){
956
               if(flowlist[i].count_unit == flowlist[i].min_unit){
957
-                  flowlist[i].count = flowlist[i].count 
957
+                  flowlist[i].count = flowlist[i].count
958
               }
958
               }
959
             }
959
             }
960
             this.drugFlowList = flowlist
960
             this.drugFlowList = flowlist
985
     //  console.log("使用明细",params)
985
     //  console.log("使用明细",params)
986
      getAutoDrugDetail(params).then(response=>{
986
      getAutoDrugDetail(params).then(response=>{
987
        if(response.data.state == 1){
987
        if(response.data.state == 1){
988
-        
988
+
989
         this.userList = response.data.data.list
989
         this.userList = response.data.data.list
990
         console.log("自动出库数据",this.userList)
990
         console.log("自动出库数据",this.userList)
991
         if(val.is_sys == 1){
991
         if(val.is_sys == 1){
992
-        
992
+
993
           this.drugDialogVisible = true
993
           this.drugDialogVisible = true
994
         }
994
         }
995
         if(val.is_sys == 0){
995
         if(val.is_sys == 0){
996
-         
996
+
997
           this.drugDialogVisibleTwo = true
997
           this.drugDialogVisibleTwo = true
998
         }
998
         }
999
          var userListOne = response.data.data.outList
999
          var userListOne = response.data.data.outList
1019
           start_time:this.start_time,
1019
           start_time:this.start_time,
1020
           end_time:this.end_time,
1020
           end_time:this.end_time,
1021
          }
1021
          }
1022
-       
1022
+
1023
         getDrugCountList(params).then(response=>{
1023
         getDrugCountList(params).then(response=>{
1024
           if(response.data.state == 1){
1024
           if(response.data.state == 1){
1025
             var countlist =  response.data.data.countList
1025
             var countlist =  response.data.data.countList
1045
           }
1045
           }
1046
         })
1046
         })
1047
       },
1047
       },
1048
-    
1048
+
1049
       getCount(drug_id,min_number,max_unit,min_unit){
1049
       getCount(drug_id,min_number,max_unit,min_unit){
1050
         var count= 0
1050
         var count= 0
1051
         var str = ""
1051
         var str = ""
1082
               min_str =  total%min_number + min_unit
1082
               min_str =  total%min_number + min_unit
1083
             }
1083
             }
1084
          }
1084
          }
1085
-        
1085
+
1086
         if (total < min_number){
1086
         if (total < min_number){
1087
             str = ""
1087
             str = ""
1088
             min_str = total + min_unit
1088
             min_str = total + min_unit
1089
         }
1089
         }
1090
-       
1090
+
1091
          return str + min_str
1091
          return str + min_str
1092
       },
1092
       },
1093
       getTotalCountOne(id,min_number,max_unit,min_unit){
1093
       getTotalCountOne(id,min_number,max_unit,min_unit){
1112
             min_str =  total%min_number + min_unit
1112
             min_str =  total%min_number + min_unit
1113
           }
1113
           }
1114
         }
1114
         }
1115
-        return str + min_str 
1115
+        return str + min_str
1116
       },
1116
       },
1117
 
1117
 
1118
       getAllPrice(drug_id,price,min_price){
1118
       getAllPrice(drug_id,price,min_price){
1131
             }
1131
             }
1132
            }
1132
            }
1133
          }
1133
          }
1134
-         strprice = str * price 
1135
-         minstrprice = min_str * min_price 
1136
-       
1134
+         strprice = str * price
1135
+         minstrprice = min_str * min_price
1136
+
1137
          total_price = strprice + minstrprice
1137
          total_price = strprice + minstrprice
1138
          return  total_price
1138
          return  total_price
1139
       },
1139
       },
1149
         }
1149
         }
1150
         return arr.join(",")
1150
         return arr.join(",")
1151
       },
1151
       },
1152
-    
1152
+
1153
       getExportOutOrderDrugList(){
1153
       getExportOutOrderDrugList(){
1154
 
1154
 
1155
          var params = {
1155
          var params = {
1194
                 this.exportList[i].dealer = this.dealerList[z].dealer_name
1194
                 this.exportList[i].dealer = this.dealerList[z].dealer_name
1195
             }
1195
             }
1196
           }
1196
           }
1197
-         
1197
+
1198
         }
1198
         }
1199
-      
1199
+
1200
        import('@/vendor/Export2Excel').then(excel => {
1200
        import('@/vendor/Export2Excel').then(excel => {
1201
         for(let i=0;i<this.exportList.length;i++){
1201
         for(let i=0;i<this.exportList.length;i++){
1202
           for(let j=0;j<this.drugTypeList.length;j++){
1202
           for(let j=0;j<this.drugTypeList.length;j++){
1209
         const filterVal = ['drug_name','drug_type','unit','batch_number', 'count','price','retail_price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
1209
         const filterVal = ['drug_name','drug_type','unit','batch_number', 'count','price','retail_price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
1210
 
1210
 
1211
         // console.log("table",this.exportList)
1211
         // console.log("table",this.exportList)
1212
-         
1212
+
1213
         const data = this.formatJson(filterVal, this.exportList)
1213
         const data = this.formatJson(filterVal, this.exportList)
1214
         excel.export_json_to_excel({
1214
         excel.export_json_to_excel({
1215
           header: tHeader,
1215
           header: tHeader,
1231
           }
1231
           }
1232
         }
1232
         }
1233
         all_price = total * price
1233
         all_price = total * price
1234
-      
1234
+
1235
         return  all_price
1235
         return  all_price
1236
       },
1236
       },
1237
   }
1237
   }

+ 24 - 24
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue View File

130
                   </el-select>
130
                   </el-select>
131
                 </div>
131
                 </div>
132
               </el-form-item>
132
               </el-form-item>
133
-              
133
+
134
             </template>
134
             </template>
135
           </el-table-column>
135
           </el-table-column>
136
          <el-table-column width="120" align="center">
136
          <el-table-column width="120" align="center">
138
               <span>出货价<span style="color: red">*</span></span>
138
               <span>出货价<span style="color: red">*</span></span>
139
             </template>
139
             </template>
140
             <template slot-scope="scope">
140
             <template slot-scope="scope">
141
-            
141
+
142
               <el-form-item
142
               <el-form-item
143
                 :prop="'recordData.' + scope.$index + '.price'"
143
                 :prop="'recordData.' + scope.$index + '.price'"
144
                 :rules="tableRules.price"
144
                 :rules="tableRules.price"
380
         this.propForm.goods = [];
380
         this.propForm.goods = [];
381
 
381
 
382
         this.propForm.goodType = [];
382
         this.propForm.goodType = [];
383
-      }, 
383
+      },
384
       GetConfigInfo: function() {
384
       GetConfigInfo: function() {
385
         const loading = this.$loading({
385
         const loading = this.$loading({
386
           lock: true,
386
           lock: true,
419
         return name;
419
         return name;
420
       },
420
       },
421
       specificationName: function(drug_id) {
421
       specificationName: function(drug_id) {
422
-      
422
+
423
         let name = "";
423
         let name = "";
424
         for (let i = 0; i < this.goodInfo.length; i++) {
424
         for (let i = 0; i < this.goodInfo.length; i++) {
425
           if (this.goodInfo[i].id == drug_id) {
425
           if (this.goodInfo[i].id == drug_id) {
432
         if(row.supply_cancel_out_id >0){
432
         if(row.supply_cancel_out_id >0){
433
          this.$message.error("采购出库数据不能新增!")
433
          this.$message.error("采购出库数据不能新增!")
434
          return
434
          return
435
-        } 
435
+        }
436
         this.unitShow = false
436
         this.unitShow = false
437
         if(this.drug_show == true){
437
         if(this.drug_show == true){
438
           this.$message.error("自动出库数据不能编辑")
438
           this.$message.error("自动出库数据不能编辑")
458
          this.$message.error("采购出库数据不能删除!")
458
          this.$message.error("采购出库数据不能删除!")
459
          return
459
          return
460
         }
460
         }
461
-       
461
+
462
         if(this.drug_show == true){
462
         if(this.drug_show == true){
463
           this.$message.error("采购出库数据不能编辑")
463
           this.$message.error("采购出库数据不能编辑")
464
           return
464
           return
487
           }).catch(() => {
487
           }).catch(() => {
488
           })
488
           })
489
         }
489
         }
490
-      }, 
490
+      },
491
       // getTime(val, temp) {
491
       // getTime(val, temp) {
492
       //   if (val != 0) {
492
       //   if (val != 0) {
493
       //     return uParseTime(val, temp)
493
       //     return uParseTime(val, temp)
555
 
555
 
556
       back() {
556
       back() {
557
         this.$router.go(-1)
557
         this.$router.go(-1)
558
-      }, 
558
+      },
559
       submit() {
559
       submit() {
560
         this.$refs['tableForm'].validate((valid) => {
560
         this.$refs['tableForm'].validate((valid) => {
561
           if (valid) {
561
           if (valid) {
581
                     this.recordInfo.recordData[i].dealer = this.dealerList[z].id
581
                     this.recordInfo.recordData[i].dealer = this.dealerList[z].id
582
                  }
582
                  }
583
                }
583
                }
584
-               
584
+
585
                for(let y=0;y<this.numberList.length;y++){
585
                for(let y=0;y<this.numberList.length;y++){
586
                   if(this.recordInfo.recordData[i].batch_number == this.numberList[y].id){
586
                   if(this.recordInfo.recordData[i].batch_number == this.numberList[y].id){
587
                      this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number
587
                      this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number
603
               'stockOut': this.recordInfo.recordData
603
               'stockOut': this.recordInfo.recordData
604
             }
604
             }
605
             console.log("param23322323233222323",params)
605
             console.log("param23322323233222323",params)
606
-           
606
+
607
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
607
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
608
               if (response.data.state == 0) {
608
               if (response.data.state == 0) {
609
                 this.$message.error(response.data.msg)
609
                 this.$message.error(response.data.msg)
618
                 var min_unit =  response.data.data.min_unit
618
                 var min_unit =  response.data.data.min_unit
619
                 var max_unit =  response.data.data.max_unit
619
                 var max_unit =  response.data.data.max_unit
620
                 var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
620
                 var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
621
-               loading.close()  
621
+               loading.close()
622
               if(msg == 1){
622
               if(msg == 1){
623
                 this.$message.error(str + "库存不足,请入库")
623
                 this.$message.error(str + "库存不足,请入库")
624
                 loading.close()
624
                 loading.close()
634
             return false
634
             return false
635
           }
635
           }
636
         })
636
         })
637
-      }, 
637
+      },
638
       GetOrderDetail: function(order_id) {
638
       GetOrderDetail: function(order_id) {
639
         const params = {
639
         const params = {
640
           'id': order_id
640
           'id': order_id
644
             this.$message.error(response.data.msg)
644
             this.$message.error(response.data.msg)
645
             return false
645
             return false
646
           } else {
646
           } else {
647
-            
647
+
648
 
648
 
649
             var manulist = response.data.data.manulist
649
             var manulist = response.data.data.manulist
650
             this.manufacturerList = manulist
650
             this.manufacturerList = manulist
658
               }else{
658
               }else{
659
                 response.data.data.list[i].number = response.data.data.list[i].number
659
                 response.data.data.list[i].number = response.data.data.list[i].number
660
               }
660
               }
661
-              
661
+
662
               if(response.data.data.list[i].manufacturer == "0" || response.data.data.list[i].manufacturer == 0){
662
               if(response.data.data.list[i].manufacturer == "0" || response.data.data.list[i].manufacturer == 0){
663
                 response.data.data.list[i].manufacturer = ""
663
                 response.data.data.list[i].manufacturer = ""
664
               }else{
664
               }else{
665
                 response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
665
                 response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
666
               }
666
               }
667
-              
667
+
668
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
668
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
669
               response.data.data.list[i].retail_price = response.data.data.list[i].price.toString()
669
               response.data.data.list[i].retail_price = response.data.data.list[i].price.toString()
670
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
670
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
673
               }else{
673
               }else{
674
                 response.data.data.list[i].dealer = response.data.data.list[i].dealer
674
                 response.data.data.list[i].dealer = response.data.data.list[i].dealer
675
               }
675
               }
676
-             
676
+
677
               response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{h}-{d}")
677
               response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{h}-{d}")
678
               response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{h}-{d}")
678
               response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{h}-{d}")
679
               this.recordInfo.recordData.push(response.data.data.list[i])
679
               this.recordInfo.recordData.push(response.data.data.list[i])
693
 
693
 
694
             this.warehouseOut = response.data.data.info
694
             this.warehouseOut = response.data.data.info
695
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
695
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
696
-          
696
+
697
 
697
 
698
           }
698
           }
699
 
699
 
729
         postSearchDrugList(key).then(response => {
729
         postSearchDrugList(key).then(response => {
730
           if (response.data.state == 1) {
730
           if (response.data.state == 1) {
731
             searchArray = response.data.data.list;
731
             searchArray = response.data.data.list;
732
-            
732
+
733
              var list = response.data.data.list
733
              var list = response.data.data.list
734
-            
734
+
735
 
735
 
736
              this.drugList = list
736
              this.drugList = list
737
              var manufacturerList = response.data.data.manufacturerList
737
              var manufacturerList = response.data.data.manufacturerList
738
              this.manufacturerList = manufacturerList
738
              this.manufacturerList = manufacturerList
739
              for(let i=0;i<this.drugList.length;i++){
739
              for(let i=0;i<this.drugList.length;i++){
740
-             
740
+
741
                 for(let j=0;j<this.manufacturerList.length;j++){
741
                 for(let j=0;j<this.manufacturerList.length;j++){
742
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
742
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
743
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
743
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
744
                   }
744
                   }
745
                 }
745
                 }
746
              }
746
              }
747
-           
747
+
748
              cb(this.drugList)
748
              cb(this.drugList)
749
           } else {
749
           } else {
750
             cb([])
750
             cb([])
784
              }
784
              }
785
            }
785
            }
786
         }
786
         }
787
- 
787
+
788
       },
788
       },
789
       getDictionaryDataConfig(module, filed_name) {
789
       getDictionaryDataConfig(module, filed_name) {
790
         return getDictionaryDataConfig(module, filed_name)
790
         return getDictionaryDataConfig(module, filed_name)
799
         getDrugBatchNumber(params).then(response=>{
799
         getDrugBatchNumber(params).then(response=>{
800
            if(response.data.state == 1){
800
            if(response.data.state == 1){
801
              var list = response.data.data.list
801
              var list = response.data.data.list
802
-           
802
+
803
              this.numberList = list
803
              this.numberList = list
804
            }
804
            }
805
         })
805
         })
806
       }
806
       }
807
     },
807
     },
808
     created() {
808
     created() {
809
-      this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
809
+      this.drugTypeList = getDictionaryDataConfig('system','drug_type')
810
       this.GetConfigInfo()
810
       this.GetConfigInfo()
811
       this.propForm.goodUnit = this.$store.getters.good_unit
811
       this.propForm.goodUnit = this.$store.getters.good_unit
812
       const order_id = this.$route.query.id
812
       const order_id = this.$route.query.id

+ 54 - 22
src/xt_pages/supply/components/addGoodOrder.vue View File

16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
             :disabled="disabled"
21
             :disabled="disabled"
22
           >
22
           >
76
           <el-button size="small" type="primary" @click="checkGoodOrder" v-if="is_check == 2" >审核</el-button>
76
           <el-button size="small" type="primary" @click="checkGoodOrder" v-if="is_check == 2" >审核</el-button>
77
           <el-button size="small" type="primary" @click="MofyGoodOrder" v-if="is_check == 1">反审核</el-button>
77
           <el-button size="small" type="primary" @click="MofyGoodOrder" v-if="is_check == 1">反审核</el-button>
78
           <el-button size="small" type="primary" @click="toClick" v-if="is_check == 1" >生成采购退货单</el-button>
78
           <el-button size="small" type="primary" @click="toClick" v-if="is_check == 1" >生成采购退货单</el-button>
79
-          <el-button size="small" type="primary" @click="toPrint" v-show="showSix" >打印</el-button>
80
         </div>
79
         </div>
81
       </div>
80
       </div>
82
 
81
 
396
           >
395
           >
397
           </el-input>
396
           </el-input>
398
         </div>
397
         </div>
398
+         <!-- 审核水印 -->
399
+        <img
400
+          src="@/assets/purchase/Reviewed.png"
401
+          alt="正在加载..."
402
+          class="reviewImg"
403
+          v-show="Reviewed == true"
404
+        />
399
       </el-form>
405
       </el-form>
400
       <div>
406
       <div>
401
         <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
407
         <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
484
   },
490
   },
485
   data() {
491
   data() {
486
     return {
492
     return {
493
+      Reviewed: false,
487
       crumbs: [
494
       crumbs: [
488
         { path: false, name: "采购单" },
495
         { path: false, name: "采购单" },
489
         { path: "/supply/good/order/query", name: "新增采购单" },
496
         { path: "/supply/good/order/query", name: "新增采购单" },
554
       warese_out_id: 0,
561
       warese_out_id: 0,
555
       return_remark: "",
562
       return_remark: "",
556
       is_warehouse:0,
563
       is_warehouse:0,
557
-      tableDataList:[],
558
-      showSix:false,
564
+      tableDataList:[]
559
     };
565
     };
560
   },
566
   },
561
    watch: {
567
    watch: {
562
     total_price: function (newval, oldval) {
568
     total_price: function (newval, oldval) {
563
       if(this.rate_of_concession != ""){
569
       if(this.rate_of_concession != ""){
564
         this.addressChange()
570
         this.addressChange()
571
+        this.count_payment()
565
       }
572
       }
566
     }
573
     }
567
   },
574
   },
706
           this.recordInfo.tableList[i].supply_type = val.supply_type;
713
           this.recordInfo.tableList[i].supply_type = val.supply_type;
707
           this.recordInfo.tableList[i].supply_specification_name = val.supply_specification_name;
714
           this.recordInfo.tableList[i].supply_specification_name = val.supply_specification_name;
708
           this.recordInfo.tableList[i].supply_total = val.supply_total;
715
           this.recordInfo.tableList[i].supply_total = val.supply_total;
709
-          this.recordInfo.tableList[i].min_price = val.min_price  
716
+          this.recordInfo.tableList[i].min_price = val.min_price
710
           if (val.supply_count == NaN) {
717
           if (val.supply_count == NaN) {
711
             this.recordInfo.tableList[i].supply_count = "";
718
             this.recordInfo.tableList[i].supply_count = "";
712
           } else {
719
           } else {
792
           min_str = (total % min_number) + min_unit;
799
           min_str = (total % min_number) + min_unit;
793
         }
800
         }
794
       }
801
       }
795
-     
802
+
796
       return max_str + min_str;
803
       return max_str + min_str;
797
-    
804
+
798
     },
805
     },
799
     getTotalStockCount(arr) {
806
     getTotalStockCount(arr) {
800
       var total_count = 0;
807
       var total_count = 0;
806
       }else{
813
       }else{
807
         return ""
814
         return ""
808
       }
815
       }
809
-     
816
+
810
     },
817
     },
811
 
818
 
812
     calculate: function (val) {
819
     calculate: function (val) {
845
         ).toFixed(2);
852
         ).toFixed(2);
846
       }
853
       }
847
       this.discount_amount = discount_amount;
854
       this.discount_amount = discount_amount;
848
-     
855
+      if(this.payment > 0) this.count_payment()
856
+
849
     },
857
     },
850
     count_discount() {
858
     count_discount() {
851
       this.rate_of_concession = (
859
       this.rate_of_concession = (
852
         this.discount_amount /
860
         this.discount_amount /
853
         (this.total_price * 0.01)
861
         (this.total_price * 0.01)
854
       ).toFixed(2);
862
       ).toFixed(2);
863
+      if(this.payment > 0) this.count_payment()
855
     },
864
     },
856
     count_payment() {
865
     count_payment() {
857
       let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
866
       let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
947
           this.tableDataList = []
956
           this.tableDataList = []
948
           this.tableDataList = orderInfo
957
           this.tableDataList = orderInfo
949
           console.log("changed23323232233232",this.tableDataList)
958
           console.log("changed23323232233232",this.tableDataList)
950
-         
959
+
951
         }
960
         }
952
       });
961
       });
953
     },
962
     },
1003
               this.number = ""
1012
               this.number = ""
1004
              }
1013
              }
1005
           }
1014
           }
1006
-          
1015
+
1007
           var params = {
1016
           var params = {
1008
             stockIn: this.recordInfo.tableList,
1017
             stockIn: this.recordInfo.tableList,
1009
             return_remake: this.return_remark,
1018
             return_remake: this.return_remark,
1015
               this.$message.success("保存成功!");
1024
               this.$message.success("保存成功!");
1016
               this.showOne = false;
1025
               this.showOne = false;
1017
               this.showTwo = true;
1026
               this.showTwo = true;
1018
-              this.showSix = true
1019
               var orderInfo = response.data.data.list;
1027
               var orderInfo = response.data.data.list;
1020
               var warehouseOut = response.data.data.warehouseOut;
1028
               var warehouseOut = response.data.data.warehouseOut;
1021
               this.is_check = 2
1029
               this.is_check = 2
1153
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1161
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1154
         if (response.data.state == 1) {
1162
         if (response.data.state == 1) {
1155
           this.$message.success("审核成功!");
1163
           this.$message.success("审核成功!");
1164
+          this.Reviewed = true;
1156
           this.disabled = true
1165
           this.disabled = true
1157
           this.is_check = 1
1166
           this.is_check = 1
1158
           this.showOne = false;
1167
           this.showOne = false;
1162
           var purcaseOrder = response.data.data.purcaseOrder;
1171
           var purcaseOrder = response.data.data.purcaseOrder;
1163
           var goodOrder = response.data.data.goodOrder;
1172
           var goodOrder = response.data.data.goodOrder;
1164
           var drugList = response.data.data.drugList;
1173
           var drugList = response.data.data.drugList;
1165
-     
1174
+
1166
           var is_warehouse = 0;
1175
           var is_warehouse = 0;
1167
           for (let i = 0; i < purcaseOrder.length; i++) {
1176
           for (let i = 0; i < purcaseOrder.length; i++) {
1168
             for (let j = 0; j < drugList.length; j++) {
1177
             for (let j = 0; j < drugList.length; j++) {
1277
             this.is_check = 2
1286
             this.is_check = 2
1278
             this.disabled = false
1287
             this.disabled = false
1279
             this.Reviewed = false
1288
             this.Reviewed = false
1280
-           
1289
+
1281
           }
1290
           }
1282
           if (msg == 2) {
1291
           if (msg == 2) {
1283
             var cancelList = response.data.data.cancelList
1292
             var cancelList = response.data.data.cancelList
1365
                   }
1374
                   }
1366
                 }
1375
                 }
1367
               }
1376
               }
1368
-            
1377
+
1369
               console.log("arr233232233232",arr)
1378
               console.log("arr233232233232",arr)
1370
              if (arr.length == 0) {
1379
              if (arr.length == 0) {
1371
                 //未入库
1380
                 //未入库
1372
                 var is_warehouse = 2;
1381
                 var is_warehouse = 2;
1373
                 this.ModefySupplyWarehousing(is_warehouse, this.id);
1382
                 this.ModefySupplyWarehousing(is_warehouse, this.id);
1374
-                
1383
+
1375
               }
1384
               }
1376
               if (arr.length > 0) {
1385
               if (arr.length > 0) {
1377
                 //部分入库
1386
                 //部分入库
1442
                }
1451
                }
1443
             }
1452
             }
1444
 
1453
 
1445
-          
1454
+
1446
 
1455
 
1447
             let objInfo = {};
1456
             let objInfo = {};
1448
             if(cancelOrderList.length >0){
1457
             if(cancelOrderList.length >0){
1457
                 }
1466
                 }
1458
               });
1467
               });
1459
               let newArr = Object.values(objInfo)
1468
               let newArr = Object.values(objInfo)
1460
-            
1469
+
1461
               for (let i = 0; i < cancelOrderList.length; i++) {
1470
               for (let i = 0; i < cancelOrderList.length; i++) {
1462
                 for (let j = 0; j < newArr.length; j++) {
1471
                 for (let j = 0; j < newArr.length; j++) {
1463
                   if (cancelOrderList[i].project_id == newArr[j].project_id) {
1472
                   if (cancelOrderList[i].project_id == newArr[j].project_id) {
1545
 </script>
1554
 </script>
1546
 
1555
 
1547
 <style rel="stylesheet/css" lang="scss" scoped>
1556
 <style rel="stylesheet/css" lang="scss" scoped>
1557
+.reviewImg {
1558
+  position: fixed;
1559
+  left: 50%;
1560
+  transform: translateX(-50%);
1561
+  top: 30%;
1562
+}
1563
+
1564
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1565
+  overflow: auto;
1566
+}
1567
+/deep/ .gutter {
1568
+  width: 15px !important;
1569
+  display: inline-block !important;
1570
+}
1571
+/deep/ .el-table__fixed-right-patch {
1572
+  width: 15px !important;
1573
+}
1574
+
1575
+/deep/ .el-table__fixed-right {
1576
+  bottom: 0 !important;
1577
+  left: auto;
1578
+  right: 0;
1579
+}
1548
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1580
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1549
-  width: 10px;
1550
-  height: 10px;
1581
+  width: 15px !important;
1582
+  height: 15px !important;
1551
 }
1583
 }
1552
 .information {
1584
 .information {
1553
   border: 1px #dcdfe6 solid;
1585
   border: 1px #dcdfe6 solid;
1598
 .el-table::before {
1630
 .el-table::before {
1599
   background-color: #d0d3da;
1631
   background-color: #d0d3da;
1600
 }
1632
 }
1601
-.el-table__fixed-right {
1633
+/* .el-table__fixed-right {
1602
   width: 150px;
1634
   width: 150px;
1603
   bottom: 20px;
1635
   bottom: 20px;
1604
   height: 100%;
1636
   height: 100%;
1605
-}
1637
+} */
1606
 
1638
 
1607
 </style>
1639
 </style>

+ 59 - 34
src/xt_pages/supply/components/addGoodReturn.vue View File

16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
             :disabled="disabled"
21
             :disabled="disabled"
22
           >
22
           >
42
             value-format="yyyy-MM-dd"
42
             value-format="yyyy-MM-dd"
43
             :disabled="disabled"
43
             :disabled="disabled"
44
           ></el-date-picker>
44
           ></el-date-picker>
45
-         
45
+
46
           <span>单据编码:{{ number }}</span>
46
           <span>单据编码:{{ number }}</span>
47
         </div>
47
         </div>
48
         <div>
48
         <div>
68
             >打印</el-button
68
             >打印</el-button
69
           >
69
           >
70
           <el-button size="small" type="primary" v-if="is_check == 2" @click="checkReturnOrder">审核</el-button>
70
           <el-button size="small" type="primary" v-if="is_check == 2" @click="checkReturnOrder">审核</el-button>
71
-          <el-button size="small" type="primary" v-if="is_check == 1" @click="modefyReturnOrder">反审核</el-button> 
71
+          <el-button size="small" type="primary" v-if="is_check == 1" @click="modefyReturnOrder">反审核</el-button>
72
         </div>
72
         </div>
73
       </div>
73
       </div>
74
 
74
 
398
         ></span>
398
         ></span>
399
       </div>
399
       </div>
400
     </div>
400
     </div>
401
-    
401
+
402
   </div>
402
   </div>
403
 </template>
403
 </template>
404
 
404
 
616
             for (let j = 0; j < goodList[i].unitList.length; j++) {
616
             for (let j = 0; j < goodList[i].unitList.length; j++) {
617
               goodList[i].unitList[0].name = goodList[i].packing_unit;
617
               goodList[i].unitList[0].name = goodList[i].packing_unit;
618
             }
618
             }
619
-        
619
+
620
             goodList[i].sum_count = this.getTotalStockCountTwo(
620
             goodList[i].sum_count = this.getTotalStockCountTwo(
621
               goodList[i].good_warehouse_info
621
               goodList[i].good_warehouse_info
622
             );
622
             );
727
           total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
727
           total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
728
         }
728
         }
729
       }
729
       }
730
-    
730
+
731
       if (total < min_number) {
731
       if (total < min_number) {
732
         min_str = total + min_unit;
732
         min_str = total + min_unit;
733
       }
733
       }
765
       }else{
765
       }else{
766
         return ""
766
         return ""
767
       }
767
       }
768
-      
768
+
769
     },
769
     },
770
     getTotalStockCountTwo(arr) {
770
     getTotalStockCountTwo(arr) {
771
       var total_count = 0;
771
       var total_count = 0;
773
         total_count += arr[i].stock_count;
773
         total_count += arr[i].stock_count;
774
       }
774
       }
775
       return total_count
775
       return total_count
776
-    
776
+
777
     },
777
     },
778
     calculate: function (val) {
778
     calculate: function (val) {
779
       if (isNaN(val)) {
779
       if (isNaN(val)) {
802
       }else{
802
       }else{
803
         return ""
803
         return ""
804
       }
804
       }
805
-     
805
+
806
     },
806
     },
807
     addressChange() {
807
     addressChange() {
808
       var discount_amount = 0;
808
       var discount_amount = 0;
813
         ).toFixed(2);
813
         ).toFixed(2);
814
       }
814
       }
815
       this.discount_amount = discount_amount;
815
       this.discount_amount = discount_amount;
816
-     
816
+
817
     },
817
     },
818
     count_discount() {
818
     count_discount() {
819
       this.rate_of_concession = (
819
       this.rate_of_concession = (
860
           this.supplier_name = out.supplier_id;
860
           this.supplier_name = out.supplier_id;
861
           this.rate_of_concession = out.rate_of_concession;
861
           this.rate_of_concession = out.rate_of_concession;
862
           this.discount_amount = out.discount_amount;
862
           this.discount_amount = out.discount_amount;
863
-      
863
+
864
           this.start_time = this.getTimes(out.document_date);
864
           this.start_time = this.getTimes(out.document_date);
865
           var orderInfo = response.data.data.list;
865
           var orderInfo = response.data.data.list;
866
           console.log("orderINFO233232232332", orderInfo);
866
           console.log("orderINFO233232232332", orderInfo);
883
             }
883
             }
884
             orderInfo[i].id = orderInfo[i].id;
884
             orderInfo[i].id = orderInfo[i].id;
885
             orderInfo[i].supply_count = orderInfo[i].supply_count;
885
             orderInfo[i].supply_count = orderInfo[i].supply_count;
886
-            
886
+
887
             orderInfo[i].supply_price = orderInfo[i].price;
887
             orderInfo[i].supply_price = orderInfo[i].price;
888
             orderInfo[i].supply_remake = orderInfo[i].remark;
888
             orderInfo[i].supply_remake = orderInfo[i].remark;
889
             orderInfo[i].type = orderInfo[i].is_source;
889
             orderInfo[i].type = orderInfo[i].is_source;
898
             orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
898
             orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
899
             orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
899
             orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
900
             orderInfo[i].deposit_rate = ""
900
             orderInfo[i].deposit_rate = ""
901
-           
901
+
902
             if (orderInfo[i].is_source == 1) {
902
             if (orderInfo[i].is_source == 1) {
903
               for (let j = 0; j < drugList.length; j++) {
903
               for (let j = 0; j < drugList.length; j++) {
904
                 if (orderInfo[i].project_id == drugList[j].id) {
904
                 if (orderInfo[i].project_id == drugList[j].id) {
925
                   orderInfo[i].max_unit =drugList[j].max_unit
925
                   orderInfo[i].max_unit =drugList[j].max_unit
926
                   orderInfo[i].min_unit =drugList[j].min_unit
926
                   orderInfo[i].min_unit =drugList[j].min_unit
927
                 }
927
                 }
928
-               
928
+
929
               }
929
               }
930
               orderInfo[i].count = orderInfo[i].count + orderInfo[i].supply_unit
930
               orderInfo[i].count = orderInfo[i].count + orderInfo[i].supply_unit
931
             }
931
             }
962
       var warehouse_out_id = this.$route.query.id
962
       var warehouse_out_id = this.$route.query.id
963
       this.$refs["tableForm"].validate((valid)=>{
963
       this.$refs["tableForm"].validate((valid)=>{
964
         if(valid){
964
         if(valid){
965
-        
966
-        
965
+
966
+
967
           for(let i=0;i<this.recordInfo.tableList.length;i++){
967
           for(let i=0;i<this.recordInfo.tableList.length;i++){
968
             if(this.recordInfo.tableList[i].count == ""){
968
             if(this.recordInfo.tableList[i].count == ""){
969
               this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
969
               this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
990
               }
990
               }
991
 
991
 
992
             }
992
             }
993
-          } 
993
+          }
994
            //判断是否在采购单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
994
            //判断是否在采购单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
995
            if(this.recordInfo.tableList.length < this.tableDataList.length){
995
            if(this.recordInfo.tableList.length < this.tableDataList.length){
996
              warehouse_out_id = 0
996
              warehouse_out_id = 0
1008
             return_marke:this.return_remark,
1008
             return_marke:this.return_remark,
1009
            }
1009
            }
1010
            console.log("2323323232",params)
1010
            console.log("2323323232",params)
1011
-          
1011
+
1012
            saveGoodReturnOrder(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name).then(response=>{
1012
            saveGoodReturnOrder(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name).then(response=>{
1013
              if(response.data.state == 1){
1013
              if(response.data.state == 1){
1014
                 this.loading = false
1014
                 this.loading = false
1037
                 }else{
1037
                 }else{
1038
                   this.payment = out.payment
1038
                   this.payment = out.payment
1039
                 }
1039
                 }
1040
-               
1040
+
1041
                 if(out.arrearage == 0){
1041
                 if(out.arrearage == 0){
1042
                    this.arrearage = ""
1042
                    this.arrearage = ""
1043
                 }else{
1043
                 }else{
1044
                   this.arrearage = out.arrearage
1044
                   this.arrearage = out.arrearage
1045
                 }
1045
                 }
1046
-               
1046
+
1047
                 this.start_time = this.getTimes(out.document_date)
1047
                 this.start_time = this.getTimes(out.document_date)
1048
                 var orderInfo = response.data.data.list
1048
                 var orderInfo = response.data.data.list
1049
-                
1049
+
1050
                 for(let i=0;i< orderInfo.length;i++){
1050
                 for(let i=0;i< orderInfo.length;i++){
1051
                   orderInfo[i].name = orderInfo[i].name
1051
                   orderInfo[i].name = orderInfo[i].name
1052
                   orderInfo[i].id = orderInfo[i].id
1052
                   orderInfo[i].id = orderInfo[i].id
1079
                             orderInfo[i].unitList[0].name = this.drugList[j].max_unit
1079
                             orderInfo[i].unitList[0].name = this.drugList[j].max_unit
1080
                            }
1080
                            }
1081
 
1081
 
1082
-                          
1082
+
1083
 
1083
 
1084
                         }
1084
                         }
1085
                      }
1085
                      }
1098
                 this.recordInfo.tableList = orderInfo
1098
                 this.recordInfo.tableList = orderInfo
1099
              }
1099
              }
1100
            })
1100
            })
1101
-          
1101
+
1102
         }
1102
         }
1103
       })
1103
       })
1104
     },
1104
     },
1112
       var warehouse_out_id = this.id;
1112
       var warehouse_out_id = this.id;
1113
       this.$refs["tableForm"].validate((valid)=>{
1113
       this.$refs["tableForm"].validate((valid)=>{
1114
         if(valid){
1114
         if(valid){
1115
-         
1116
-        
1115
+
1116
+
1117
           for(let i=0;i<this.recordInfo.tableList.length;i++){
1117
           for(let i=0;i<this.recordInfo.tableList.length;i++){
1118
             if(this.recordInfo.tableList[i].count == ""){
1118
             if(this.recordInfo.tableList[i].count == ""){
1119
               this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
1119
               this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
1160
      console.log("审核2322323232323",params)
1160
      console.log("审核2322323232323",params)
1161
      checkReturnOrder(params).then(response=>{
1161
      checkReturnOrder(params).then(response=>{
1162
        if(response.data.state == 1){
1162
        if(response.data.state == 1){
1163
-      
1163
+
1164
         var msg = response.data.data.msg
1164
         var msg = response.data.data.msg
1165
         if(msg == 1){
1165
         if(msg == 1){
1166
           this.loading = false
1166
           this.loading = false
1188
               var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
1188
               var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
1189
               this.$message.error(str + "库存不足,审核失败!")
1189
               this.$message.error(str + "库存不足,审核失败!")
1190
           }
1190
           }
1191
-       
1191
+
1192
        }
1192
        }
1193
      })
1193
      })
1194
     },
1194
     },
1212
     getSupplyCount(supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit,index){
1212
     getSupplyCount(supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit,index){
1213
      console.log("val23322323",supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit)
1213
      console.log("val23322323",supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit)
1214
       var total_count = 0
1214
       var total_count = 0
1215
-      
1215
+
1216
       if(type == 1){
1216
       if(type == 1){
1217
        if(supply_unit == max_unit){
1217
        if(supply_unit == max_unit){
1218
           total_count = supply_count * min_number
1218
           total_count = supply_count * min_number
1237
           }
1237
           }
1238
          }
1238
          }
1239
       }
1239
       }
1240
-       
1240
+
1241
       if(type == 2){
1241
       if(type == 2){
1242
          if(supply_count > sum_count){
1242
          if(supply_count > sum_count){
1243
           this.$message.error("数量不能大于可退数量!")
1243
           this.$message.error("数量不能大于可退数量!")
1254
           }
1254
           }
1255
          }
1255
          }
1256
       }
1256
       }
1257
-    
1257
+
1258
     },
1258
     },
1259
     toPrint() {
1259
     toPrint() {
1260
       this.$router.push({ path: "/good/return/print?&id=" + this.id });
1260
       this.$router.push({ path: "/good/return/print?&id=" + this.id });
1293
     tempObj["max_unit"] = ""
1293
     tempObj["max_unit"] = ""
1294
     tempObj["min_unit"] = ""
1294
     tempObj["min_unit"] = ""
1295
     this.recordInfo.tableList.push(tempObj);
1295
     this.recordInfo.tableList.push(tempObj);
1296
-   
1296
+
1297
     this.getInitOrder();
1297
     this.getInitOrder();
1298
     if(parseInt(this.$route.query.id) > 0){
1298
     if(parseInt(this.$route.query.id) > 0){
1299
 
1299
 
1306
 </script>
1306
 </script>
1307
 
1307
 
1308
 <style rel="stylesheet/css" lang="scss" scoped>
1308
 <style rel="stylesheet/css" lang="scss" scoped>
1309
+
1310
+.reviewImg {
1311
+  position: fixed;
1312
+  left: 50%;
1313
+  transform: translateX(-50%);
1314
+  top: 30%;
1315
+}
1309
 .information {
1316
 .information {
1310
   border: 1px #dcdfe6 solid;
1317
   border: 1px #dcdfe6 solid;
1311
   padding: 30px 20px 30px 20px;
1318
   padding: 30px 20px 30px 20px;
1331
   margin-bottom: 15px;
1338
   margin-bottom: 15px;
1332
 }
1339
 }
1333
 
1340
 
1341
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1342
+  overflow: auto;
1343
+}
1344
+/deep/ .gutter {
1345
+  width: 15px !important;
1346
+  display: inline-block !important;
1347
+}
1348
+/deep/ .el-table__fixed-right-patch {
1349
+  width: 15px !important;
1350
+}
1351
+
1352
+/deep/ .el-table__fixed-right {
1353
+  bottom: 0 !important;
1354
+  left: auto;
1355
+  right: 0;
1356
+}
1334
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1357
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1335
-  width: 10px;
1336
-  height: 10px;
1358
+  width: 15px !important;
1359
+  height: 15px !important;
1337
 }
1360
 }
1338
 </style>
1361
 </style>
1339
 
1362
 
1360
 .el-table::before {
1383
 .el-table::before {
1361
   background-color: #d0d3da;
1384
   background-color: #d0d3da;
1362
 }
1385
 }
1363
-.el-table__fixed-right {
1386
+/* .el-table__fixed-right {
1364
   width: 150px;
1387
   width: 150px;
1365
   bottom: 20px;
1388
   bottom: 20px;
1366
   height: 100%;
1389
   height: 100%;
1367
 }
1390
 }
1391
+ */
1392
+
1368
 </style>
1393
 </style>

+ 21 - 39
src/xt_pages/supply/components/addPurchaseOrder.vue View File

16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
           >
21
           >
22
             <el-option
22
             <el-option
76
             @click="checkPurchaseOrder"
76
             @click="checkPurchaseOrder"
77
             v-show="showOne">审核
77
             v-show="showOne">审核
78
          </el-button>
78
          </el-button>
79
-        
79
+
80
         <el-button
80
         <el-button
81
             size="small"
81
             size="small"
82
             type="primary"
82
             type="primary"
89
             @click="checkReturnOrder"
89
             @click="checkReturnOrder"
90
             v-if="is_check == 1">反审核
90
             v-if="is_check == 1">反审核
91
          </el-button>
91
          </el-button>
92
-         
92
+
93
           <el-button
93
           <el-button
94
             size="small"
94
             size="small"
95
             type="primary"
95
             type="primary"
449
       is_check: 2,
449
       is_check: 2,
450
     };
450
     };
451
   },
451
   },
452
-
453
-  watch: {
454
-    total_price: function (newval, oldval) {
455
-      if(this.rate_of_concession != ""){
456
-        this.addressChange()
457
-      }
458
-    }
459
-  },
460
-
461
   methods: {
452
   methods: {
462
     getInitOrder() {
453
     getInitOrder() {
463
       getInitOrder().then((response) => {
454
       getInitOrder().then((response) => {
807
       for (let i = 0; i < arr.length; i++) {
798
       for (let i = 0; i < arr.length; i++) {
808
         total_count += arr[i].stock_count;
799
         total_count += arr[i].stock_count;
809
       }
800
       }
810
-      if(total_count > 0){
811
-        return total_count;
812
-      }else{
813
-        return ""
814
-      }
815
-    
801
+      return total_count;
816
     },
802
     },
817
     calculate: function (val) {
803
     calculate: function (val) {
818
       if (isNaN(val)) {
804
       if (isNaN(val)) {
888
         }
874
         }
889
       });
875
       });
890
     },
876
     },
891
-  
877
+    getAllPrice() {
878
+      var total_price = 0;
879
+      for (let i = 0; i < this.recordInfo.tableList.length; i++) {
880
+        total_price +=
881
+          this.recordInfo.tableList[i].supply_price *
882
+          this.recordInfo.tableList[i].supply_count;
883
+      }
884
+      this.total_price = total_price;
885
+      this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
886
+      return total_price.toFixed(2);
887
+    },
892
     count_discount() {
888
     count_discount() {
893
       this.rate_of_concession = (
889
       this.rate_of_concession = (
894
         this.discount_amount /
890
         this.discount_amount /
924
     getDataConfig(module, filed_name) {
920
     getDataConfig(module, filed_name) {
925
       return getDataConfig(module, filed_name);
921
       return getDataConfig(module, filed_name);
926
     },
922
     },
927
-
928
-     getAllPrice() {
929
-      var total_price = 0;
930
-      for (let i = 0; i < this.recordInfo.tableList.length; i++) {
931
-        total_price +=
932
-          this.recordInfo.tableList[i].supply_price *
933
-          this.recordInfo.tableList[i].supply_count;
934
-      }
935
-      this.total_price = total_price;
936
-      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
937
-      return total_price.toFixed(2);
938
-    },
939
-     addressChange() {
923
+    addressChange() {
940
       var discount_amount = 0;
924
       var discount_amount = 0;
941
       if (this.rate_of_concession > 0) {
925
       if (this.rate_of_concession > 0) {
942
         discount_amount = (
926
         discount_amount = (
945
         ).toFixed(2);
929
         ).toFixed(2);
946
       }
930
       }
947
       this.discount_amount = discount_amount;
931
       this.discount_amount = discount_amount;
948
-     
949
     },
932
     },
950
     checkReturnOrder() {
933
     checkReturnOrder() {
951
       var id = this.id;
934
       var id = this.id;
955
           this.disabled = false;
938
           this.disabled = false;
956
           this.showOne = true;
939
           this.showOne = true;
957
           this.is_check = 2;
940
           this.is_check = 2;
958
-          this.Reviewed = false
959
           this.$message.success("反审核成功!");
941
           this.$message.success("反审核成功!");
960
         }
942
         }
961
       });
943
       });
971
           var purcaseOrder = response.data.data.purcaseOrder;
953
           var purcaseOrder = response.data.data.purcaseOrder;
972
 
954
 
973
           var goodOrder = response.data.data.goodOrder;
955
           var goodOrder = response.data.data.goodOrder;
974
-         
956
+
975
           var drugList = response.data.data.drugList;
957
           var drugList = response.data.data.drugList;
976
-      
958
+
977
           var ids = "";
959
           var ids = "";
978
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
960
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
979
           if (goodOrder.length == 0) {
961
           if (goodOrder.length == 0) {
1020
                 }
1002
                 }
1021
               }
1003
               }
1022
             }
1004
             }
1023
-     
1005
+
1024
 
1006
 
1025
             for (let i = 0; i < newArr.length; i++) {
1007
             for (let i = 0; i < newArr.length; i++) {
1026
               for (let j = 0; j < newArr[i].child.length; j++) {
1008
               for (let j = 0; j < newArr[i].child.length; j++) {
1081
               }
1063
               }
1082
             }
1064
             }
1083
            }
1065
            }
1084
-     
1066
+
1085
           }
1067
           }
1086
         }
1068
         }
1087
       });
1069
       });
1178
   bottom: 20px;
1160
   bottom: 20px;
1179
   height: 100%;
1161
   height: 100%;
1180
 }
1162
 }
1181
-</style>
1163
+</style>

+ 35 - 18
src/xt_pages/supply/components/addSupply.vue View File

1
 <template>
1
 <template>
2
-  <el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :before-close="closePop" >
2
+  <el-dialog
3
+    :title="title"
4
+    :visible.sync="dialogVisible"
5
+    width="40%"
6
+    :before-close="closePop"
7
+  >
3
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
8
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
4
     <div>
9
     <div>
5
       <el-form
10
       <el-form
32
                 @select="handleSelect"
37
                 @select="handleSelect"
33
               ></el-autocomplete> -->
38
               ></el-autocomplete> -->
34
 
39
 
35
-              <el-select
36
-                v-model="supplier.supplierType"
37
-                @select="handleSelect"
38
-              >
40
+              <el-select v-model="supplier.supplierType" @select="handleSelect">
39
                 <el-option
41
                 <el-option
40
                   v-for="item in supplierType"
42
                   v-for="item in supplierType"
41
                   :key="item.name"
43
                   :key="item.name"
51
               <el-input
53
               <el-input
52
                 v-model="supplier.vatRate"
54
                 v-model="supplier.vatRate"
53
                 @keyup.native="supplier.vatRate = oninput(supplier.vatRate)"
55
                 @keyup.native="supplier.vatRate = oninput(supplier.vatRate)"
54
-              ></el-input>%
56
+              ></el-input
57
+              >%
55
             </el-form-item>
58
             </el-form-item>
56
           </el-col>
59
           </el-col>
57
         </el-row>
60
         </el-row>
318
         this.title = "编辑供应商";
321
         this.title = "编辑供应商";
319
         this.supplier.supplierCode = data.SupplierCode;
322
         this.supplier.supplierCode = data.SupplierCode;
320
         this.supplier.supplierName = data.SupplierName;
323
         this.supplier.supplierName = data.SupplierName;
321
-        if (data.SupplierType == 0){
322
-          this.supplier.supplierType = ""
323
-        }else {
324
+        if (data.SupplierType == 0) {
325
+          this.supplier.supplierType = "";
326
+        } else {
324
           this.supplier.supplierType = data.SupplierType;
327
           this.supplier.supplierType = data.SupplierType;
325
         }
328
         }
326
         this.supplier.vatRate = data.VatRate;
329
         this.supplier.vatRate = data.VatRate;
432
                     this.closePop();
435
                     this.closePop();
433
                     this.$emit("init");
436
                     this.$emit("init");
434
                   } else {
437
                   } else {
435
-                    this.$message.error("新增失败:"+res.data.msg);
438
+                    this.$message.error("新增失败:" + res.data.msg);
436
                     setTimeout(() => {
439
                     setTimeout(() => {
437
                       this.closePop();
440
                       this.closePop();
438
                     }, 2000);
441
                     }, 2000);
480
                     this.closePop();
483
                     this.closePop();
481
                     this.$emit("init");
484
                     this.$emit("init");
482
                   } else {
485
                   } else {
483
-                    this.$message.error("修改失败:"+res.data.msg);
486
+                    this.$message.error("修改失败:" + res.data.msg);
484
                     setTimeout(() => {
487
                     setTimeout(() => {
485
                       this.closePop();
488
                       this.closePop();
486
                     }, 2000);
489
                     }, 2000);
565
       let params = {
568
       let params = {
566
         id: data.id,
569
         id: data.id,
567
       };
570
       };
568
-      if (params.id==undefined||params.id=="undefined") {
571
+      if (params.id == undefined || params.id == "undefined") {
569
         this.recordInfo.contacts.splice(index, 1);
572
         this.recordInfo.contacts.splice(index, 1);
570
-      }else {
573
+      } else {
571
         if (this.show_type == 1) {
574
         if (this.show_type == 1) {
572
           if (this.recordInfo.contacts.length <= 1) {
575
           if (this.recordInfo.contacts.length <= 1) {
573
             return;
576
             return;
577
         } else if (this.show_type == 2) {
580
         } else if (this.show_type == 2) {
578
           delcontactone(params).then((res) => {
581
           delcontactone(params).then((res) => {
579
             if (res.data.state == 1) {
582
             if (res.data.state == 1) {
580
-              this.$message.success("删除成功!!:",index);
583
+              this.$message.success("删除成功!!:", index);
581
               this.getcontacts(this.supplier_ids);
584
               this.getcontacts(this.supplier_ids);
582
             } else {
585
             } else {
583
               this.$message.error(res.data.data.list);
586
               this.$message.error(res.data.data.list);
661
 /deep/ .el-form-item__error {
664
 /deep/ .el-form-item__error {
662
   // display: none !important;
665
   // display: none !important;
663
 }
666
 }
664
-/deep/ .el-table__body-wrapper::-webkit-scrollbar {
665
-  width: 10px;
666
-  height: 10px;
667
+// /deep/ .el-table__body-wrapper::-webkit-scrollbar {
668
+//   width: 10px;
669
+//   height: 10px;
670
+// }
671
+
672
+
673
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
674
+  overflow: auto;
675
+}
676
+/deep/ .gutter {
677
+  width: 22px !important;
678
+  display: inline-block !important;
679
+}
680
+/deep/ .el-table__fixed-right-patch {
681
+  width: 22px !important;
667
 }
682
 }
668
 
683
 
669
-/deep/ .el-table__fixed-right{
684
+/deep/ .el-table__fixed-right {
670
   bottom: 0 !important;
685
   bottom: 0 !important;
686
+  left: auto;
687
+  right: 22px;
671
 }
688
 }
672
 </style>
689
 </style>

+ 30 - 10
src/xt_pages/supply/components/editGoodOrder.vue View File

17
           <!-- <div>供应商:</div> -->
17
           <!-- <div>供应商:</div> -->
18
           <el-select
18
           <el-select
19
             v-model="supplier_name"
19
             v-model="supplier_name"
20
-            style="width: 140px; margin-right: 10px"
20
+            style="width: 220px; margin-right: 10px"
21
             placeholder="请选择"
21
             placeholder="请选择"
22
             :disabled="disabled"
22
             :disabled="disabled"
23
           >
23
           >
565
       tableDataList: [],
565
       tableDataList: [],
566
     };
566
     };
567
   },
567
   },
568
-
569
-  watch() {
570
-    // total_price:function(newval,oldval){
571
-    //   console.log(newval,'op')
572
-    // }
568
+   watch: {
569
+    total_price: function (newval, oldval) {
570
+      if(this.rate_of_concession != ""){
571
+        this.addressChange()
572
+        this.count_payment()
573
+      }
574
+    }
573
   },
575
   },
574
 
576
 
575
   methods: {
577
   methods: {
898
         ).toFixed(2);
900
         ).toFixed(2);
899
       }
901
       }
900
       this.discount_amount = discount_amount;
902
       this.discount_amount = discount_amount;
903
+      if(this.payment > 0) this.count_payment()
901
     },
904
     },
902
     count_discount() {
905
     count_discount() {
903
       this.rate_of_concession = (
906
       this.rate_of_concession = (
904
         this.discount_amount /
907
         this.discount_amount /
905
         (this.total_price * 0.01)
908
         (this.total_price * 0.01)
906
       ).toFixed(2);
909
       ).toFixed(2);
910
+      if(this.payment > 0) this.count_payment()
907
     },
911
     },
908
     count_payment() {
912
     count_payment() {
909
       let arrearage_1 = (
913
       let arrearage_1 = (
1577
   margin-top: 15px;
1581
   margin-top: 15px;
1578
   margin-bottom: 15px;
1582
   margin-bottom: 15px;
1579
 }
1583
 }
1584
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1585
+  overflow: auto;
1586
+}
1587
+/deep/ .gutter {
1588
+  width: 15px !important;
1589
+  display: inline-block !important;
1590
+}
1591
+/deep/ .el-table__fixed-right-patch {
1592
+  width: 15px !important;
1593
+}
1594
+
1595
+/deep/ .el-table__fixed-right {
1596
+  bottom: 0 !important;
1597
+  left: auto;
1598
+  right: 0;
1599
+}
1580
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1600
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1581
-  width: 10px;
1582
-  height: 10px;
1601
+  width: 15px !important;
1602
+  height: 15px !important;
1583
 }
1603
 }
1584
 </style>
1604
 </style>
1585
 
1605
 
1606
 .el-table::before {
1626
 .el-table::before {
1607
   background-color: #d0d3da;
1627
   background-color: #d0d3da;
1608
 }
1628
 }
1609
-.el-table__fixed-right {
1629
+/* .el-table__fixed-right {
1610
   width: 150px;
1630
   width: 150px;
1611
   bottom: 20px;
1631
   bottom: 20px;
1612
   height: 100%;
1632
   height: 100%;
1613
-}
1633
+} */
1614
 .reviewImg {
1634
 .reviewImg {
1615
   position: fixed;
1635
   position: fixed;
1616
   left: 50%;
1636
   left: 50%;

+ 21 - 5
src/xt_pages/supply/components/editGoodReturn.vue View File

16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
             :disabled ="disabled"
21
             :disabled ="disabled"
22
           >
22
           >
1342
   margin-bottom: 15px;
1342
   margin-bottom: 15px;
1343
 }
1343
 }
1344
 
1344
 
1345
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1346
+  overflow: auto;
1347
+}
1348
+/deep/ .gutter {
1349
+  width: 15px !important;
1350
+  display: inline-block !important;
1351
+}
1352
+/deep/ .el-table__fixed-right-patch {
1353
+  width: 15px !important;
1354
+}
1355
+
1356
+/deep/ .el-table__fixed-right {
1357
+  bottom: 0 !important;
1358
+  left: auto;
1359
+  right: 0;
1360
+}
1345
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1361
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1346
-  width: 10px;
1347
-  height: 10px;
1362
+  width: 15px !important;
1363
+  height: 15px !important;
1348
 }
1364
 }
1349
 </style>
1365
 </style>
1350
 
1366
 
1371
 .el-table::before {
1387
 .el-table::before {
1372
   background-color: #d0d3da;
1388
   background-color: #d0d3da;
1373
 }
1389
 }
1374
-.el-table__fixed-right {
1390
+/* .el-table__fixed-right {
1375
   width: 150px;
1391
   width: 150px;
1376
   bottom: 20px;
1392
   bottom: 20px;
1377
   height: 100%;
1393
   height: 100%;
1378
-}
1394
+} */
1379
 .reviewImg {
1395
 .reviewImg {
1380
   position: fixed;
1396
   position: fixed;
1381
   left: 50%;
1397
   left: 50%;

+ 216 - 157
src/xt_pages/supply/components/editPurchaseOrder.vue View File

12
           align-items: center;
12
           align-items: center;
13
         "
13
         "
14
       >
14
       >
15
-        <div style="display:flex;align-items: center;">
15
+        <div style="display: flex; align-items: center">
16
           <span style="color: red">*</span><span>供应商:</span>
16
           <span style="color: red">*</span><span>供应商:</span>
17
           <el-select
17
           <el-select
18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
             @change="changeTypeName"
21
             @change="changeTypeName"
22
             :disabled="disabled"
22
             :disabled="disabled"
60
           ></el-date-picker>
60
           ></el-date-picker>
61
           <span>单据编码:{{ number }}</span>
61
           <span>单据编码:{{ number }}</span>
62
         </div>
62
         </div>
63
-        <div style="display: flex;">
63
+        <div style="display: flex">
64
           <el-button size="small" type="primary" @click="toAdd" v-show="showOne"
64
           <el-button size="small" type="primary" @click="toAdd" v-show="showOne"
65
             >生成采购单</el-button
65
             >生成采购单</el-button
66
           >
66
           >
348
             v-model="discount_amount"
348
             v-model="discount_amount"
349
             :disabled="disabled"
349
             :disabled="disabled"
350
             placeholder="请输入优惠金额"
350
             placeholder="请输入优惠金额"
351
+            @input="count_discount"
351
           ></el-input
352
           ></el-input
352
         ></span>
353
         ></span>
353
       </div>
354
       </div>
367
     <el-button @click="dialogVisible = false">取 消</el-button>
368
     <el-button @click="dialogVisible = false">取 消</el-button>
368
   </span>
369
   </span>
369
   </el-dialog> -->
370
   </el-dialog> -->
370
-  <popup ref="Popup" :content="content" :content_1="content_1" :content_2="content_2" :number="number" :orderList ="orderList" :type="type"></popup>
371
+    <popup
372
+      ref="Popup"
373
+      :content="content"
374
+      :content_1="content_1"
375
+      :content_2="content_2"
376
+      :number="number"
377
+      :orderList="orderList"
378
+      :type="type"
379
+    ></popup>
371
   </div>
380
   </div>
372
 </template>
381
 </template>
373
 
382
 
374
 <script>
383
 <script>
375
-import popup from "./Popup"
384
+import popup from "./Popup";
376
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
385
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
377
 import { uParseTime } from "@/utils/tools";
386
 import { uParseTime } from "@/utils/tools";
378
 import {
387
 import {
384
   getGoodOrderList,
393
   getGoodOrderList,
385
   getReturnOrder,
394
   getReturnOrder,
386
   deletePurchaseOrder,
395
   deletePurchaseOrder,
387
-  deletePurchOder
396
+  deletePurchOder,
388
 } from "@/api/supply";
397
 } from "@/api/supply";
389
 export default {
398
 export default {
390
   name: "addPurchaseOrder",
399
   name: "addPurchaseOrder",
391
   components: {
400
   components: {
392
     BreadCrumb,
401
     BreadCrumb,
393
-    popup
402
+    popup,
394
   },
403
   },
395
   data() {
404
   data() {
396
     return {
405
     return {
397
-      content_2:"采购单",
398
-      content:"采购订单",
399
-      content_1:"已有以下关联数据,不能反审核",
400
-      type:1,
406
+      content_2: "采购单",
407
+      content: "采购订单",
408
+      content_1: "已有以下关联数据,不能反审核",
409
+      type: 1,
401
       Reviewed: false,
410
       Reviewed: false,
402
       crumbs: [
411
       crumbs: [
403
         { path: false, name: "采购订单" },
412
         { path: false, name: "采购订单" },
454
       showThree: false,
463
       showThree: false,
455
       orderList: [],
464
       orderList: [],
456
       return_remark: "",
465
       return_remark: "",
457
-      
458
     };
466
     };
459
   },
467
   },
468
+
469
+  watch: {
470
+    total_price: function (newval, oldval) {
471
+      if (this.rate_of_concession != "") {
472
+        this.addressChange();
473
+      }
474
+    },
475
+  },
460
   methods: {
476
   methods: {
461
     getInitOrder() {
477
     getInitOrder() {
462
       getInitOrder().then((response) => {
478
       getInitOrder().then((response) => {
559
                 goodList[i].good_type_id = this.goodTypeList[y].type_name;
575
                 goodList[i].good_type_id = this.goodTypeList[y].type_name;
560
               }
576
               }
561
             }
577
             }
562
-            goodList[i].supply_name =goodList[i].good_name +" " +goodList[i].specification_name +" " + goodList[i].manufacturer;
578
+            goodList[i].supply_name =
579
+              goodList[i].good_name +
580
+              " " +
581
+              goodList[i].specification_name +
582
+              " " +
583
+              goodList[i].manufacturer;
563
             goodList[i].supply_type = goodList[i].good_type_id;
584
             goodList[i].supply_type = goodList[i].good_type_id;
564
-            goodList[i].supply_specification_name =goodList[i].specification_name;
585
+            goodList[i].supply_specification_name =
586
+              goodList[i].specification_name;
565
             goodList[i].supply_price = goodList[i].buy_price;
587
             goodList[i].supply_price = goodList[i].buy_price;
566
-            goodList[i].supply_total = this.getTotalStockCount(goodList[i].good_warehouse_info);
588
+            goodList[i].supply_total = this.getTotalStockCount(
589
+              goodList[i].good_warehouse_info
590
+            );
567
             goodList[i].supply_count = "";
591
             goodList[i].supply_count = "";
568
             goodList[i].supply_total_price = "";
592
             goodList[i].supply_total_price = "";
569
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
593
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
570
-            goodList[i].supply_license_number = goodList[i].number
594
+            goodList[i].supply_license_number = goodList[i].number;
571
             goodList[i].supply_remake = "";
595
             goodList[i].supply_remake = "";
572
             goodList[i].type = 2;
596
             goodList[i].type = 2;
573
             goodList[i].name = goodList[i].good_name;
597
             goodList[i].name = goodList[i].good_name;
579
             this.tabList.push(goodList[i]);
603
             this.tabList.push(goodList[i]);
580
           }
604
           }
581
           this.goodList = goodList;
605
           this.goodList = goodList;
582
-          
583
         }
606
         }
584
       });
607
       });
585
     },
608
     },
594
           this.recordInfo.tableList[i].name = val.name;
617
           this.recordInfo.tableList[i].name = val.name;
595
           this.recordInfo.tableList[i].supply_name = val.supply_name;
618
           this.recordInfo.tableList[i].supply_name = val.supply_name;
596
           this.recordInfo.tableList[i].supply_type = val.supply_type;
619
           this.recordInfo.tableList[i].supply_type = val.supply_type;
597
-          this.recordInfo.tableList[i].supply_specification_name =val.supply_specification_name;
620
+          this.recordInfo.tableList[i].supply_specification_name =
621
+            val.supply_specification_name;
598
           this.recordInfo.tableList[i].supply_total = val.supply_total;
622
           this.recordInfo.tableList[i].supply_total = val.supply_total;
599
           if (val.supply_count == NaN) {
623
           if (val.supply_count == NaN) {
600
             this.recordInfo.tableList[i].supply_count = "";
624
             this.recordInfo.tableList[i].supply_count = "";
604
               : "";
628
               : "";
605
           }
629
           }
606
 
630
 
607
-          this.recordInfo.tableList[i].supply_price = val.supply_price? val.supply_price: "";
608
-          this.recordInfo.tableList[i].supply_total_price =val.supply_total_price ? val.supply_total_price : "";
609
-          this.recordInfo.tableList[i].supply_manufacturer =val.supply_manufacturer;
610
-          this.recordInfo.tableList[i].supply_license_number =val.supply_license_number;
631
+          this.recordInfo.tableList[i].supply_price = val.supply_price
632
+            ? val.supply_price
633
+            : "";
634
+          this.recordInfo.tableList[i].supply_total_price =
635
+            val.supply_total_price ? val.supply_total_price : "";
636
+          this.recordInfo.tableList[i].supply_manufacturer =
637
+            val.supply_manufacturer;
638
+          this.recordInfo.tableList[i].supply_license_number =
639
+            val.supply_license_number;
611
           this.recordInfo.tableList[i].supply_remake = val.supply_remake;
640
           this.recordInfo.tableList[i].supply_remake = val.supply_remake;
612
           this.recordInfo.tableList[i].is_total = val.is_total;
641
           this.recordInfo.tableList[i].is_total = val.is_total;
613
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
642
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
641
       this.recordInfo.tableList.push(tempObj);
670
       this.recordInfo.tableList.push(tempObj);
642
     },
671
     },
643
     handleDelete: function (index, row) {
672
     handleDelete: function (index, row) {
644
-      
645
-      if(this.is_check == 1){
646
-         this.$message.error("已审核单据,不能删除!")
647
-         return false
673
+      if (this.is_check == 1) {
674
+        this.$message.error("已审核单据,不能删除!");
675
+        return false;
648
       }
676
       }
649
-      if(row.id == 0){
677
+      if (row.id == 0) {
650
         if (this.recordInfo.tableList.length <= 1) {
678
         if (this.recordInfo.tableList.length <= 1) {
651
           this.$message.error("只有一条记录的时候无法删除");
679
           this.$message.error("只有一条记录的时候无法删除");
652
           return;
680
           return;
653
         } else {
681
         } else {
654
           this.recordInfo.tableList.splice(index, 1);
682
           this.recordInfo.tableList.splice(index, 1);
655
         }
683
         }
656
-      }else{
657
-          const params = {
658
-            id: row.id
659
-          }
660
-          this.$confirm('确认删除吗?', {
661
-            confirmButtonText: '确定',
662
-            cancelButtonText: '取消',
663
-            type: 'warning'
664
-          }).then(() => {
665
-            deletePurchOder(params).then(response => {
684
+      } else {
685
+        const params = {
686
+          id: row.id,
687
+        };
688
+        this.$confirm("确认删除吗?", {
689
+          confirmButtonText: "确定",
690
+          cancelButtonText: "取消",
691
+          type: "warning",
692
+        })
693
+          .then(() => {
694
+            deletePurchOder(params).then((response) => {
666
               if (response.data.state == 0) {
695
               if (response.data.state == 0) {
667
-                this.$message.error(response.data.msg)
668
-                return false
696
+                this.$message.error(response.data.msg);
697
+                return false;
669
               } else {
698
               } else {
670
-                this.$message.success('删除成功')
699
+                this.$message.success("删除成功");
671
 
700
 
672
-                this.recordInfo.tableList.splice(index, 1)
701
+                this.recordInfo.tableList.splice(index, 1);
673
               }
702
               }
674
-            })
675
-          }).catch(() => {
676
-        })
677
-        
703
+            });
704
+          })
705
+          .catch(() => {});
678
       }
706
       }
679
-      
680
     },
707
     },
681
 
708
 
682
     changeTypeName() {},
709
     changeTypeName() {},
715
       for (let i = 0; i < arr.length; i++) {
742
       for (let i = 0; i < arr.length; i++) {
716
         total_count += arr[i].stock_count;
743
         total_count += arr[i].stock_count;
717
       }
744
       }
718
-      if(total_count >0){
745
+      if (total_count > 0) {
719
         return total_count;
746
         return total_count;
720
-      }else{
721
-        return ""
747
+      } else {
748
+        return "";
722
       }
749
       }
723
-     
724
     },
750
     },
725
     calculate: function (val) {
751
     calculate: function (val) {
726
       if (isNaN(val)) {
752
       if (isNaN(val)) {
746
       this.$refs["tableForm"].validate((valid) => {
772
       this.$refs["tableForm"].validate((valid) => {
747
         if (valid) {
773
         if (valid) {
748
           this.loading = true;
774
           this.loading = true;
749
-         
775
+
750
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
776
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
751
-            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
752
-            this.recordInfo.tableList[i].supply_license_number =this.recordInfo.tableList[i].supply_license_number.toString();
753
-            this.recordInfo.tableList[i].supply_total_price = (this.recordInfo.tableList[i].supply_count *this.recordInfo.tableList[i].supply_price).toString();
754
-            this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
755
-            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString();
777
+            this.recordInfo.tableList[i].supply_count = parseInt(
778
+              this.recordInfo.tableList[i].supply_count
779
+            );
780
+            this.recordInfo.tableList[i].supply_license_number =
781
+              this.recordInfo.tableList[i].supply_license_number.toString();
782
+            this.recordInfo.tableList[i].supply_total_price = (
783
+              this.recordInfo.tableList[i].supply_count *
784
+              this.recordInfo.tableList[i].supply_price
785
+            ).toString();
786
+            this.recordInfo.tableList[i].supply_total =
787
+              this.recordInfo.tableList[i].supply_total.toString();
788
+            this.recordInfo.tableList[i].supply_price =
789
+              this.recordInfo.tableList[i].supply_price.toString();
756
             for (let j = 0; j < this.manufactuerList.length; j++) {
790
             for (let j = 0; j < this.manufactuerList.length; j++) {
757
               if (
791
               if (
758
                 this.recordInfo.tableList[i].supply_manufacturer ==
792
                 this.recordInfo.tableList[i].supply_manufacturer ==
776
             stockIn: this.recordInfo.tableList,
810
             stockIn: this.recordInfo.tableList,
777
             return_remake: this.return_remark,
811
             return_remake: this.return_remark,
778
           };
812
           };
779
-          console.log("哈哈哈哈哈哈",params)
780
-          
813
+          console.log("哈哈哈哈哈哈", params);
814
+
781
           updatePurchaseOrder(
815
           updatePurchaseOrder(
782
             params,
816
             params,
783
             this.supplier_name,
817
             this.supplier_name,
792
               this.loading = false;
826
               this.loading = false;
793
               var warehousingInfo = response.data.data.warehousingInfo;
827
               var warehousingInfo = response.data.data.warehousingInfo;
794
               this.$message.success("保存成功!");
828
               this.$message.success("保存成功!");
795
-              this.getPurchaseOrderDetail()
829
+              this.getPurchaseOrderDetail();
796
             }
830
             }
797
           });
831
           });
798
         }
832
         }
807
           this.recordInfo.tableList[i].supply_count;
841
           this.recordInfo.tableList[i].supply_count;
808
       }
842
       }
809
       this.total_price = total_price;
843
       this.total_price = total_price;
810
-      this.addressChange()
844
+      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
811
       return total_price.toFixed(2);
845
       return total_price.toFixed(2);
812
     },
846
     },
813
 
847
 
816
         confirmButtonText: "确 定",
850
         confirmButtonText: "确 定",
817
         cancelButtonText: "取 消",
851
         cancelButtonText: "取 消",
818
         type: "warning",
852
         type: "warning",
819
-      }).then(() => {
853
+      })
854
+        .then(() => {
820
           checkPurchaseOrder(this.id).then((response) => {
855
           checkPurchaseOrder(this.id).then((response) => {
821
             if (response.data.state == 1) {
856
             if (response.data.state == 1) {
822
               var info = response.data.data.info;
857
               var info = response.data.data.info;
872
             this.showTwo = false;
907
             this.showTwo = false;
873
             this.showThree = true;
908
             this.showThree = true;
874
           }
909
           }
875
-         
910
+
876
           var drugList = response.data.data.baseList;
911
           var drugList = response.data.data.baseList;
877
           var goodList = response.data.data.goodList;
912
           var goodList = response.data.data.goodList;
878
           for (let i = 0; i < orderInfo.length; i++) {
913
           for (let i = 0; i < orderInfo.length; i++) {
879
-            orderInfo[i].id = orderInfo[i].id
914
+            orderInfo[i].id = orderInfo[i].id;
880
             orderInfo[i].supply_count = orderInfo[i].count;
915
             orderInfo[i].supply_count = orderInfo[i].count;
881
             orderInfo[i].supply_price = orderInfo[i].price;
916
             orderInfo[i].supply_price = orderInfo[i].price;
882
             orderInfo[i].supply_remake = orderInfo[i].remark;
917
             orderInfo[i].supply_remake = orderInfo[i].remark;
910
               }
945
               }
911
             }
946
             }
912
           }
947
           }
913
-         
948
+
914
           this.recordInfo.tableList = [];
949
           this.recordInfo.tableList = [];
915
-          if(orderInfo.length == 0){
916
-              const tempObj = {};
917
-              tempObj["id"] = 0;
918
-              tempObj["name"] = "";
919
-              tempObj["supply_name"] = "";
920
-              tempObj["supply_type"] = "";
921
-              tempObj["supply_specification_name"] = "";
922
-              tempObj["supply_total"] = "";
923
-              tempObj["supply_count"] = "";
924
-              tempObj["supply_price"] = "";
925
-              tempObj["supply_total_price"] = "";
926
-              tempObj["supply_manufacturer"] = "";
927
-              tempObj["supply_license_number"] = "";
928
-              tempObj["supply_remake"] = "";
929
-              tempObj["type"] = 0;
930
-              tempObj["is_total"] = 1;
931
-              tempObj["project_id"] = 0;
932
-              tempObj["supply_unit"] = "";
933
-              tempObj["manufacturer_id"] = "";
934
-              this.recordInfo.tableList.push(tempObj);
935
-          }else{
950
+          if (orderInfo.length == 0) {
951
+            const tempObj = {};
952
+            tempObj["id"] = 0;
953
+            tempObj["name"] = "";
954
+            tempObj["supply_name"] = "";
955
+            tempObj["supply_type"] = "";
956
+            tempObj["supply_specification_name"] = "";
957
+            tempObj["supply_total"] = "";
958
+            tempObj["supply_count"] = "";
959
+            tempObj["supply_price"] = "";
960
+            tempObj["supply_total_price"] = "";
961
+            tempObj["supply_manufacturer"] = "";
962
+            tempObj["supply_license_number"] = "";
963
+            tempObj["supply_remake"] = "";
964
+            tempObj["type"] = 0;
965
+            tempObj["is_total"] = 1;
966
+            tempObj["project_id"] = 0;
967
+            tempObj["supply_unit"] = "";
968
+            tempObj["manufacturer_id"] = "";
969
+            this.recordInfo.tableList.push(tempObj);
970
+          } else {
936
             this.recordInfo.tableList = orderInfo;
971
             this.recordInfo.tableList = orderInfo;
937
           }
972
           }
938
-         
939
         }
973
         }
940
       });
974
       });
941
     },
975
     },
955
           var purcaseOrder = response.data.data.purcaseOrder;
989
           var purcaseOrder = response.data.data.purcaseOrder;
956
 
990
 
957
           var goodOrder = response.data.data.goodOrder;
991
           var goodOrder = response.data.data.goodOrder;
958
-         
992
+
959
           var drugList = response.data.data.drugList;
993
           var drugList = response.data.data.drugList;
960
-      
994
+
961
           var ids = "";
995
           var ids = "";
962
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
996
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
963
           if (goodOrder.length == 0) {
997
           if (goodOrder.length == 0) {
964
-            this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + ids});
998
+            this.$router.push({
999
+              path: "/good/order/add?id=" + id + "&ids=" + ids,
1000
+            });
965
           }
1001
           }
966
-       
967
-          
1002
+
968
           for (let i = 0; i < purcaseOrder.length; i++) {
1003
           for (let i = 0; i < purcaseOrder.length; i++) {
969
             for (let j = 0; j < drugList.length; j++) {
1004
             for (let j = 0; j < drugList.length; j++) {
970
               if (purcaseOrder[i].is_source == 1) {
1005
               if (purcaseOrder[i].is_source == 1) {
971
                 if (purcaseOrder[i].supply_unit == drugList[j].max_unit) {
1006
                 if (purcaseOrder[i].supply_unit == drugList[j].max_unit) {
972
-                  purcaseOrder[i].count = purcaseOrder[i].count * drugList[j].min_number;
1007
+                  purcaseOrder[i].count =
1008
+                    purcaseOrder[i].count * drugList[j].min_number;
973
                 }
1009
                 }
974
               }
1010
               }
975
             }
1011
             }
979
             for (let j = 0; j < drugList.length; j++) {
1015
             for (let j = 0; j < drugList.length; j++) {
980
               if (goodOrder[i].is_source == 1) {
1016
               if (goodOrder[i].is_source == 1) {
981
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
1017
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
982
-                    goodOrder[i].count = goodOrder[i].count * drugList[j].min_number;
1018
+                  goodOrder[i].count =
1019
+                    goodOrder[i].count * drugList[j].min_number;
983
                 }
1020
                 }
984
               }
1021
               }
985
             }
1022
             }
1006
                 }
1043
                 }
1007
               }
1044
               }
1008
             }
1045
             }
1009
-     
1010
 
1046
 
1011
             for (let i = 0; i < newArr.length; i++) {
1047
             for (let i = 0; i < newArr.length; i++) {
1012
               for (let j = 0; j < newArr[i].child.length; j++) {
1048
               for (let j = 0; j < newArr[i].child.length; j++) {
1014
               }
1050
               }
1015
             }
1051
             }
1016
 
1052
 
1017
-            var arr = []; 
1053
+            var arr = [];
1018
             var total = 0;
1054
             var total = 0;
1019
             var str = "";
1055
             var str = "";
1020
-            console.log("newArr2323223323223",newArr)
1021
-            console.log("newArr2323223323223",purcaseOrder)
1022
-            
1056
+            console.log("newArr2323223323223", newArr);
1057
+            console.log("newArr2323223323223", purcaseOrder);
1023
 
1058
 
1024
-           console.log("长度1",goodOrder.length)
1025
-           console.log("长度2",purcaseOrder.length)
1059
+            console.log("长度1", goodOrder.length);
1060
+            console.log("长度2", purcaseOrder.length);
1026
 
1061
 
1027
-          if(purcaseOrder.length <=goodOrder.length){
1028
-            //如果采购单有数据,则需要比较数量
1029
-            if (newArr.length > 0) {
1030
-              for (let i = 0; i < purcaseOrder.length; i++) {
1031
-                for (let j = 0; j < newArr.length; j++) {
1032
-                  if (purcaseOrder[i].project_id == newArr[j].project_id) {
1033
-                    //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,可以继续生成采购单
1034
-                    if (purcaseOrder[i].count > newArr[j].count) {
1035
-                      arr.push(purcaseOrder[i].project_id);
1062
+            if (purcaseOrder.length <= goodOrder.length) {
1063
+              //如果采购单有数据,则需要比较数量
1064
+              if (newArr.length > 0) {
1065
+                for (let i = 0; i < purcaseOrder.length; i++) {
1066
+                  for (let j = 0; j < newArr.length; j++) {
1067
+                    if (purcaseOrder[i].project_id == newArr[j].project_id) {
1068
+                      //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,可以继续生成采购单
1069
+                      if (purcaseOrder[i].count > newArr[j].count) {
1070
+                        arr.push(purcaseOrder[i].project_id);
1071
+                      }
1036
                     }
1072
                     }
1037
                   }
1073
                   }
1038
                 }
1074
                 }
1039
-              }
1040
-              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1041
-             
1042
-              if (arr.length == 0) {
1043
-                this.$message.error("该订单已全部生成采购单,请知悉!");
1044
-                return;
1045
-              }
1075
+                //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1046
 
1076
 
1047
-              if (arr.length >0) {
1048
-                str = arr.join(",");
1049
-                this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + str});
1050
-              }
1077
+                if (arr.length == 0) {
1078
+                  this.$message.error("该订单已全部生成采购单,请知悉!");
1079
+                  return;
1080
+                }
1051
 
1081
 
1082
+                if (arr.length > 0) {
1083
+                  str = arr.join(",");
1084
+                  this.$router.push({
1085
+                    path: "/good/order/add?id=" + id + "&ids=" + str,
1086
+                  });
1087
+                }
1088
+              }
1052
             }
1089
             }
1053
-
1054
-          }
1055
-          //如果采购订单的商品个数不等与 采购单里面的商品个数
1056
-          if(purcaseOrder.length>goodOrder.length){
1057
-           var arrList = []
1058
-           var str = "";
1059
-            if (newArr.length > 0) {
1060
-              for (let i = 0; i < purcaseOrder.length; i++) {
1061
-                for (let j = 0; j < newArr.length; j++) {
1062
-                  //如果采购订单的商品个数不等与 采购单里面的商品个数
1063
-                  if(purcaseOrder[i].project_id != newArr[j].project_id){
1064
-                     arrList.push(purcaseOrder[i].project_id)
1090
+            //如果采购订单的商品个数不等与 采购单里面的商品个数
1091
+            if (purcaseOrder.length > goodOrder.length) {
1092
+              var arrList = [];
1093
+              var str = "";
1094
+              if (newArr.length > 0) {
1095
+                for (let i = 0; i < purcaseOrder.length; i++) {
1096
+                  for (let j = 0; j < newArr.length; j++) {
1097
+                    //如果采购订单的商品个数不等与 采购单里面的商品个数
1098
+                    if (purcaseOrder[i].project_id != newArr[j].project_id) {
1099
+                      arrList.push(purcaseOrder[i].project_id);
1100
+                    }
1065
                   }
1101
                   }
1066
                 }
1102
                 }
1067
-              }
1068
-              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1069
-              console.log("are232323323223322323",arrList)
1070
-              if(arrList.length > 0){
1071
-                str = arrList.join(",");
1072
-                this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + str});
1103
+                //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1104
+                console.log("are232323323223322323", arrList);
1105
+                if (arrList.length > 0) {
1106
+                  str = arrList.join(",");
1107
+                  this.$router.push({
1108
+                    path: "/good/order/add?id=" + id + "&ids=" + str,
1109
+                  });
1110
+                }
1073
               }
1111
               }
1074
             }
1112
             }
1075
-           }
1076
           }
1113
           }
1077
         }
1114
         }
1078
       });
1115
       });
1079
     },
1116
     },
1080
     addressChange() {
1117
     addressChange() {
1118
+      var discount_amount = 0;
1081
       if (this.rate_of_concession > 0) {
1119
       if (this.rate_of_concession > 0) {
1082
-        this.discount_amount = (
1120
+        discount_amount = (
1083
           (this.rate_of_concession / 100) *
1121
           (this.rate_of_concession / 100) *
1084
           this.total_price
1122
           this.total_price
1085
         ).toFixed(2);
1123
         ).toFixed(2);
1086
       }
1124
       }
1125
+      this.discount_amount = discount_amount;
1126
+    },
1127
+    count_discount() {
1128
+      this.rate_of_concession = (
1129
+        this.discount_amount /
1130
+        (this.total_price * 0.01)
1131
+      ).toFixed(2);
1087
     },
1132
     },
1088
     checkReturnOrder() {
1133
     checkReturnOrder() {
1089
       var id = this.$route.query.id;
1134
       var id = this.$route.query.id;
1090
       //获取购货订单号
1135
       //获取购货订单号
1091
       getGoodOrderList(id).then((response) => {
1136
       getGoodOrderList(id).then((response) => {
1092
         if (response.data.state == 1) {
1137
         if (response.data.state == 1) {
1093
-          var list = response.data.data.list
1094
-        
1095
-          this.orderList = list
1138
+          var list = response.data.data.list;
1139
+
1140
+          this.orderList = list;
1096
           //如果长度大于0,有购货单不能反审核
1141
           //如果长度大于0,有购货单不能反审核
1097
           if (list.length > 0) {
1142
           if (list.length > 0) {
1098
-            this.$refs.Popup.dialogVisible = true
1099
-            return 
1143
+            this.$refs.Popup.dialogVisible = true;
1144
+            return;
1100
           }
1145
           }
1101
           if (list.length == 0) {
1146
           if (list.length == 0) {
1102
-            this.getReturnOrder()
1103
-            this.showOne = false
1104
-            this.showTwo = true
1105
-            this.showThree = false
1147
+            this.getReturnOrder();
1148
+            this.showOne = false;
1149
+            this.showTwo = true;
1150
+            this.showThree = false;
1106
           }
1151
           }
1107
         }
1152
         }
1108
       });
1153
       });
1113
         if (response.data.state == 1) {
1158
         if (response.data.state == 1) {
1114
           var msg = response.data.data.msg;
1159
           var msg = response.data.data.msg;
1115
           this.disabled = false;
1160
           this.disabled = false;
1116
-          this.Reviewed = false
1161
+          this.Reviewed = false;
1117
           this.$message.success("反审核成功!");
1162
           this.$message.success("反审核成功!");
1118
           this.getPurchaseOrderDetail();
1163
           this.getPurchaseOrderDetail();
1119
         }
1164
         }
1120
       });
1165
       });
1121
     },
1166
     },
1122
     toClick(id) {
1167
     toClick(id) {
1123
-      this.$router.push({path:"/good/order/edit?id=" + id});
1168
+      this.$router.push({ path: "/good/order/edit?id=" + id });
1124
     },
1169
     },
1125
   },
1170
   },
1126
   created() {
1171
   created() {
1174
   margin-top: 15px;
1219
   margin-top: 15px;
1175
   margin-bottom: 15px;
1220
   margin-bottom: 15px;
1176
 }
1221
 }
1222
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1223
+  overflow: auto;
1224
+}
1225
+/deep/ .gutter {
1226
+  width: 15px !important;
1227
+  display: inline-block !important;
1228
+}
1229
+/deep/ .el-table__fixed-right-patch {
1230
+  width: 15px !important;
1231
+}
1232
+
1233
+/deep/ .el-table__fixed-right {
1234
+  bottom: 0 !important;
1235
+  left: auto;
1236
+  right: 0;
1237
+}
1177
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1238
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1178
-  width: 10px;
1179
-  height: 10px;
1239
+  width: 15px !important;
1240
+  height: 15px !important;
1180
 }
1241
 }
1181
 </style>
1242
 </style>
1182
 
1243
 
1203
 .el-table::before {
1264
 .el-table::before {
1204
   background-color: #d0d3da;
1265
   background-color: #d0d3da;
1205
 }
1266
 }
1206
-.el-table__fixed-right {
1267
+/* .el-table__fixed-right {
1207
   width: 150px;
1268
   width: 150px;
1208
   bottom: 20px;
1269
   bottom: 20px;
1209
   height: 100%;
1270
   height: 100%;
1210
-}
1271
+} */
1211
 .reviewImg {
1272
 .reviewImg {
1212
   position: fixed;
1273
   position: fixed;
1213
   left: 50%;
1274
   left: 50%;
1214
   transform: translateX(-50%);
1275
   transform: translateX(-50%);
1215
   top: 30%;
1276
   top: 30%;
1216
 }
1277
 }
1217
-
1218
-
1219
 </style>
1278
 </style>

+ 3 - 3
src/xt_pages/supply/components/editSupply.vue View File

916
 .el-table::before {
916
 .el-table::before {
917
 background-color: #d0d3da;
917
 background-color: #d0d3da;
918
 }
918
 }
919
-.el-table__fixed-right{
919
+/* .el-table__fixed-right{
920
   width:150px;
920
   width:150px;
921
-  /* bottom: 20px; */
921
+  bottom: 20px;
922
   height: 100%;
922
   height: 100%;
923
-}
923
+} */
924
 </style>
924
 </style>

+ 9 - 8
src/xt_pages/supply/goodreturn.vue View File

87
         border
87
         border
88
         style="width: 100%"
88
         style="width: 100%"
89
       >
89
       >
90
-        <el-table-column label="单据日期" align="center" width="200">
90
+        <el-table-column label="单据日期" align="center" width="100">
91
           <template slot-scope="scope">
91
           <template slot-scope="scope">
92
             <span>{{ getTimes(scope.row.document_date) }}</span>
92
             <span>{{ getTimes(scope.row.document_date) }}</span>
93
           </template>
93
           </template>
124
             >
124
             >
125
           </template>
125
           </template>
126
         </el-table-column>
126
         </el-table-column>
127
-        <el-table-column label="采购金额" align="center" width="200">
127
+        <el-table-column label="采购金额" align="center" width="130">
128
           <template slot-scope="scope">
128
           <template slot-scope="scope">
129
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
129
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
130
               getAllBuyPrice(scope.row.cancelOrder)
130
               getAllBuyPrice(scope.row.cancelOrder)
131
             }}</span>
131
             }}</span>
132
           </template>
132
           </template>
133
         </el-table-column>
133
         </el-table-column>
134
-        <el-table-column label="优惠后金额" align="center" width="200">
134
+        <el-table-column label="优惠后金额" align="center" width="130">
135
           <template slot-scope="scope">
135
           <template slot-scope="scope">
136
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
136
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
137
               getAllBuyPriceOne(
137
               getAllBuyPriceOne(
141
             }}</span>
141
             }}</span>
142
           </template>
142
           </template>
143
         </el-table-column>
143
         </el-table-column>
144
-        <el-table-column label="已退款" align="center" width="200">
144
+        <el-table-column label="已退款" align="center" width="130">
145
           <template slot-scope="scope">
145
           <template slot-scope="scope">
146
             <span v-if="scope.row.payment > 0">{{ scope.row.payment }}</span>
146
             <span v-if="scope.row.payment > 0">{{ scope.row.payment }}</span>
147
           </template>
147
           </template>
148
         </el-table-column>
148
         </el-table-column>
149
-        <el-table-column label="数量" align="center" width="200">
149
+        <el-table-column label="数量" align="center" width="120">
150
           <template slot-scope="scope">
150
           <template slot-scope="scope">
151
             {{ getCount(scope.row.cancelOrder) }}
151
             {{ getCount(scope.row.cancelOrder) }}
152
           </template>
152
           </template>
153
         </el-table-column>
153
         </el-table-column>
154
 
154
 
155
-        <el-table-column label="退款状态" align="center" width="200">
155
+        <el-table-column label="退款状态" align="center" width="120">
156
           <template slot-scope="scope">
156
           <template slot-scope="scope">
157
             <!-- <span v-if="scope.row.is_check == 2">未审核</span>
157
             <!-- <span v-if="scope.row.is_check == 2">未审核</span>
158
            <span v-if="scope.row.is_check == 1">已审核</span> -->
158
            <span v-if="scope.row.is_check == 1">已审核</span> -->
159
+          
159
            <span v-if="scope.row.payment == 0">未退款</span>
160
            <span v-if="scope.row.payment == 0">未退款</span>
160
            <span v-if="scope.row.payment > 0 && scope.row.payment< getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">部分退款</span>
161
            <span v-if="scope.row.payment > 0 && scope.row.payment< getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">部分退款</span>
161
            <span v-if="scope.row.payment > 0 && scope.row.payment == getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">全部退款</span>
162
            <span v-if="scope.row.payment > 0 && scope.row.payment == getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">全部退款</span>
162
           </template>
163
           </template>
163
         </el-table-column>
164
         </el-table-column>
164
 
165
 
165
-        <el-table-column label="制单人" align="center" width="200">
166
+        <el-table-column label="制单人" align="center" width="120">
166
           <template slot-scope="scope">
167
           <template slot-scope="scope">
167
             {{ getDocName(scope.row.creater) }}
168
             {{ getDocName(scope.row.creater) }}
168
           </template>
169
           </template>
169
         </el-table-column>
170
         </el-table-column>
170
 
171
 
171
-        <el-table-column label="审核人" align="center" width="200">
172
+        <el-table-column label="审核人" align="center" width="120">
172
           <template slot-scope="scope">
173
           <template slot-scope="scope">
173
             {{ getDocName(scope.row.checker) }}
174
             {{ getDocName(scope.row.checker) }}
174
           </template>
175
           </template>

+ 1 - 1
src/xt_pages/supply/supplyQuery.vue View File

15
         <div>
15
         <div>
16
           <el-select
16
           <el-select
17
             v-model="type_name"
17
             v-model="type_name"
18
-            style="width: 170px; margin-right: 10px"
18
+            style="width: 220px; margin-right: 10px"
19
             clearable
19
             clearable
20
             placeholder="请选择供应商类别"
20
             placeholder="请选择供应商类别"
21
             @change="changeTypeName"
21
             @change="changeTypeName"

+ 27 - 27
src/xt_pages/user/doctorAdvice.vue View File

160
         </el-table-column>
160
         </el-table-column>
161
 
161
 
162
162
163
-        
163
+
164
         <el-table-column
164
         <el-table-column
165
           label="开嘱时间"
165
           label="开嘱时间"
166
           width="180"
166
           width="180"
168
           align="center"
168
           align="center"
169
         >
169
         >
170
           <template slot-scope="scope">
170
           <template slot-scope="scope">
171
-            <span v-if="org_id == 10215">{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
172
-            <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
171
+            <span v-if="org_id == 10215">{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span>
172
+            <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span>
173
           </template>
173
           </template>
174
         </el-table-column>
174
         </el-table-column>
175
         <el-table-column
175
         <el-table-column
968
             <el-col :span="14">
968
             <el-col :span="14">
969
               <el-form-item label="药品规格 :" prop="advice_desc">
969
               <el-form-item label="药品规格 :" prop="advice_desc">
970
                 <el-col :span="6">
970
                 <el-col :span="6">
971
-               
971
+
972
                 <el-autocomplete
972
                 <el-autocomplete
973
                   style="width:100px;"
973
                   style="width:100px;"
974
                   class="inline-input"
974
                   class="inline-input"
1049
                     >
1049
                     >
1050
                     </el-option>
1050
                     </el-option>
1051
                   </el-select>
1051
                   </el-select>
1052
-                
1052
+
1053
                 </el-col>
1053
                 </el-col>
1054
               </el-form-item>
1054
               </el-form-item>
1055
             </el-col>
1055
             </el-col>
1518
             </li>
1518
             </li>
1519
             <li v-if="currentPatient.user_org_id!=10090">
1519
             <li v-if="currentPatient.user_org_id!=10090">
1520
               <span class="name">科别:</span>
1520
               <span class="name">科别:</span>
1521
-             
1521
+
1522
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1522
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1523
             </li>
1523
             </li>
1524
             <li>
1524
             <li>
1650
             </li>
1650
             </li>
1651
             <li v-if="currentPatient.user_org_id!=10090">
1651
             <li v-if="currentPatient.user_org_id!=10090">
1652
               <span class="name" style="width:30px;">科:</span>
1652
               <span class="name" style="width:30px;">科:</span>
1653
-             
1653
+
1654
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1654
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1655
             </li>
1655
             </li>
1656
             <li v-if="currentPatient.user_org_id!=10090">
1656
             <li v-if="currentPatient.user_org_id!=10090">
1657
               <span class="name" style="width:30px;">区:</span>
1657
               <span class="name" style="width:30px;">区:</span>
1658
-             
1658
+
1659
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1659
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1660
             </li>
1660
             </li>
1661
             <li v-if="currentPatient.user_org_id!=10090">
1661
             <li v-if="currentPatient.user_org_id!=10090">
1662
               <span class="name" style="width:30px;">房:</span>
1662
               <span class="name" style="width:30px;">房:</span>
1663
-              
1663
+
1664
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1664
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1665
             </li>
1665
             </li>
1666
             <li v-if="currentPatient.user_org_id!=10090">
1666
             <li v-if="currentPatient.user_org_id!=10090">
2223
           }
2223
           }
2224
 
2224
 
2225
           console.log("2323223",this.adviceForm)
2225
           console.log("2323223",this.adviceForm)
2226
-        
2226
+
2227
           EditNewDoctorAdvice(
2227
           EditNewDoctorAdvice(
2228
             this.patientID,
2228
             this.patientID,
2229
             this.adviceForm.id,
2229
             this.adviceForm.id,
2277
       });
2277
       });
2278
     },
2278
     },
2279
     submitgroupAdvice(formName) {
2279
     submitgroupAdvice(formName) {
2280
-     
2280
+
2281
       this.addLoading = true;
2281
       this.addLoading = true;
2282
       this.$refs[formName].validate(valid => {
2282
       this.$refs[formName].validate(valid => {
2283
         if (valid) {
2283
         if (valid) {
2290
             remark: this.groupForm.remark,
2290
             remark: this.groupForm.remark,
2291
             parent_id: this.groupForm.parent_id,
2291
             parent_id: this.groupForm.parent_id,
2292
           };
2292
           };
2293
-        
2294
-         
2293
+
2294
+
2295
           var adviceNames = [];
2295
           var adviceNames = [];
2296
           for (const index in this.groupForm.adviceNames) {
2296
           for (const index in this.groupForm.adviceNames) {
2297
             this.groupForm.adviceNames[
2297
             this.groupForm.adviceNames[
2312
             mode = "1-3"
2312
             mode = "1-3"
2313
           }
2313
           }
2314
         console.log("长期医嘱3333",submitForm)
2314
         console.log("长期医嘱3333",submitForm)
2315
-       
2315
+
2316
         if(this.private_drug_config != null&&this.private_drug_config.drug_start == 1){
2316
         if(this.private_drug_config != null&&this.private_drug_config.drug_start == 1){
2317
               for(let index=0;index<submitForm.adviceNames.length;index++){
2317
               for(let index=0;index<submitForm.adviceNames.length;index++){
2318
                   for(let i=0;i<this.medicals.length;i++){
2318
                   for(let i=0;i<this.medicals.length;i++){
2324
               }
2324
               }
2325
           }
2325
           }
2326
           console.log("模板数据",submitForm)
2326
           console.log("模板数据",submitForm)
2327
-        
2327
+
2328
           CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
2328
           CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
2329
             response => {
2329
             response => {
2330
               if (response.data.state == 0) {
2330
               if (response.data.state == 0) {
2417
               this.adviceForm.advice_name = arr[0]
2417
               this.adviceForm.advice_name = arr[0]
2418
           }
2418
           }
2419
           console.log("222222",this.adviceForm)
2419
           console.log("222222",this.adviceForm)
2420
-         
2420
+
2421
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2421
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2422
             response => {
2422
             response => {
2423
               if (response.data.state == 0) {
2423
               if (response.data.state == 0) {
3028
           row_key: this.rowKey,
3028
           row_key: this.rowKey,
3029
           table: []
3029
           table: []
3030
         };
3030
         };
3031
-      
3031
+
3032
         if (item.id in childMap) {
3032
         if (item.id in childMap) {
3033
           for (const key in childMap[item.id]) {
3033
           for (const key in childMap[item.id]) {
3034
             this.rowKey++;
3034
             this.rowKey++;
3068
     },
3068
     },
3069
 
3069
 
3070
     openEdit(index, row) {
3070
     openEdit(index, row) {
3071
-      
3071
+
3072
       this.currentIndex = index;
3072
       this.currentIndex = index;
3073
       (this.dialogTitle = "修改医嘱"), (this.isEdit = true);
3073
       (this.dialogTitle = "修改医嘱"), (this.isEdit = true);
3074
 
3074
 
4038
       });
4038
       });
4039
     },
4039
     },
4040
     submitNameForm(formName) {
4040
     submitNameForm(formName) {
4041
-       
4041
+
4042
        if(this.src_type == ""){
4042
        if(this.src_type == ""){
4043
           this.nameForm.way = 0
4043
           this.nameForm.way = 0
4044
           this.nameForm.drug_id = 0
4044
           this.nameForm.drug_id = 0
4049
           this.nameForm.advice_name = arr[0]
4049
           this.nameForm.advice_name = arr[0]
4050
        }
4050
        }
4051
       console.log("医嘱2222",this.nameForm)
4051
       console.log("医嘱2222",this.nameForm)
4052
-     
4052
+
4053
       var _this = this;
4053
       var _this = this;
4054
       this.$refs[formName].validate(valid => {
4054
       this.$refs[formName].validate(valid => {
4055
         if (valid) {
4055
         if (valid) {
4355
     // 获取勾选中的行
4355
     // 获取勾选中的行
4356
     getPrintInfo(ids) {
4356
     getPrintInfo(ids) {
4357
       console.log("23332332323232",this.adviceType,"33333333",this.stopType)
4357
       console.log("23332332323232",this.adviceType,"33333333",this.stopType)
4358
-     
4358
+
4359
       getPrintInfo({ids:ids},this.adviceType,this.stopType).then(response => {
4359
       getPrintInfo({ids:ids},this.adviceType,this.stopType).then(response => {
4360
         if (response.data.state === 1) {
4360
         if (response.data.state === 1) {
4361
           var doctoradvice = response.data.data.doctoradvice;
4361
           var doctoradvice = response.data.data.doctoradvice;
4362
           console.log("doctoradvice", doctoradvice);
4362
           console.log("doctoradvice", doctoradvice);
4363
-         
4363
+
4364
           this.dataAdvice = doctoradvice;
4364
           this.dataAdvice = doctoradvice;
4365
           if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4365
           if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4366
-           
4366
+
4367
             this.lstableData = this.dataAdvice;
4367
             this.lstableData = this.dataAdvice;
4368
-            
4368
+
4369
           } else if (this.adviceType === 1) {
4369
           } else if (this.adviceType === 1) {
4370
             this.cqtableData = doctoradvice;
4370
             this.cqtableData = doctoradvice;
4371
           }
4371
           }
4503
             this.private_drug_config = response.data.data.private_drug_config
4503
             this.private_drug_config = response.data.data.private_drug_config
4504
             console.log("medicals",medicalList)
4504
             console.log("medicals",medicalList)
4505
             this.medicals = medicalList
4505
             this.medicals = medicalList
4506
-          
4506
+
4507
       })
4507
       })
4508
     },
4508
     },
4509
     changeDrugNameTwo(name){
4509
     changeDrugNameTwo(name){
4514
         if (this.all_drug[i].drug_name == name) {
4514
         if (this.all_drug[i].drug_name == name) {
4515
             this.drugSpec = this.all_drug[i].drug_specs
4515
             this.drugSpec = this.all_drug[i].drug_specs
4516
           }
4516
           }
4517
-       }   
4517
+       }
4518
     },
4518
     },
4519
    changeDrugDescTwo(name){
4519
    changeDrugDescTwo(name){
4520
       this.current_drug_spec = name
4520
       this.current_drug_spec = name
4611
 
4611
 
4612
       handleSelect1(val){
4612
       handleSelect1(val){
4613
         this.drug_id = val.drug_id
4613
         this.drug_id = val.drug_id
4614
-        
4614
+
4615
       },
4615
       },
4616
       handleSelect(val){
4616
       handleSelect(val){
4617
         this.src_type = 1
4617
         this.src_type = 1