Browse Source

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

see999 3 years ago
parent
commit
6aa50bd77a
28 changed files with 264 additions and 142 deletions
  1. 3 1
      src/lang/zh.js
  2. 1 0
      src/xt_pages/data/components/templateTable.vue
  3. 6 4
      src/xt_pages/data/druguseTemplate.vue
  4. 3 1
      src/xt_pages/data/template.vue
  5. 3 2
      src/xt_pages/stock/cancelStockOrderAdd.vue
  6. 4 3
      src/xt_pages/stock/cancelStockOrderEdit.vue
  7. 3 1
      src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue
  8. 2 1
      src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue
  9. 8 7
      src/xt_pages/stock/drugs/components/drugCancelDetail.vue
  10. 1 1
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  11. 3 2
      src/xt_pages/stock/drugs/drugBatchNumber.vue
  12. 1 1
      src/xt_pages/stock/drugs/drugCancelDetailPrint.vue
  13. 2 2
      src/xt_pages/stock/drugs/drugIndex.vue
  14. 3 1
      src/xt_pages/stock/drugs/drugStockFlow.vue
  15. 4 5
      src/xt_pages/stock/drugs/drugStockInOrder.vue
  16. 3 2
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  17. 2 2
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  18. 103 73
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  19. 1 1
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  20. 70 15
      src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue
  21. 2 2
      src/xt_pages/stock/stockFlow.vue
  22. 2 2
      src/xt_pages/stock/stockInOrderAdd.vue
  23. 3 6
      src/xt_pages/stock/stockInOrderEdit.vue
  24. 18 3
      src/xt_pages/stock/stockOutOrder.vue
  25. 1 0
      src/xt_pages/stock/stockOutOrderAdd.vue
  26. 1 1
      src/xt_pages/stock/stockOutOrderEdit.vue
  27. 4 2
      src/xt_pages/upload/fast/FastProvince.vue
  28. 7 1
      src/xt_pages/user/components/PatientDetail.vue

+ 3 - 1
src/lang/zh.js View File

@@ -355,6 +355,8 @@ export default {
355 355
     rescue_record: '抢救记录',
356 356
     manage_ment: '设备管理',
357 357
     nursing_record: '透析护理记录',
358
-    special_record: '特殊记录'
358
+    special_record: '特殊记录',
359
+    template_summary: '治疗小结',
360
+    template_plan: '个性化方案'
359 361
   }
360 362
 }

+ 1 - 0
src/xt_pages/data/components/templateTable.vue View File

@@ -354,6 +354,7 @@ export default {
354 354
         }
355 355
 
356 356
         if (valid) {
357
+           
357 358
           createConfig(this.temp).then(response => {
358 359
             if (!response.data) {
359 360
               // 由于mockjs 不支持自定义状态码只能这样hack

+ 6 - 4
src/xt_pages/data/druguseTemplate.vue View File

@@ -1817,10 +1817,11 @@
1817 1817
         })
1818 1818
       },
1819 1819
       handleSelect1(){
1820
-
1820
+       this.templateForm.drug_id =  val.id
1821 1821
       },
1822
-      handleSelect(){
1823
-
1822
+      handleSelect(val){
1823
+        console.log("val23232",val)
1824
+        this.templateForm.drug_id =  val.id
1824 1825
       },
1825 1826
       submitTemplate(formName) {
1826 1827
 
@@ -2376,9 +2377,10 @@
2376 2377
           this.templateForm.week_days = this.templateForm.weekday.filter(function(s) {
2377 2378
             return s && s.trim()
2378 2379
           }).join(',')
2380
+          this.templateForm.way = 1
2379 2381
         }
2380 2382
         console.log("编辑模板",this.templateForm)
2381
-
2383
+      
2382 2384
         // 编辑创建医嘱模版
2383 2385
         CreateSingleAdviceTemplate(this.templateForm).then(response => {
2384 2386
           if (response.data.state == 0) {

+ 3 - 1
src/xt_pages/data/template.vue View File

@@ -45,7 +45,9 @@ export default {
45 45
         { label: this.$t("data_config.nursing_record"), key: "nursing_record" },
46 46
         { label: this.$t("data_config.special_record"), key: "special_record" },
47 47
         { label: this.$t("data_config.course_disease"), key: "course_disease" },
48
-        { label: this.$t("data_config.rescue_record"), key: "rescue_record" }
48
+        { label: this.$t("data_config.rescue_record"), key: "rescue_record" },
49
+        // { label: this.$t("data_config.template_summary"), key: "template_summary" },
50
+        // { label: this.$t("data_config.template_plan"), key: "template_plan" }
49 51
       ],
50 52
       activeName: "education",
51 53
       createdTimes: 0

+ 3 - 2
src/xt_pages/stock/cancelStockOrderAdd.vue View File

@@ -109,6 +109,7 @@
109 109
                 style="padding-top: 17px"
110 110
               >
111 111
                 <el-input
112
+                  oninput="value=value.replace(/\D|^0/g,'')"
112 113
                   placeholder="请输入退库数量"
113 114
                   type="number"
114 115
                   v-model="scope.row.return_count"
@@ -128,8 +129,8 @@
128 129
                 style="padding-top: 17px"
129 130
               >
130 131
                 <el-input
131
-                 oninput="value=value.replace(/[^0-9.]/g,'')"
132
-                  placeholder="请输入退库数量"
132
+                 
133
+                  placeholder="请输入单价"
133 134
                   type="number"
134 135
                   v-model="scope.row.price"
135 136
                 ></el-input>      

+ 4 - 3
src/xt_pages/stock/cancelStockOrderEdit.vue View File

@@ -75,13 +75,13 @@
75 75
             <template slot-scope="scope">
76 76
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
77 77
                             style="padding-top: 17px">
78
-                <el-input type="number" v-model="scope.row.count"  oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
78
+                <el-input type="number" v-model="scope.row.count"  oninput="value=value.replace(/\D|^0/g,'')"></el-input>
79 79
               </el-form-item>
80 80
             </template>
81 81
           </el-table-column>
82 82
           <el-table-column width="150" align="center">
83 83
             <template slot="header" slot-scope="scope">
84
-              <span>退库单价<span style="color: red">*</span></span>
84
+              <span>单价<span style="color: red">*</span></span>
85 85
             </template>
86 86
             <template slot-scope="scope">
87 87
               <el-form-item
@@ -90,7 +90,7 @@
90 90
                 style="padding-top: 17px"
91 91
               >
92 92
                 <el-input
93
-                  placeholder="请输入退库数量"
93
+                  placeholder="请输入单价"
94 94
                   type="number"
95 95
                   v-model="scope.row.price"
96 96
                 ></el-input>      
@@ -513,6 +513,7 @@
513 513
               'cancelStock': this.recordInfo.recordData
514 514
             }
515 515
             console.log("parasm23232",params)
516
+         
516 517
             editCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
517 518
               if (response.data.state == 0) {
518 519
                 this.$message.error(response.data.msg)

+ 3 - 1
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue View File

@@ -155,7 +155,7 @@
155 155
               >
156 156
               <div style="display:flex;">
157 157
                 <el-input
158
-                  oninput="value=value.replace(/[^0-9.]/g,'')"
158
+                   oninput="value=value.replace(/\D|^0/g,'')"
159 159
                   style="width:100px"
160 160
                   placeholder="请输入退库数量"
161 161
                   type="number"
@@ -691,6 +691,7 @@ export default {
691 691
         this.currentIndex = val
692 692
       },
693 693
       handleSelect(val){
694
+         console.log("val23232",val)
694 695
          this.getDrugBatchNumber(val.id)
695 696
          for(let i=0;i<this.recordInfo.recordData.length;i++){
696 697
            if(i == this.currentIndex){
@@ -699,6 +700,7 @@ export default {
699 700
              this.recordInfo.recordData[i].drug_type = val.drug_type
700 701
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
701 702
              this.recordInfo.recordData[i].last_price = val.last_price
703
+             this.recordInfo.recordData[i].price = val.last_price
702 704
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
703 705
              this.recordInfo.recordData[i].number =  val.number
704 706
              this.recordInfo.recordData[i].max_unit = val.max_unit

+ 2 - 1
src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue View File

@@ -81,7 +81,7 @@
81 81
               >
82 82
               <div style="display:flex;">
83 83
                 <el-input
84
-                 oninput="value=value.replace(/[^0-9.]/g,'')"
84
+                 oninput="value=value.replace(/\D|^0/g,'')"
85 85
                   style="width:100px"
86 86
                   placeholder="请输入退库数量"
87 87
                   type="number"
@@ -668,6 +668,7 @@
668 668
              this.recordInfo.recordData[i].drug_type = val.drug_type
669 669
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
670 670
              this.recordInfo.recordData[i].last_price = val.last_price
671
+             this.recordInfo.recordData[i].price = val.price
671 672
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
672 673
              this.recordInfo.recordData[i].number =  val.number
673 674
              this.recordInfo.recordData[i].max_unit = val.max_unit

+ 8 - 7
src/xt_pages/stock/drugs/components/drugCancelDetail.vue View File

@@ -67,7 +67,7 @@
67 67
 
68 68
     
69 69
 
70
-    <div class="cell clearfix">
70
+    <!-- <div class="cell clearfix">
71 71
       <label class="title"><span class="name">单据类型</span> : </label>
72 72
       <el-select
73 73
         size="small"
@@ -84,8 +84,8 @@
84 84
         >
85 85
         </el-option>
86 86
       </el-select>
87
-    </div>
88
-
87
+    </div> -->
88
+<!-- 
89 89
     <div class="cell clearfix">
90 90
       <label class="title"><span class="name">其它</span> : </label>
91 91
       <el-select
@@ -103,7 +103,7 @@
103 103
         >
104 104
         </el-option>
105 105
       </el-select>
106
-    </div>
106
+    </div> -->
107 107
 
108 108
     <el-row :gutter="12" style="margin-top: 10px">
109 109
       <el-table
@@ -141,7 +141,7 @@
141 141
 
142 142
         <el-table-column label="规格型号" align="center">
143 143
           <template slot-scope="scope">
144
-            <span>{{scope.row.drug_spec}}</span>
144
+            <span>{{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}</span>
145 145
           </template>
146 146
         </el-table-column>
147 147
 
@@ -359,7 +359,7 @@ export default {
359 359
       getDrugCancelDetail(params).then(response=>{
360 360
          if(response.data.state == 1){
361 361
            var order =  response.data.data.order
362
-           console.log("退库详细",order)
362
+           console.log("退库详细222222222222222222",order)
363 363
            this.tableData = order
364 364
            this.tableList = order
365 365
            var total = response.data.data.total
@@ -388,10 +388,11 @@ export default {
388 388
     exportList(){
389 389
        for(let i=0;i<this.tableList.length;i++){
390 390
           this.tableList[i].index = i+1
391
+          this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
391 392
         }
392 393
        import('@/vendor/Export2Excel').then(excel => {
393 394
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
394
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','remark']
395
+       const filterVal = ['index','drug_name', 'unit', 'min_unit','count','price','remark']
395 396
        
396 397
        const data = this.formatJson(filterVal, this.tableList)
397 398
        console.log("data",data)

+ 1 - 1
src/xt_pages/stock/drugs/components/drugOutDetail.vue View File

@@ -173,7 +173,7 @@
173 173
         </el-table-column>
174 174
         <el-table-column label="总价" align="center">
175 175
           <template slot-scope="scope">
176
-            {{scope.row.total_price}}
176
+            {{scope.row.price * scope.row.count}}
177 177
           </template>
178 178
         </el-table-column>
179 179
       </el-table>

+ 3 - 2
src/xt_pages/stock/drugs/drugBatchNumber.vue View File

@@ -66,12 +66,13 @@
66 66
         </el-table-column>
67 67
          <el-table-column prop="drug_name" label="批号" align="center">
68 68
            <template slot-scope="scope">
69
-              {{scope.row.number}}
69
+              {{scope.row.batch_number}}
70 70
            </template>
71 71
         </el-table-column>
72 72
          <el-table-column prop="drug_name" label="入库数量" align="center">
73 73
            <template slot-scope="scope">
74
-              {{scope.row.stock_max_number}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}}
74
+             {{scope.row.warehousing_count}}{{scope.row.max_unit}}
75
+              <!-- {{scope.row.stock_max_number}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}} -->
75 76
            </template>
76 77
         </el-table-column>
77 78
         <el-table-column prop="drug_name" label="进货单价" align="center">

+ 1 - 1
src/xt_pages/stock/drugs/drugCancelDetailPrint.vue View File

@@ -33,7 +33,7 @@
33 33
                 <span>{{item.drug_name}}</span>
34 34
               </td>
35 35
               <td style="line-height: 50px">
36
-                <span>{{item.drug_spec}}</span>
36
+                <span>{{item.dose}}{{item.dose_unit}}*{{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</span>
37 37
               </td>
38 38
               <td style="line-height: 50px">
39 39
                 <span>{{item.min_unit}}</span>

+ 2 - 2
src/xt_pages/stock/drugs/drugIndex.vue View File

@@ -15,9 +15,9 @@
15 15
           <el-tab-pane label="出库明细">
16 16
             <drug-out-detail></drug-out-detail>
17 17
           </el-tab-pane>
18
-          <!-- <el-tab-pane label="退库明细">
18
+          <el-tab-pane label="退库明细">
19 19
             <drug-cancel-detail></drug-cancel-detail>
20
-          </el-tab-pane> -->
20
+          </el-tab-pane>
21 21
 
22 22
         </el-tabs>
23 23
       </div>

+ 3 - 1
src/xt_pages/stock/drugs/drugStockFlow.vue View File

@@ -170,7 +170,7 @@
170 170
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
171 171
       // this.getlist()
172 172
       // this.getOutList()
173
-      // this.getDrugCountList()
173
+      this.getDrugCountList()
174 174
 
175 175
       this.getDrugFlow()
176 176
     },
@@ -447,6 +447,8 @@
447 447
        if((count%min_number)!=0){
448 448
          str_min = count%min_number + min_unit
449 449
        }
450
+       console.log("str2323222",str)
451
+       console.log("str22333333",str_min)
450 452
        return str+str_min
451 453
      },
452 454
 

+ 4 - 5
src/xt_pages/stock/drugs/drugStockInOrder.vue View File

@@ -847,19 +847,18 @@ export default {
847 847
         console.log("hhh23",this.exportList)
848 848
          for(let i=0;i<this.exportList.length;i++){
849 849
            for(let j=0;j<this.drugTypeList.length;j++){
850
-             if(this.exportList[i].drug_type == this.drugTypeList[j].value){
850
+             if(this.exportList[i].drug_type == this.drugTypeList[j].id){
851 851
                this.exportList[i].drug_type = this.drugTypeList[j].name
852 852
              }
853 853
            }
854 854
          }
855
-       
856
-       
855
+              
857 856
         const tHeader = ['药品名称','药品类型','规格&单位', '批号','入库数量','进货价','总价','生产厂家','生产日期','有效日期','经销商','批注文号','备注']
858
-        const filterVal = ['drug_name', 'drug_type','unit','number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','batch_number','remark']
857
+        const filterVal = ['drug_name', 'drug_type','unit','batch_number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
859 858
          
860 859
      
861 860
         console.log("table",this.exportList)
862
-      
861
+        return
863 862
         const data = this.formatJson(filterVal, this.exportList)
864 863
         excel.export_json_to_excel({
865 864
           header: tHeader,

+ 3 - 2
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue View File

@@ -124,7 +124,7 @@
124 124
               >
125 125
               <div style="display:flex;">
126 126
                 <el-input
127
-                  oninput="value=value.replace(/[^0-9.]/g,'')"
127
+                  oninput="value=value.replace(/\D|^0/g,'')"
128 128
                   placeholder="请输入入库数量"
129 129
                   type="number"
130 130
                   v-model="scope.row.warehousing_count"
@@ -546,6 +546,7 @@
546 546
         tempObj['dose']= ''
547 547
         tempObj['dose_unit']=''
548 548
         tempObj['dealer'] = ''
549
+        tempObj['last_price'] = ''
549 550
         this.recordInfo.recordData.push(tempObj)
550 551
       }, handleDelete: function(index, row) {
551 552
         if (this.recordInfo.recordData.length <= 1) {
@@ -695,7 +696,7 @@
695 696
               'stockIn': this.recordInfo.recordData
696 697
             }
697 698
             console.log("params2222222",params)
698
-            
699
+             
699 700
             postDrugWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
700 701
               if (response.data.state == 0) {
701 702
                 this.$message.error(response.data.msg)

+ 2 - 2
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue View File

@@ -189,7 +189,7 @@
189 189
               >
190 190
                 <div style="display:flex;">
191 191
                   <el-input
192
-                    oninput="value=value.replace(/[^0-9.]/g,'')"
192
+                    oninput="value=value.replace(/\D|^0/g,'')"
193 193
                     placeholder="请输入入库数量"
194 194
                     type="number"
195 195
                     v-model="scope.row.warehousing_count"
@@ -676,7 +676,7 @@ export default {
676 676
             stockIn: this.recordInfo.recordData
677 677
           };
678 678
           console.log("params22222222222",params)
679
-        
679
+          
680 680
           EditDrugWarehouse(
681 681
             params,
682 682
             this.warehousing_time,

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

@@ -225,15 +225,16 @@
225 225
               {{scope.row.dose}}&nbsp;{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
226 226
             </template>
227 227
           </el-table-column>
228
-          <el-table-column label="批号" align="center">
228
+          <!-- <el-table-column label="批号" align="center">
229 229
             <template slot-scope="scope">
230 230
               <span v-if="scope.row.batch_number!=''">{{scope.row.batch_number}}</span> 
231 231
              <span v-if="scope.row.batch_number == '0'"></span> 
232 232
             </template>
233
-          </el-table-column>
233
+          </el-table-column> -->
234 234
           <el-table-column label="出库数量" align="center">
235 235
             <template slot-scope="scope">
236
-              {{getTotalCount(scope.row.drug_id)}}
236
+              <!-- {{getTotalCount(scope.row.drug_id)}} -->
237
+              {{getTotalCountOne(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
237 238
             </template>
238 239
           </el-table-column>
239 240
           <el-table-column label="出货单价" align="center">
@@ -306,8 +307,10 @@
306 307
               <span>序号</span>
307 308
             </template>
308 309
             <template slot-scope="scope">
309
-              <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
310
-              <span v-if="scope.row.is_total == 1">{{'合计'}}</span>
310
+              <!-- <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
311
+              <span v-if="scope.row.is_total == 1">{{'合计'}}</span> -->
312
+              {{scope.$index+1}}
313
+            
311 314
             </template>
312 315
           </el-table-column>
313 316
 
@@ -316,8 +319,9 @@
316 319
               <span>使用人</span>
317 320
             </template>
318 321
             <template slot-scope="scope">
319
-              <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
320
-              <span  v-if="scope.row.is_total == 1"></span>
322
+              <!-- <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
323
+              <span  v-if="scope.row.is_total == 1"></span> -->
324
+              {{scope.row.user.name}}
321 325
             </template>
322 326
           </el-table-column>
323 327
           <el-table-column min-width="35" align="center">
@@ -326,7 +330,7 @@
326 330
             </template>
327 331
             <template slot-scope="scope">
328 332
               <span >{{scope.row.count}}{{scope.row.count_unit}}</span>
329
-              <span  v-if="scope.row.is_total == 1">{{scope.row.total}}</span>
333
+              <!-- <span  v-if="scope.row.is_total == 1">{{scope.row.total}}</span> -->
330 334
             </template>
331 335
           </el-table-column>
332 336
 
@@ -335,7 +339,7 @@
335 339
               <span>使用时间</span>
336 340
             </template>
337 341
             <template slot-scope="scope">
338
-              <span  v-if="scope.row.is_total == 0">{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
342
+              <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
339 343
             </template>
340 344
           </el-table-column>
341 345
 
@@ -345,10 +349,10 @@
345 349
               <span>批次号</span>
346 350
             </template>
347 351
             <template slot-scope="scope">
348
-              <span>{{getDrugBatchNumber(scope.row.id)}}</span>
352
+              <span>{{getDrugBatchNumber(scope.row.drug_id)}}</span>
349 353
             </template>
350 354
           </el-table-column>
351
-
355
+          
352 356
         </el-table>
353 357
       </span>
354 358
       <span slot="footer" class="dialog-footer">
@@ -520,7 +524,8 @@ export default {
520 524
       drugOutList:[],
521 525
       outList:[],
522 526
       userListOne:[],
523
-      exportList:[]
527
+      exportList:[],
528
+      batchNumberList:[]
524 529
     };
525 530
   },
526 531
   methods: {
@@ -947,13 +952,14 @@ export default {
947 952
           this.tableShow = true
948 953
           this.tableList = []
949 954
           var list =  response.data.data.list
955
+          console.log("list2323232",list)
950 956
           var outList = response.data.data.outList
951
-          for(let i=0;i<outList.length;i++){
952
-              //如果都是最大单位,把最数量转为最小数量
953
-             if(outList[i].count_unit == outList[i].max_unit){
954
-                outList[i].count = outList[i].min_number * outList[i].count 
955
-             }
956
-          }
957
+          // for(let i=0;i<outList.length;i++){
958
+          //     //如果都是最大单位,把最数量转为最小数量
959
+          //    if(outList[i].count_unit == outList[i].max_unit){
960
+          //       outList[i].count = outList[i].min_number * outList[i].count 
961
+          //    }
962
+          // }
957 963
           this.outList = outList
958 964
          console.log("outList222",outList)
959 965
          this.manufacturerList = response.data.data.manufacturerList
@@ -972,66 +978,32 @@ export default {
972 978
      })
973 979
    },
974 980
    toDetail(val){
975
-     console.log("val",val)
981
+     this.userList = []
982
+     this.userListOne = []
976 983
      var params = {
977 984
        warehouse_out_id:val.warehouse_out_id,
978 985
        drug_id:val.drug_id,
979 986
        record_time:val.sys_record_time,
980 987
      }
981
-     this.userList = []
982 988
      getAutoDrugDetail(params).then(response=>{
983 989
        if(response.data.state == 1){
984
-        console.log("list23232323232",response.data.data.list)
985
-      
986
-        var total = 0
987
-        for (let i = 0; i < response.data.data.list.length; i++) {
988
-          var obj = response.data.data.list[i]
989
-          obj['is_total'] = 0
990
-          this.userList.push(obj)
991
-          var str = 0
992
-          var max_unit = ""
993
-          var min_unit = ""
994
-          var number = 0
995
-          var min_str = 0
996
-         for(let i=0;i<response.data.data.list.length;i++){
997
-             min_str = response.data.data.list[0].drug.min_str
998
-             max_unit = response.data.data.list[0].drug.max_unit
999
-             min_unit = response.data.data.list[0].drug.min_unit
1000
-             number = response.data.data.list[0].drug.min_number
1001
-           if(response.data.data.list[i].count_unit == response.data.data.list[i].drug.max_unit){
1002
-              response.data.data.list[i].count = response.data.data.list[i].count * response.data.data.list[i].drug.min_number
1003
-           }
1004
-         }
1005
-         var total_count = 0
1006
-         for(let i=0;i<response.data.data.list.length;i++){
1007
-            total_count += response.data.data.list[i].count 
1008
-         }
1009
-         console.log("总规格2323232",total_count,number)
1010
-         
1011
-        if(parseInt(total_count)!=0){
1012
-          str = parseInt(total_count/number)
1013
-         }
1014
-        if(parseInt(total_count)!=0){
1015
-          min_str =  parseInt(total_count)%number
1016
-        }
1017 990
         
1018
-        total = str + max_unit + min_str + min_unit
1019
-        console.log("h2hh2h323",str,min_str)
1020
- 
1021
-        }
1022
-        this.userList.push({
1023
-          is_total: 1,
1024
-          total: total,
1025
-        })
991
+        this.userList = response.data.data.list
992
+        
1026 993
         if(val.is_sys == 1){
994
+        
1027 995
           this.drugDialogVisible = true
1028 996
         }
1029 997
         if(val.is_sys == 0){
998
+         
1030 999
           this.drugDialogVisibleTwo = true
1031 1000
         }
1032 1001
          var userListOne = response.data.data.outList
1033 1002
          console.log("手动出库2232332",userListOne)
1034 1003
          this.userListOne = userListOne
1004
+         var  batchNumber = response.data.data.batchNumber
1005
+         console.log("出库详情",batchNumber)
1006
+         this.batchNumberList = batchNumber
1035 1007
        }
1036 1008
      })
1037 1009
    },
@@ -1108,6 +1080,58 @@ export default {
1108 1080
          }
1109 1081
          return str + min_str
1110 1082
       },
1083
+      getTotalCountOne(id,min_number,max_unit,min_unit){
1084
+       
1085
+        for(let i=0;i<this.outList.length;i++){
1086
+          if(this.outList[i].count_unit == this.outList[i].max_unit){
1087
+            this.outList[i].total_count = this.outList[i].count * this.outList[i].min_number
1088
+          }
1089
+
1090
+         if(this.outList[i].count_unit == this.outList[i].min_unit){
1091
+            this.outList[i].total_count = this.outList[i].count
1092
+          }
1093
+       
1094
+        }
1095
+        console.log("我的",this.outList)
1096
+          let dataInfo = {};
1097
+          this.outList.forEach((item, index) => {
1098
+            let { drug_id } = item;
1099
+            if (!dataInfo[drug_id]) {
1100
+              dataInfo[drug_id] = {
1101
+                drug_id,
1102
+                child: [],
1103
+                total:0,
1104
+              };
1105
+            }
1106
+          });
1107
+        let list = Object.values(dataInfo);
1108
+        console.log("drug_id22222",list)
1109
+        for(let i=0;i<list.length;i++){
1110
+          for(let j=0;j<this.outList.length;j++){
1111
+            if(list[i].drug_id == this.outList[j].drug_id){
1112
+              list[i].child.push(this.outList[j])
1113
+            }
1114
+          }
1115
+        }
1116
+       var total = 0
1117
+       for(let i=0;i<list.length;i++){
1118
+        for(let j=0;j<list[i].child.length;j++){
1119
+           if(id == list[i].child[j].drug_id){
1120
+             total+= list[i].child[j].total_count
1121
+           }
1122
+        }
1123
+       }
1124
+      
1125
+      var str = ""
1126
+      var min_str = ""
1127
+      
1128
+      str = parseInt(total/min_number)+ max_unit
1129
+      min_str =  total%min_number + min_unit
1130
+
1131
+     return str + min_str
1132
+      
1133
+       
1134
+     },
1111 1135
       getAllPrice(drug_id,price,min_price){
1112 1136
          var strprice = 0
1113 1137
          var minstrprice = 0
@@ -1131,22 +1155,28 @@ export default {
1131 1155
          return  total_price
1132 1156
       },
1133 1157
 
1134
-      getDrugBatchNumber(id){
1158
+      // getDrugBatchNumber(id){
1135 1159
         
1136
-        var arr= []
1137
-        var batchNumber =[]
1160
+      //   var arr= []
1161
+      //   var batchNumber =[]
1138 1162
         
1139
-        for(let i=0;i<this.userList.length;i++){
1140
-           if(id == this.userList[i].id){
1141
-            arr.push(this.userList[i].drugwarehouseoutinfo)
1142
-           }
1143
-        }
1144
-        if(batchNumber.length > 0 ){
1145
-         for(let j=0;j<arr.length;j++){
1146
-           batchNumber.push(arr[j].batch_number)
1163
+      //   for(let i=0;i<this.userList.length;i++){
1164
+      //      if(id == this.userList[i].id){
1165
+      //        for(let j=0;j<this.userList[i].drugwarehouseoutinfo.length;j++){
1166
+      //           batchNumber.push(this.userList[i].drugwarehouseoutinfo[j].batch_number)
1167
+      //        }
1168
+      //      }
1169
+      //   }
1170
+      //   return batchNumber.join(",")
1171
+      // },
1172
+      getDrugBatchNumber(drugid){
1173
+        var arr = []
1174
+        for(let i=0;i<this.batchNumberList.length;i++){
1175
+          if(drugid == this.batchNumberList[i].drug_id){
1176
+            arr.push(this.batchNumberList[i].batch_number)
1147 1177
           }
1148 1178
         }
1149
-        return batchNumber.join(",")
1179
+        return arr.join(",")
1150 1180
       },
1151 1181
     
1152 1182
       getExportOutOrderDrugList(){

+ 1 - 1
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue View File

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

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

@@ -90,11 +90,19 @@
90 90
               </template>
91 91
                 <template slot-scope="scope">
92 92
                   <el-form-item style="padding-top: 20px">
93
-                    <el-input
93
+                    <!-- <el-input
94 94
                      :disabled="drug_show"
95 95
                       placeholder="请输入批号"
96 96
                       v-model="scope.row.batch_number"
97
-                    ></el-input>
97
+                    ></el-input> -->
98
+                    <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
99
+                      <el-option
100
+                        v-for="(item,index) in numberList"
101
+                        :key="index"
102
+                        :label="item.batch_number"
103
+                        :value="item.batch_number">
104
+                      </el-option>
105
+                    </el-select>
98 106
                   </el-form-item>
99 107
               </template>
100 108
           </el-table-column>
@@ -110,7 +118,7 @@
110 118
               >
111 119
                 <div style="display:flex;">
112 120
                   <el-input
113
-                   oninput="value=value.replace(/[^0-9.]/g,'')"
121
+                   oninput="value=value.replace(/\D|^0/g,'')"
114 122
                    style="width:100px"
115 123
                    :disabled="drug_show"
116 124
                     placeholder="请输入出库数量"
@@ -258,7 +266,7 @@
258 266
 <script>
259 267
   import { uParseTime } from '@/utils/tools'
260 268
 
261
-  import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
269
+  import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID,getDrugBatchNumber } from '@/api/drug/drug_stock'
262 270
   import BreadCrumb from '../../components/bread-crumb'
263 271
   import DrugsStockDialog from './drugsStockDialog/index'
264 272
   import {postSearchDrugList } from "@/api/data"
@@ -330,7 +338,8 @@
330 338
         manufacturerList:[],
331 339
         drug_show:false,
332 340
         unitList:[],
333
-        unitShow:true
341
+        unitShow:true,
342
+        numberList:[]
334 343
       }
335 344
     },
336 345
     methods: {
@@ -434,12 +443,14 @@
434 443
         tempObj['id'] = 0
435 444
         tempObj['drug_id'] = 0
436 445
         tempObj['retail_price'] = ''
437
-
438 446
         tempObj['count'] = ''
439 447
         tempObj['price'] = ''
440 448
         tempObj['remark'] = ''
441 449
         tempObj['batch_number'] = ''
442 450
         tempObj['number'] = ''
451
+        tempObj['count_unit'] = ""
452
+        tempObj['dealer'] = 0
453
+        tempObj['manufacturer'] = 0
443 454
         this.recordInfo.recordData.push(tempObj)
444 455
       }, handleDelete: function(index, row) {
445 456
         if(this.drug_show == true){
@@ -470,12 +481,23 @@
470 481
           }).catch(() => {
471 482
           })
472 483
         }
473
-      }, getTime(val, temp) {
474
-        if (val != 0) {
475
-          return uParseTime(val, temp)
476
-        } else {
477
-          return ''
478
-        }
484
+      }, 
485
+      // getTime(val, temp) {
486
+      //   if (val != 0) {
487
+      //     return uParseTime(val, temp)
488
+      //   } else {
489
+      //     return ''
490
+      //   }
491
+      // },
492
+     getTime(val) {
493
+         if(val < 0){
494
+           return ""
495
+         }
496
+         if(val == ""){
497
+          return ""
498
+         }else {
499
+          return uParseTime(val, '{y}-{m}-{d}')
500
+         }
479 501
       },
480 502
       showDialog(index, row) {
481 503
         this.currentIndex = index;
@@ -557,13 +579,34 @@
557 579
               'stockOut': this.recordInfo.recordData
558 580
             }
559 581
             console.log("params----",params)
582
+           
560 583
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
561 584
               if (response.data.state == 0) {
562 585
                 this.$message.error(response.data.msg)
563 586
                 return false
564 587
               } else {
565
-                this.$message.success('保存成功')
566
-                this.$router.back(-1)
588
+                var msg = response.data.data.msg
589
+                var drug_name =  response.data.data.drug_name
590
+                console.log("drug_name",drug_name)
591
+                var dose = response.data.data.dose
592
+                console.log("dose",dose)
593
+                var dose_unit = response.data.data.dose_unit
594
+                console.log("dose_unit",dose_unit)
595
+                var min_number = response.data.data.min_number
596
+                console.log("min_number",min_number)
597
+                var min_unit =  response.data.data.min_unit
598
+                console.log("min_unit",min_unit)
599
+                var max_unit =  response.data.data.max_unit
600
+                console.log("max_unit",max_unit)
601
+                var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
602
+                console.log("str22222222",str)
603
+              if(msg == 1){
604
+                this.$message.error(str + "库存不足,请入库")
605
+              }else{
606
+                this.$message.success("出库成功");
607
+                this.recordInfo.recordData = [];
608
+                this.$router.back(-1);
609
+              }
567 610
               }
568 611
             })
569 612
           } else {
@@ -693,6 +736,7 @@
693 736
         this.currentIndex = val
694 737
       },
695 738
       handleSelect(val){
739
+         this.getDrugBatchNumber(val.id)
696 740
          for(let i=0;i<this.recordInfo.recordData.length;i++){
697 741
            if(i == this.currentIndex){
698 742
              this.recordInfo.recordData[i].drug_id  = val.id
@@ -704,7 +748,6 @@
704 748
              this.recordInfo.recordData[i].number = val.number
705 749
              this.recordInfo.recordData[i].max_unit = val.max_unit
706 750
              this.recordInfo.recordData[i].min_unit = val.min_unit
707
-           
708 751
            }
709 752
         }
710 753
         console.log("333333",this.recordInfo.recordData)
@@ -715,6 +758,18 @@
715 758
      getDataConfig(module, filed_name){
716 759
        return getDataConfig(module, filed_name)
717 760
      },
761
+     getDrugBatchNumber(id){
762
+          var params = {
763
+            id:id
764
+          }
765
+        getDrugBatchNumber(params).then(response=>{
766
+           if(response.data.state == 1){
767
+             var list = response.data.data.list
768
+             console.log("list2222",list)
769
+             this.numberList = list
770
+           }
771
+        })
772
+      }
718 773
     },
719 774
     created() {
720 775
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 

+ 2 - 2
src/xt_pages/stock/stockFlow.vue View File

@@ -87,12 +87,12 @@
87 87
            </template>
88 88
         </el-table-column>
89 89
      
90
-       <el-table-column label="是否退库" align="center">
90
+       <!-- <el-table-column label="是否退库" align="center">
91 91
          <template slot-scope="scope">
92 92
            <span v-if="scope.row.is_edit == 2">是</span>
93 93
            <span v-if="scope.row.is_edit ==1">否</span>   
94 94
          </template>
95
-       </el-table-column>
95
+       </el-table-column> -->
96 96
 
97 97
        <el-table-column label="批次" align="center">
98 98
          <template slot-scope="scope">

+ 2 - 2
src/xt_pages/stock/stockInOrderAdd.vue View File

@@ -101,7 +101,7 @@
101 101
             <template slot-scope="scope">
102 102
               <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
103 103
                             :rules='tableRules.warehousing_count' style="padding-top: 20px">
104
-                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count"  oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
104
+                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count"  oninput="value=value.replace(/\D|^0/g,'')"></el-input>
105 105
                   {{scope.row.min_unit}}
106 106
               </el-form-item>
107 107
             
@@ -167,7 +167,7 @@
167 167
             </template>
168 168
             <template slot-scope="scope">
169 169
               <el-form-item style="padding-top: 20px">
170
-                <el-input placeholder="请输入批号" v-model="scope.row.license_number" ></el-input>
170
+                <el-input placeholder="请输入批准文号" v-model="scope.row.license_number" ></el-input>
171 171
               </el-form-item>
172 172
             </template>
173 173
           </el-table-column>

+ 3 - 6
src/xt_pages/stock/stockInOrderEdit.vue View File

@@ -198,7 +198,7 @@
198 198
                 style="padding-top: 20px"
199 199
               >
200 200
                 <el-input
201
-                  oninput="value=value.replace(/[^0-9.]/g,'')"
201
+                  oninput="value=value.replace(/\D|^0/g,'')"
202 202
                   placeholder="请输入入库数量"
203 203
                   type="number"
204 204
                   v-model="scope.row.warehousing_count"
@@ -272,7 +272,7 @@
272 272
             <template slot-scope="scope">
273 273
               <el-form-item style="padding-top: 20px">
274 274
                 <el-input
275
-                  placeholder="请输入批号"
275
+                  placeholder="请输入批准文号"
276 276
                   v-model="scope.row.license_number"
277 277
                   
278 278
                 ></el-input>
@@ -525,7 +525,6 @@ export default {
525 525
       tempObj["remark"] = "";
526 526
       tempObj["dealer"] = "";
527 527
       tempObj["manufacturer"] = "";
528
-      tempObj["number"] = ""
529 528
       tempObj["license_number"] = ""
530 529
       this.recordInfo.recordData.push(tempObj);
531 530
     },
@@ -672,7 +671,7 @@ export default {
672 671
             stockIn: this.recordInfo.recordData
673 672
           };
674 673
           console.log("params2222",params)
675
-       
674
+        
676 675
           EditWarehouse(
677 676
             params,
678 677
             this.warehousing_time,
@@ -831,8 +830,6 @@ export default {
831 830
               this.numberList.push(val.xt_warehouse_info[j])
832 831
             }
833 832
             this.recordInfo.recordData[i].number = val.xt_warehouse_info[0].number
834
-          }else{
835
-            this.recordInfo.recordData[i].number = ""
836 833
           }
837 834
         }
838 835
      

+ 18 - 3
src/xt_pages/stock/stockOutOrder.vue View File

@@ -419,7 +419,8 @@
419 419
               <span>批次号</span>
420 420
             </template>
421 421
             <template slot-scope="scope">
422
-               {{scope.row.number}}
422
+               <!-- {{scope.row.number}} -->
423
+               {{getBatchNumber(scope.row.patient_id,scope.row.good_id)}}
423 424
             </template>
424 425
           </el-table-column>
425 426
           <el-table-column min-width="35" align="center">
@@ -633,7 +634,8 @@
633 634
               <span>批次号</span>
634 635
             </template>
635 636
             <template slot-scope="scope">
636
-              <span v-if="scope.row.is_total == 0">{{getNumber(scope.row.id)}}</span>
637
+              <!-- <span v-if="scope.row.is_total == 0">{{getNumber(scope.row.id)}}</span> -->
638
+               <span v-if="scope.row.is_total ==0">{{getBatchNumber(scope.row.patient_id,scope.row.good_id)}}</span>
637 639
             </template>
638 640
           </el-table-column>
639 641
 <!-- 
@@ -806,7 +808,8 @@ export default {
806 808
       warehouse_out_time:"",
807 809
       exportList:[],
808 810
       is_sys:0,
809
-      infoList:[]
811
+      infoList:[],
812
+      stockFlowList:[]
810 813
     };
811 814
   },
812 815
   methods: {
@@ -1533,6 +1536,9 @@ export default {
1533 1536
               var info = response.data.data.info
1534 1537
               this.infoList = info
1535 1538
               console.log("info列表22222222",info)
1539
+              var stockflowlist = response.data.data.stockFlowList
1540
+              console.log("stockflowlist",stockflowlist)
1541
+              this.stockFlowList = stockflowlist
1536 1542
               for (let i = 0; i < arrList.length; i++) {
1537 1543
                 var obj = arrList[i]
1538 1544
                 obj['is_total'] = 0
@@ -1657,6 +1663,15 @@ export default {
1657 1663
     formatJson(filterVal, jsonData) {
1658 1664
     return jsonData.map(v => filterVal.map(j => v[j]));
1659 1665
    },
1666
+   getBatchNumber(patient_id,good_id){
1667
+     var arr = []
1668
+     for(let i=0;i<this.stockFlowList.length;i++){
1669
+        if(patient_id == this.stockFlowList[i].patient_id && good_id == this.stockFlowList[i].good_id){
1670
+           arr.push(this.stockFlowList[i].number)
1671
+        }
1672
+     }
1673
+     return arr.join(',')
1674
+   }
1660 1675
   }
1661 1676
 };
1662 1677
 </script>

+ 1 - 0
src/xt_pages/stock/stockOutOrderAdd.vue View File

@@ -146,6 +146,7 @@
146 146
                 style="padding-top: 17px"
147 147
               >
148 148
                 <el-input
149
+                 oninput="value=value.replace(/\D|^0/g,'')"
149 150
                   placeholder="请输入出库数量"
150 151
                   type="number"
151 152
                   v-model="scope.row.count"

+ 1 - 1
src/xt_pages/stock/stockOutOrderEdit.vue View File

@@ -139,7 +139,7 @@
139 139
             <template slot-scope="scope">
140 140
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
141 141
                             style="padding-top: 17px">
142
-                <el-input type="number" v-model="scope.row.count"  :disabled="stockShow"></el-input>
142
+                <el-input type="number" v-model="scope.row.count"  :disabled="stockShow"   oninput="value=value.replace(/\D|^0/g,'')"></el-input>
143 143
               </el-form-item>
144 144
             </template>
145 145
           </el-table-column>

+ 4 - 2
src/xt_pages/upload/fast/FastProvince.vue View File

@@ -143,6 +143,7 @@
143 143
             <el-tab-pane label="抢救记录">
144 144
               <rescue-record :doctor_advices='doctor_advices' :patient='patient' :prescription='prescription'></rescue-record>
145 145
             </el-tab-pane>
146
+             
146 147
           </el-tabs>
147 148
         </div>
148 149
       </div>
@@ -160,7 +161,7 @@
160 161
   import dialysisParams from "../fast/dialysisParams"
161 162
   import dialysisSummary from "../fast/dialysisSummary"
162 163
   import rescueRecord from "../fast/rescueRecord"
163
-
164
+  
164 165
   import {
165 166
   getDialysisRecordInitData,
166 167
   getDialysisSchedules,
@@ -175,7 +176,8 @@ import { parseTime } from "@/utils";
175 176
       treatInfo,
176 177
       dialysisParams,
177 178
       dialysisSummary,
178
-      rescueRecord
179
+      rescueRecord,
180
+     
179 181
     },
180 182
     data() {
181 183
       return {

+ 7 - 1
src/xt_pages/user/components/PatientDetail.vue View File

@@ -955,6 +955,7 @@
955 955
               <div class="proj">
956 956
                 <span class="proj_title">日期:</span>
957 957
                 <!-- {{ getTime(patientPrint.created_time) }} -->
958
+                {{printDate}}
958 959
               </div>
959 960
               <div class="proj"><span class="proj_title">医生签名:</span></div>
960 961
             </div>
@@ -1134,7 +1135,7 @@ export default {
1134 1135
       patientID: 0,
1135 1136
       patientPrint: {},
1136 1137
       print_time: "",
1137
-
1138
+      printDate:"",
1138 1139
       rules: {
1139 1140
         contagions: [{ type: "array", required: false, trigger: "change" }],
1140 1141
         avatar: [{ required: true, message: "请上传头像", trigger: "blur" }],
@@ -1203,6 +1204,11 @@ export default {
1203 1204
     this.getZones();
1204 1205
     var ptime = Math.round(new Date().getTime() / 1000);
1205 1206
     // this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}');
1207
+
1208
+    var data = new Date();
1209
+    var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
1210
+    var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
1211
+    this.printDate = data.getFullYear() + "-" + month + "-" + date;
1206 1212
   },
1207 1213
   methods: {
1208 1214
     getTime(val) {