Просмотр исходного кода

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

see999 3 лет назад
Родитель
Сommit
203b528e71

+ 8 - 0
src/api/drug/drug.js Просмотреть файл

@@ -459,3 +459,11 @@ export function SaveDrugProofInventory(params) {
459 459
     params: params
460 460
   })
461 461
 }
462
+
463
+export function getDrugWarehouseInfoTotal(params) {
464
+  return request({
465
+    url: '/api/drug/getdrugwarehouseinfototal',
466
+    method: 'Get',
467
+    params: params
468
+  })
469
+}

+ 3 - 3
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Просмотреть файл

@@ -151,7 +151,7 @@
151 151
                                                     </div>
152 152
                                                     </el-tab-pane>
153 153
 
154
-                                                    
154
+
155 155
 
156 156
                                                     <prescription-table ref="prescription_tables"
157 157
                                                                         :prescription="items.curPrescriptions"></prescription-table>
@@ -979,7 +979,7 @@
979 979
             }
980 980
           })
981 981
         } else {
982
-          if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
982
+          if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138 ||this.$store.getters.xt_user.org_id == 10088) {
983 983
             axios.get('http://127.0.0.1:9532/api/register/get', {
984 984
               params: forms,
985 985
               headers: {
@@ -2096,7 +2096,7 @@
2096 2096
             })
2097 2097
           }
2098 2098
         } else if (index == 6) {
2099
-          if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10028) {
2099
+          if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10088) {
2100 2100
             this.$refs.register9504.show()
2101 2101
           } else {
2102 2102
             this.$refs.register.show()

+ 0 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Просмотреть файл

@@ -1376,7 +1376,6 @@
1376 1376
                     medical_code: prescription.project[b].project.medical_code,
1377 1377
                     unit: prescription.project[b].project.unit,
1378 1378
                     type: prescription.project[b].type,
1379
-                    groupno: prescription.advices[b].groupno
1380 1379
 
1381 1380
                   }
1382 1381
 

+ 2 - 4
src/xt_pages/outpatientRegistration/index.vue Просмотреть файл

@@ -959,7 +959,6 @@
959 959
           this.is_Name = true
960 960
           return
961 961
         }
962
-
963 962
         if (this.form.sex == '') {
964 963
           this.$message.error('患者性别不能为空')
965 964
         }
@@ -1543,8 +1542,7 @@
1543 1542
 
1544 1543
           }
1545 1544
         }
1546
-      }
1547
-      ,
1545
+      },
1548 1546
       changeName(id) {
1549 1547
         this.form.sex = ''
1550 1548
         this.form.age = ''
@@ -1583,7 +1581,7 @@
1583 1581
 
1584 1582
     },
1585 1583
     created() {
1586
-      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
1584
+      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10088) {
1587 1585
         this.form.certificates = 2
1588 1586
         this.form.id_card_type = 1
1589 1587
         this.form.settlementValue = 1

+ 12 - 10
src/xt_pages/stock/detail/stockOutDetail.vue Просмотреть файл

@@ -268,7 +268,8 @@ export default {
268 268
       stockTotal:[],
269 269
       goodInfoData:[],
270 270
       orgId:"",
271
-      tableData:[]
271
+      tableData:[],
272
+      tableOut:[],
272 273
     };
273 274
   },
274 275
   methods: {
@@ -755,19 +756,20 @@ export default {
755 756
       },
756 757
 
757 758
     exportList(){
758
-       for(let i=0;i<this.tableData.length;i++){
759
-        this.tableData[i].index = i+1
760
-        this.tableData[i].good_name = this.tableData[i].good_name
761
-        this.tableData[i].specification_name = this.tableData[i].specification_name
762
-        this.tableData[i].packing_unit = this.tableData[i].packing_unit
763
-        this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].packing_price).toFixed(2)
764
-        this.tableData[i].out_count = this.getStockCount(this.tableData[i].good_id)
759
+       console.log("表格",this.tableOut)
760
+       for(let i=0;i<this.tableOut.length;i++){
761
+        this.tableOut[i].index = i+1
762
+        this.tableOut[i].good_name = this.tableOut[i].good_name
763
+        this.tableOut[i].specification_name = this.tableOut[i].specification_name
764
+        this.tableOut[i].packing_unit = this.tableOut[i].packing_unit
765
+        this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].packing_price).toFixed(2)
766
+        this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
765 767
        }
766 768
        import('@/vendor/Export2Excel').then(excel => {
767 769
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
768 770
        const filterVal = ['index','good_name', 'specification_name', 'packing_unit','out_count','packing_price','total_price','remark']
769 771
 
770
-       const data = this.formatJson(filterVal, this.tableData)
772
+       const data = this.formatJson(filterVal, this.tableOut)
771 773
        console.log("data",data)
772 774
        
773 775
         excel.export_json_to_excel({
@@ -808,7 +810,7 @@ export default {
808 810
         if(response.data.state == 1){
809 811
           var list = response.data.data.list
810 812
           console.log("出库单详单",list)
811
-          this.tableData = list
813
+          this.tableOut = list
812 814
           var stockTotal = response.data.data.stockTotal
813 815
           this.stockTotal = stockTotal
814 816
         }

+ 169 - 60
src/xt_pages/stock/drugs/drugDamaged.vue Просмотреть файл

@@ -41,8 +41,8 @@
41 41
             <div>
42 42
                 <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
43 43
                 <el-button size="small" type="primary" @click="toCheck">核对</el-button>
44
-                <el-button size="small" type="primary" @click="print">打印</el-button>
45
-                <el-button size="small" type="primary">导出</el-button>
44
+                <!-- <el-button size="small" type="primary" @click="print">打印</el-button>
45
+                <el-button size="small" type="primary">导出</el-button> -->
46 46
             </div>
47 47
         </div>
48 48
         <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"  @selection-change="changePrice">
@@ -57,6 +57,16 @@
57 57
                   {{getTime(scope.row.start_time)}}
58 58
                 </template>
59 59
             </el-table-column>
60
+            <el-table-column prop="name" label="药品名称" align="center">
61
+               <template slot-scope="scope">
62
+                  {{scope.row.drug_name}}
63
+                </template>
64
+            </el-table-column>
65
+            <el-table-column prop="name" label="规格" align="center">
66
+               <template slot-scope="scope">
67
+                  {{scope.row.specification_name}}
68
+                </template>
69
+            </el-table-column>
60 70
             <el-table-column prop="name" label="报损数量" align="center">
61 71
                <template slot-scope="scope">
62 72
                   {{scope.row.count}}
@@ -83,7 +93,7 @@
83 93
                 <span v-if="scope.row.checker_status == 2">未核对</span>
84 94
               </template>   
85 95
             </el-table-column>
86
-            <el-table-column label="操作" align="center">
96
+            <el-table-column label="操作" align="center" width="200">
87 97
                 <template slot-scope="scope">
88 98
                   <el-button type="primary" size="small" @click="moDrugDamage(scope.row.id,scope.row.checker_status)">编辑</el-button>
89 99
                   <el-button type="danger" size="small" @click="deleteDrugDamage(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
@@ -102,12 +112,12 @@
102 112
         </el-pagination>
103 113
     </div>
104 114
     <el-dialog
105
-        title="库房报损"
115
+        title="药品报损"
106 116
         :visible.sync="dialogVisible"
107 117
         width="1200px">
108 118
         <el-form :model="form" class="modifyDialog" label-width="120px">
109 119
             <el-form-item label="药品ID">
110
-                <el-input v-model="form.drug_id"></el-input>
120
+                <el-input v-model="form.drug_id" :disabled="true"></el-input>
111 121
             </el-form-item>
112 122
             <el-form-item label="药品名称">
113 123
               <el-autocomplete
@@ -119,7 +129,7 @@
119 129
                   placeholder="请输入药品名称"
120 130
                   @select="handleSelect"
121 131
                   @input="changeGoodName(scope.$index)"
122
-                  style="width:160px;"
132
+                  style="width:260px;"
123 133
                   >
124 134
                   <i class="el-icon-search el-input__icon" slot="suffix"></i>
125 135
                   <template slot-scope="{ item }">
@@ -140,36 +150,28 @@
140 150
             </el-form-item>
141 151
          
142 152
             <el-form-item label="单位">
143
-                <el-input v-model="form.warehousing_unit"></el-input>
144
-              <!-- <el-select v-model="scope.row.warehousing_unit" filterable placeholder="请选择单位" style="width:80px">
145
-                <el-option
146
-                  v-for="(option, index) in unitList"
147
-                  :key="index"
148
-                  :label="option.name"
149
-                  :value="option.name">
150
-                </el-option>
151
-              </el-select> -->
153
+                <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
152 154
             </el-form-item>
153 155
             <el-form-item label="进货价">
154
-                <el-input v-model="form.last_price"></el-input>
156
+                <el-input v-model="form.last_price" :disabled="true"></el-input>
155 157
             </el-form-item>
156 158
             <el-form-item label="零售价">
157
-                <el-input v-model="form.retail_price"></el-input>
159
+                <el-input v-model="form.retail_price" :disabled="true"></el-input>
158 160
             </el-form-item>
159 161
             <el-form-item label="报损数量">
160 162
                 <el-input v-model="form.count"></el-input>
161 163
             </el-form-item>
162 164
             <el-form-item label="库存">
163
-                <el-input v-model="form.total" :disabled="true"></el-input>
165
+                <el-input v-model="form.total" :disabled="true" ></el-input>
164 166
             </el-form-item>
165 167
             <el-form-item label="产地">
166
-                <el-input v-model="form.drug_origin_place"></el-input>
168
+                <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
167 169
             </el-form-item>
168 170
             <el-form-item label="批准文号">
169
-                <el-input v-model="form.number"></el-input>
171
+                <el-input v-model="form.number" :disabled="true"></el-input>
170 172
             </el-form-item>
171 173
             <el-form-item label="生产厂商">
172
-                <el-input v-model="form.manufacturer"></el-input>
174
+                <el-input v-model="form.manufacturer" :disabled="true"></el-input>
173 175
             </el-form-item>
174 176
             <el-form-item label="备注">
175 177
                 <div style="display:flex;">
@@ -214,11 +216,7 @@
214 216
                 {{scope.row.retail_price}}
215 217
               </template>
216 218
             </el-table-column>
217
-            <!-- <el-table-column prop="name" label="新零售价" width="100" align="center">
218
-                <template slot-scope="scope">
219
-                {{scope.row.new_price}}
220
-               </template>
221
-            </el-table-column> -->
219
+        
222 220
             <el-table-column  prop="name"  label="生产厂商"  width="100" align="center">
223 221
               <template slot-scope="scope">
224 222
                 {{scope.row.manufacturer}}
@@ -245,7 +243,7 @@
245 243
             label="操作">
246 244
                 <template slot-scope="scope">
247 245
                     <el-button type="text" size="small" @click="toDel(scope.$index)">删除</el-button>
248
-                    <el-button type="text" size="small" @click="toEdit(scope.row)">编辑</el-button>
246
+                    <el-button type="text" size="small" @click="toEdit(scope.row,scope.$index)">编辑</el-button>
249 247
                 </template>
250 248
             </el-table-column>
251 249
         </el-table>
@@ -257,7 +255,7 @@
257 255
    
258 256
 
259 257
     <el-dialog
260
-        title="耗材盘点核对"
258
+        title="药品盘点核对"
261 259
         :visible.sync="checkDialogVisible"
262 260
         width="30%"
263 261
         >
@@ -305,7 +303,7 @@
305 303
         width="1200px">
306 304
         <el-form :model="form" class="modifyDialog" label-width="120px">
307 305
             <el-form-item label="药品ID">
308
-                <el-input v-model="form.drug_id"></el-input>
306
+                <el-input v-model="form.drug_id" :disabled="true"></el-input>
309 307
             </el-form-item>
310 308
             <el-form-item label="药品名称">
311 309
             <el-autocomplete
@@ -325,37 +323,46 @@
325 323
                 </template>
326 324
                 </el-autocomplete>  
327 325
             </el-form-item>
328
-            <!-- <el-form-item label="规格">
329
-                <el-input v-model="form.name"></el-input>
330
-            </el-form-item> -->
326
+            <el-form-item label="批次">
327
+               <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
328
+                  <el-option
329
+                    v-for="(item,index) in numberList"
330
+                    :key="index"
331
+                    :label="item.batch_number"
332
+                    :value="item.id">
333
+                  </el-option>
334
+               </el-select>
335
+            </el-form-item>
336
+            <el-form-item label="规格">
337
+                <el-input v-model="form.specification_name" :disabled="true"></el-input>
338
+            </el-form-item>
331 339
             <el-form-item label="单位">
332
-                <el-input v-model="form.warehousing_unit"></el-input>
340
+                <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
333 341
             </el-form-item>
334 342
             <el-form-item label="进货价">
335
-                <el-input v-model="form.last_price"></el-input>
343
+                <el-input v-model="form.last_price" :disabled="true"></el-input>
336 344
             </el-form-item>
337 345
             <el-form-item label="零售价">
338
-                <el-input v-model="form.retail_price"></el-input>
346
+                <el-input v-model="form.retail_price" :disabled="true"></el-input>
339 347
             </el-form-item>
340 348
             <el-form-item label="报损数量">
341 349
                 <el-input v-model="form.count"></el-input>
342 350
             </el-form-item>
343 351
             <el-form-item label="库存">
344
-                <el-input v-model="form.total"></el-input>
352
+                <el-input v-model="form.total" :disabled="true"></el-input>
345 353
             </el-form-item>
346 354
             <el-form-item label="产地">
347
-                <el-input v-model="form.drug_origin_place"></el-input>
355
+                <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
348 356
             </el-form-item>
349 357
             <el-form-item label="批准文号">
350
-                <el-input v-model="form.number"></el-input>
358
+                <el-input v-model="form.number" :disabled="true"></el-input>
351 359
             </el-form-item>
352 360
             <el-form-item label="生产厂商">
353
-                <el-input v-model="form.manufacturer"></el-input>
361
+                <el-input v-model="form.manufacturer" :disabled="true"></el-input>
354 362
             </el-form-item>
355 363
             <el-form-item label="备注">
356 364
                 <div style="display:flex;">
357 365
                     <el-input v-model="form.remark"></el-input>
358
-                    <el-button style="margin-left:5px;" type="primary" @click="addPrice">添加</el-button>
359 366
                 </div>
360 367
             </el-form-item>
361 368
         </el-form>
@@ -373,7 +380,7 @@
373 380
         width="1200px">
374 381
         <el-form :model="form" class="modifyDialog" label-width="120px">
375 382
             <el-form-item label="药品ID">
376
-                <el-input v-model="form.drug_id"></el-input>
383
+                <el-input v-model="form.drug_id" :disabled="true"></el-input>
377 384
             </el-form-item>
378 385
             <el-form-item label="药品名称">
379 386
             <el-autocomplete
@@ -397,33 +404,32 @@
397 404
                 <el-input v-model="form.name"></el-input>
398 405
             </el-form-item> -->
399 406
             <el-form-item label="单位">
400
-                <el-input v-model="form.warehousing_unit"></el-input>
407
+                <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
401 408
             </el-form-item>
402 409
             <el-form-item label="进货价">
403
-                <el-input v-model="form.last_price"></el-input>
410
+                <el-input v-model="form.last_price" :disabled="true"></el-input>
404 411
             </el-form-item>
405 412
             <el-form-item label="零售价">
406
-                <el-input v-model="form.retail_price"></el-input>
413
+                <el-input v-model="form.retail_price" :disabled="true"></el-input>
407 414
             </el-form-item>
408 415
             <el-form-item label="报损数量">
409 416
                 <el-input v-model="form.count"></el-input>
410 417
             </el-form-item>
411 418
             <el-form-item label="库存">
412
-                <el-input v-model="form.total"></el-input>
419
+                <el-input v-model="form.total" :disabled="true"></el-input>
413 420
             </el-form-item>
414 421
             <el-form-item label="产地">
415
-                <el-input v-model="form.drug_origin_place"></el-input>
422
+                <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
416 423
             </el-form-item>
417 424
             <el-form-item label="批准文号">
418
-                <el-input v-model="form.number"></el-input>
425
+                <el-input v-model="form.number" :disabled="true"></el-input>
419 426
             </el-form-item>
420 427
             <el-form-item label="生产厂商">
421
-                <el-input v-model="form.manufacturer"></el-input>
428
+                <el-input v-model="form.manufacturer" :disabled="true"></el-input>
422 429
             </el-form-item>
423 430
             <el-form-item label="备注">
424 431
                 <div style="display:flex;">
425 432
                     <el-input v-model="form.remark"></el-input>
426
-                    <el-button style="margin-left:5px;" type="primary" @click="addPrice">添加</el-button>
427 433
                 </div>
428 434
             </el-form-item>
429 435
         </el-form>
@@ -439,9 +445,10 @@
439 445
 
440 446
 <script>
441 447
 import BreadCrumb from "../../components/bread-crumb";
442
-import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage,getDrugWarehouseInfoList } from "@/api/drug/drug"
448
+import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage,getDrugWarehouseInfoList,getDrugWarehouseInfoTotal } from "@/api/drug/drug"
443 449
 import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
444 450
 import { uParseTime } from '@/utils/tools'
451
+import { getDataConfig } from '@/utils/data'
445 452
 export default {
446 453
     name: "stockModifyPrice",
447 454
     components:{
@@ -488,6 +495,8 @@ export default {
488 495
                 warehouse_info_id:"",
489 496
                 expiry_date:"",
490 497
                 product_date:"",
498
+                stock_max_number:"",
499
+                stock_min_number:"",
491 500
             },
492 501
             drugList:[],
493 502
             manufacturerList:[],
@@ -508,11 +517,14 @@ export default {
508 517
             modifyDialogVisible:false,
509 518
             id:"",
510 519
             numberList:[],
520
+            index:0,
521
+            unitList:[],
511 522
         }
512 523
     },
513 524
     methods:{
525
+      
514 526
         search(){
515
-
527
+          this.getlist()
516 528
         },
517 529
         print(){
518 530
           if(this.ids == ""){
@@ -596,14 +608,17 @@ export default {
596 608
                 this.form.dealer = val.dealer
597 609
                 this.form.manufacturer = val.manufacturer
598 610
                 this.form.remark = val.remark
599
-                this.form.warehousing_unit = val.max_unit  
600
-                this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
601
-                this.form.batch_number = val.batch_number
611
+                this.form.warehousing_unit = val.max_unit 
612
+                this.form.total = "" 
613
+                // this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
614
+                // this.form.batch_number = val.batch_number
602 615
                 this.form.last_price = val.last_price
603 616
                 this.form.expiry_date = val.expiry_date
604 617
                 this.form.product_date = val.product_date
605 618
                 this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
606 619
                 this.form.drug_origin_place = val.drug_origin_place
620
+                this.form.batch_number = ""
621
+                this.form.total = ""
607 622
              }
608 623
            }) 
609 624
         },
@@ -629,6 +644,7 @@ export default {
629 644
         changeNumber(val){
630 645
           console.log("val",val)
631 646
           this.form.warehousing_info_id = val
647
+          this.getDrugWarehouseInfoTotal(val)
632 648
         },
633 649
         getDrugBatchNumber(id){
634 650
             var params = {
@@ -653,6 +669,19 @@ export default {
653 669
          }
654 670
         },
655 671
         addPrice(){
672
+          console.log("批次号",this.form.batch_number)
673
+          if(this.form.drug_name == ""){
674
+             this.$message.error("请输入药品名称")
675
+             return
676
+          }
677
+          if(this.form.batch_number == ""){
678
+            this.$message.error("请选择批次号")
679
+            return false
680
+          }
681
+          if(this.form.count == ""){
682
+             this.$message.error("请输入报损数量")
683
+             return false
684
+          }
656 685
           var obj = {
657 686
             drug_id:this.form.drug_id,
658 687
             drug_name:this.form.drug_name,
@@ -674,7 +703,10 @@ export default {
674 703
             specification_name:this.form.specification_name,
675 704
             drug_origin_place:this.form.drug_origin_place,
676 705
             warehousing_info_id:this.form.warehousing_info_id,
677
-            batch_number:this.form.batch_number
706
+            batch_number:this.form.batch_number,
707
+            stock_max_number:this.form.stock_max_number,
708
+            stock_min_number:this.form.stock_min_number,
709
+            total:this.form.total,
678 710
           } 
679 711
           this.tableData.push(obj)   
680 712
           this.form.drug_name = ""
@@ -694,15 +726,25 @@ export default {
694 726
           this.form.product_date = ""
695 727
           this.form.specification_name = ""
696 728
           this.form.drug_origin_place = "" 
729
+          this.form.total = ""
697 730
         },
698 731
         saveDrugDamage(){
699
-          console.log("hhhh",this.tableData)
700
-          console.log("oooo",this.numberList)
732
+        
701 733
           for(let i=0;i<this.tableData.length;i++){
702 734
               this.tableData[i].retail_price = this.tableData[i].retail_price.toString()
703 735
               this.tableData[i].last_price = this.tableData[i].last_price.toString()
704 736
               this.tableData[i].new_price = this.tableData[i].new_price.toString()
705 737
               this.tableData[i].count =  parseInt(this.tableData[i].count)
738
+              if(this.tableData[i].stock_max_number == ""){
739
+                this.tableData[i].stock_max_number = 0
740
+              }else{
741
+                this.tableData[i].stock_max_number = parseInt(this.tableData[i].stock_max_number)
742
+              }
743
+              if(this.tableData[i].stock_min_number == ""){
744
+                this.tableData[i].stock_min_number = 0
745
+              }else{
746
+                this.tableData[i].stock_min_number = parseInt(this.tableData[i].stock_min_number)
747
+              }
706 748
               if(this.tableData[i].expiry_date == undefined){
707 749
                 this.tableData[i].expiry_date  = 0
708 750
               }else{
@@ -723,7 +765,7 @@ export default {
723 765
             tableData:this.tableData,
724 766
           }
725 767
           console.log("parasm222",params)
726
- 
768
+   
727 769
         saveDrugDamage(params).then(response=>{
728 770
             if(response.data.state == 1){
729 771
             var msg =  response.data.data.msg
@@ -741,6 +783,7 @@ export default {
741 783
           page:this.page, 
742 784
           start_time:this.start_time,
743 785
           end_time:this.end_time,
786
+          keyword:this.searchKey,
744 787
         }
745 788
         getDrugDamageList(params).then(response=>{
746 789
            if(response.data.state == 1){
@@ -798,7 +841,8 @@ export default {
798 841
      toDel(index){
799 842
        this.tableList.splice(index,1)
800 843
      },
801
-     toEdit(val){
844
+     toEdit(val,index){
845
+       this.index = index
802 846
        this.form.drug_name = val.drug_name
803 847
        this.form.drug_origin_place = val.drug_origin_place
804 848
        this.form.last_price = val.last_price
@@ -810,6 +854,10 @@ export default {
810 854
        this.form.remark = val.remark
811 855
        this.form.id = val.id
812 856
        this.form.count = val.count
857
+       this.form.specification_name = val.specification_name
858
+       this.form.warehousing_unit = val.warehousing_unit
859
+       this.form.stock_max_number = val.stock_max_number
860
+       this.form.stock_min_number = val.stock_min_number,
813 861
        this.editDialogVisible = true
814 862
      },
815 863
      EditDrugDamage(){
@@ -823,6 +871,24 @@ export default {
823 871
             this.tableData[i].retail_price = this.form.retail_price
824 872
             this.tableData[i].remark = this.form.remark
825 873
             this.tableData[i].count = this.form.count
874
+            this.tableData[i].stock_max_number = this.form.stock_max_number
875
+            this.tableData[i].stock_min_number = this.form.stock_min_number
876
+            this.tableData[i].manufacturer = this.form.manufacturer
877
+            this.tableData[i].dealer = this.form.dealer
878
+          }
879
+          if(this.index == i){
880
+            this.tableData[i].drug_name = this.form.drug_name
881
+            this.tableData[i].drug_origin_place = this.form.drug_origin_place
882
+            this.tableData[i].last_price = this.form.last_price
883
+            this.tableData[i].new_price = this.form.new_price
884
+            this.tableData[i].number = this.form.number
885
+            this.tableData[i].retail_price = this.form.retail_price
886
+            this.tableData[i].remark = this.form.remark
887
+            this.tableData[i].count = this.form.count
888
+            this.tableData[i].stock_max_number = this.form.stock_max_number
889
+            this.tableData[i].stock_min_number = this.form.stock_min_number
890
+            this.tableData[i].manufacturer = this.form.manufacturer
891
+            this.tableData[i].dealer = this.form.dealer
826 892
           }
827 893
        }
828 894
        this.editDialogVisible = false
@@ -844,6 +910,7 @@ export default {
844 910
        getDrugDamageDetail(id).then(response=>{
845 911
          if(response.data.state ==1){
846 912
            var detail = response.data.data.detail
913
+           console.log("系准给",detail)
847 914
            this.form.drug_id = detail.drug_id
848 915
            this.form.drug_name = detail.drug_name
849 916
            this.form.drug_origin_place = detail.drug_origin_place
@@ -855,12 +922,26 @@ export default {
855 922
            this.form.remark = detail.remark
856 923
            this.form.count = detail.count
857 924
            this.id = detail.id
858
-           this.form.warehousing_unit = detail.warehouseing_unit
925
+           this.form.warehousing_unit = detail.warehousing_unit
926
+           this.form.stock_max_number = detail.stock_max_number
927
+           this.form.stock_min_number = detail.stock_min_number
928
+           this.form.total = detail.total
929
+           this.form.warehousing_info_id = detail.warehousing_info_id
859 930
            this.modifyDialogVisible = true
860 931
          }
861 932
        })
862 933
      },
863 934
      modifyDrugDamage(){
935
+       if(this.form.stock_max_number == ""){
936
+         this.form.stock_max_number = 0
937
+       }else{
938
+         this.form.stock_max_number = parseInt(this.form.stock_max_number)
939
+       }
940
+       if(this.form.stock_min_number == ""){
941
+         this.form.stock_min_number = 0
942
+       }else{
943
+         this.form.stock_min_number = parseInt(this.form.stock_min_number)
944
+       }
864 945
          var params = {
865 946
            drug_id:this.form.drug_id,
866 947
            drug_name:this.form.drug_name,
@@ -874,6 +955,9 @@ export default {
874 955
            count:parseInt(this.form.count),
875 956
            warehousing_unit:this.form.warehousing_unit,
876 957
            id:this.id,
958
+           total:this.form.total,
959
+           stock_max_number:this.form.stock_max_number,
960
+           stock_min_number:this.form.stock_min_number,
877 961
          }
878 962
        modifyDrugDamage(params).then(response=>{
879 963
           if(response.data.state == 1){
@@ -916,9 +1000,34 @@ export default {
916 1000
      changeEndTime(val){
917 1001
        this.end_time = this.getTime(val)
918 1002
        this.getlist()
1003
+     },
1004
+     getDrugWarehouseInfoTotal(val){
1005
+        var params = {
1006
+          id:val,
1007
+        }
1008
+      getDrugWarehouseInfoTotal(params).then(response=>{
1009
+         if(response.data.state == 1){
1010
+           var list = response.data.data.list
1011
+           console.log("list",list)
1012
+          //  this.form.total = list.stock_max_number + list.XtBaseDrug.max_unit + list.stock_min_number + list.XtBaseDrug.min_unit
1013
+          if(list.stock_max_number > 0){
1014
+            this.form.total = list.stock_max_number + list.XtBaseDrug.max_unit
1015
+            this.form.stock_max_number = list.stock_max_number
1016
+          }
1017
+          if(list.stock_min_number >0 ){
1018
+            this.form.total = list.stock_min_number + list.XtBaseDrug.min_unit
1019
+            this.form.stock_min_number = list.stock_min_number
1020
+          }
1021
+          
1022
+         }
1023
+      })
1024
+     },
1025
+     changeMaxUnit(){
1026
+
919 1027
      }
920 1028
     },
921 1029
     created(){
1030
+     
922 1031
       this.getlist()
923 1032
     },
924 1033
     mounted() {

+ 3 - 1
src/xt_pages/stock/drugs/drugStockFlow.vue Просмотреть файл

@@ -68,6 +68,7 @@
68 68
              <span v-if="scope.row.consumable_type == 2">手动出库</span>
69 69
              <span v-if="scope.row.consumable_type == 3">自动出库</span>
70 70
              <span v-if="scope.row.consumable_type == 4">手动退库</span>
71
+             <span v-if="scope.row.consumable_type == 5">报损数量</span>
71 72
            </template>
72 73
         </el-table-column>
73 74
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
@@ -75,6 +76,7 @@
75 76
              <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
76 77
               <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>
77 78
               <span v-if="scope.row.consumable_type == 4">{{scope.row.cancel_order_number}}</span>
79
+              <span v-if="scope.row.consumable_type == 5">{{scope.row.cancel_order_number}}</span>
78 80
            </template>
79 81
         </el-table-column>
80 82
         <el-table-column prop="drug_name" label="操作日期" align="center">
@@ -88,7 +90,7 @@
88 90
              <span v-if="scope.row.consumable_type == 2">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
89 91
              <span v-if="scope.row.consumable_type == 3">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
90 92
              <span v-if="scope.row.consumable_type == 4">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
91
-            
93
+             <span v-if="scope.row.consumable_type == 5">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
92 94
            </template>
93 95
         </el-table-column>
94 96
        

+ 150 - 30
src/xt_pages/stock/drugs/inventory.vue Просмотреть файл

@@ -53,6 +53,16 @@
53 53
                   {{getTime(scope.row.start_time)}}
54 54
                 </template>
55 55
             </el-table-column>
56
+            <el-table-column prop="date" label="药品名称" align="center">
57
+                <template slot-scope="scope">
58
+                  {{scope.row.drug_name}}
59
+                </template>
60
+            </el-table-column>
61
+            <el-table-column prop="date" label="药品规格" align="center">
62
+                <template slot-scope="scope">
63
+                  {{scope.row.specification_name}}
64
+                </template>
65
+            </el-table-column>
56 66
             <el-table-column prop="name" label="盘点数量" align="center">
57 67
                 <template slot-scope="scope">
58 68
                   {{scope.row.count}}
@@ -82,7 +92,6 @@
82 92
             <el-table-column label="操作" align="center" width="260">
83 93
                 <template slot-scope="scope">
84 94
                   <el-button type="primary" size="small" @click="editInventory(scope.row.id,scope.row.checker_status,scope.$index)">编辑</el-button>
85
-                  <el-button type="primary" size="small" @click="toProof(scope.row.id)">校正</el-button>
86 95
                   <el-button type="danger" size="small" @click="deleteDrugInventory(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
87 96
                  
88 97
                 </template>
@@ -100,12 +109,12 @@
100 109
         >
101 110
         </el-pagination>
102 111
         <el-dialog
103
-        title="库房调价"
112
+        title="药品盘点"
104 113
         :visible.sync="dialogVisible"
105 114
         width="1200px">
106 115
             <el-form :model="form" class="modifyDialog" label-width="120px">
107
-                <el-form-item label="耗材ID">
108
-                    <el-input v-model="form.drug_id"></el-input>
116
+                <el-form-item label="药品ID">
117
+                    <el-input v-model="form.drug_id" :disabled="true"></el-input>
109 118
                 </el-form-item>
110 119
                 <el-form-item label="药品名称">
111 120
                   <el-autocomplete
@@ -138,14 +147,24 @@
138 147
                 <el-form-item label="规格">
139 148
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
140 149
                 </el-form-item>
141
-                <el-form-item label="单位">
142
-                    <el-input v-model="form.warehousing_unit"></el-input>
150
+                <!-- <el-form-item label="单位">
151
+                    <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
152
+                </el-form-item> -->
153
+                 <el-form-item prop="max_unit" label="单位">
154
+                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
155
+                      <el-option
156
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
157
+                        :key="index"
158
+                        :label="item.name"
159
+                        :value="item.name">
160
+                      </el-option>
161
+                    </el-select>
143 162
                 </el-form-item>
144 163
                 <el-form-item label="进货价">
145
-                    <el-input v-model="form.last_price"></el-input>
164
+                    <el-input v-model="form.last_price" :disabled="true"></el-input>
146 165
                 </el-form-item>
147 166
                 <el-form-item label="零售价">
148
-                    <el-input v-model="form.retail_price"></el-input>
167
+                    <el-input v-model="form.retail_price" :disabled="true"></el-input>
149 168
                 </el-form-item>
150 169
                 <el-form-item label="盘点数量">
151 170
                     <el-input v-model="form.count"></el-input>
@@ -154,13 +173,13 @@
154 173
                     <el-input v-model="form.total" :disabled="true"></el-input>
155 174
                 </el-form-item>
156 175
                 <el-form-item label="产地">
157
-                    <el-input v-model="form.drug_origin_place"></el-input>
176
+                    <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
158 177
                 </el-form-item>
159 178
                 <el-form-item label="批准文号">
160
-                    <el-input v-model="form.number"></el-input>
179
+                    <el-input v-model="form.number" :disabled="true"></el-input>
161 180
                 </el-form-item>
162 181
                 <el-form-item label="生产厂商">
163
-                    <el-input v-model="form.manufacturer"></el-input>
182
+                    <el-input v-model="form.manufacturer" :disabled="true"></el-input>
164 183
                 </el-form-item>
165 184
                 <el-form-item label="备注">
166 185
                     <div style="display:flex;">
@@ -231,7 +250,7 @@
231 250
                 width="100"
232 251
                 label="操作">
233 252
                     <template slot-scope="scope">
234
-                        <el-button type="text" size="small" @click="toEdit(scope.row)">编辑</el-button>
253
+                        <el-button type="text" size="small" @click="toEdit(scope.row,scope.$index)">编辑</el-button>
235 254
                         <el-button type="text" size="small" @click="toDelete(scope.$index)">删除</el-button>
236 255
                        
237 256
                     </template>
@@ -273,8 +292,28 @@
273 292
                 <el-form-item label="规格">
274 293
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
275 294
                 </el-form-item>
276
-                <el-form-item label="单位">
295
+               <el-form-item label="批次">
296
+                  <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
297
+                      <el-option
298
+                        v-for="(item,index) in numberList"
299
+                        :key="index"
300
+                        :label="item.batch_number"
301
+                        :value="item.id">
302
+                      </el-option>
303
+                  </el-select>
304
+                </el-form-item>
305
+                <!-- <el-form-item label="单位">
277 306
                     <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
307
+                </el-form-item> -->
308
+               <el-form-item prop="warehousing_unit" label="单位">
309
+                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
310
+                      <el-option
311
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
312
+                        :key="index"
313
+                        :label="item.name"
314
+                        :value="item.name">
315
+                      </el-option>
316
+                    </el-select>
278 317
                 </el-form-item>
279 318
                 <el-form-item label="进货价">
280 319
                     <el-input v-model="form.last_price" :disabled="true"></el-input>
@@ -381,14 +420,24 @@
381 420
                 <el-form-item label="规格">
382 421
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
383 422
                 </el-form-item>
384
-                <el-form-item label="单位">
385
-                    <el-input v-model="form.warehousing_unit"></el-input>
423
+                <!-- <el-form-item label="单位">
424
+                    <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
425
+                </el-form-item> -->
426
+                <el-form-item prop="warehousing_unit" label="单位">
427
+                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
428
+                      <el-option
429
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
430
+                        :key="index"
431
+                        :label="item.name"
432
+                        :value="item.name">
433
+                      </el-option>
434
+                    </el-select>
386 435
                 </el-form-item>
387 436
                 <el-form-item label="进货价">
388
-                    <el-input v-model="form.last_price"></el-input>
437
+                    <el-input v-model="form.last_price" :disabled="true"></el-input>
389 438
                 </el-form-item>
390 439
                 <el-form-item label="零售价">
391
-                    <el-input v-model="form.retail_price"></el-input>
440
+                    <el-input v-model="form.retail_price" :disabled="true"></el-input>
392 441
                 </el-form-item>
393 442
                 <el-form-item label="盘点数量">
394 443
                     <el-input v-model="form.count"></el-input>
@@ -397,13 +446,13 @@
397 446
                     <el-input v-model="form.total" :disabled="true"></el-input>
398 447
                 </el-form-item>
399 448
                 <el-form-item label="产地">
400
-                    <el-input v-model="form.drug_origin_place"></el-input>
449
+                    <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
401 450
                 </el-form-item>
402 451
                 <el-form-item label="批准文号">
403
-                    <el-input v-model="form.number"></el-input>
452
+                    <el-input v-model="form.number" :disabled="true"></el-input>
404 453
                 </el-form-item>
405 454
                 <el-form-item label="生产厂商">
406
-                    <el-input v-model="form.manufacturer"></el-input>
455
+                    <el-input v-model="form.manufacturer" :disabled="true"></el-input>
407 456
                 </el-form-item>
408 457
                 <el-form-item label="备注">
409 458
                     <div style="display:flex;">
@@ -441,8 +490,18 @@
441 490
                   </template>
442 491
                  </el-autocomplete>  
443 492
                 </el-form-item>
444
-                <el-form-item label="单位">
493
+                <!-- <el-form-item label="单位">
445 494
                     <el-input v-model="form.warehousing_unit"></el-input>
495
+                </el-form-item> -->
496
+                <el-form-item prop="warehousing_unit" label="单位">
497
+                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
498
+                      <el-option
499
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
500
+                        :key="index"
501
+                        :label="item.name"
502
+                        :value="item.name">
503
+                      </el-option>
504
+                    </el-select>
446 505
                 </el-form-item>
447 506
                 <el-form-item label="盘点数量">
448 507
                     <el-input v-model="form.count"></el-input>
@@ -471,8 +530,9 @@
471 530
 
472 531
 <script>
473 532
 import { uParseTime } from '@/utils/tools'
474
-import { postSearchDrugWarehouseList,getDrugWarehouseInfoList,saveDrugInventory,getDrugInventoryList,SaveDrugCheckedInventory,getDrugInventoryDetail,modifyInventory,SaveDrugProofInventory} from "@/api/drug/drug"
533
+import { postSearchDrugWarehouseList,getDrugWarehouseInfoList,saveDrugInventory,getDrugInventoryList,SaveDrugCheckedInventory,getDrugInventoryDetail,modifyInventory,SaveDrugProofInventory,getDrugWarehouseInfoTotal} from "@/api/drug/drug"
475 534
 import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
535
+import { getDataConfig } from '@/utils/data'
476 536
 export default {
477 537
     name: "drugInventory",
478 538
     data() {
@@ -529,11 +589,14 @@ export default {
529 589
             modifydialogVisible:false,
530 590
             numberList:[],
531 591
             profdialogVisible:false,
592
+            index:"",
593
+            unitList:[],
532 594
         }
533 595
     },
534 596
     methods:{
535 597
         changeNumber(val){
536 598
           this.form.warehouse_info_id = val
599
+          this.getDrugWarehouseInfoTotal(val)
537 600
         },
538 601
         search(){
539 602
           this.getlist()
@@ -620,7 +683,8 @@ export default {
620 683
                 this.form.manufacturer = val.manufacturer
621 684
                 this.form.remark = val.remark
622 685
                 this.form.warehousing_unit = val.max_unit  
623
-                this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
686
+                this.form.total = ""
687
+                // this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
624 688
                 this.form.batch_number = val.batch_number
625 689
                 this.form.last_price = val.last_price
626 690
                 this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
@@ -705,8 +769,7 @@ export default {
705 769
         toDelete(index){
706 770
           this.tableData.splice(index,1)
707 771
         },
708
-        toEdit(val){
709
-            console.log("val2323223",val)
772
+        toEdit(val,index){
710 773
            this.form.id= val.id
711 774
            this.form.drug_id = val.drug_id,
712 775
            this.form.drug_name = val.drug_name
@@ -724,7 +787,7 @@ export default {
724 787
            this.form.expiry_date = val.expiry_date
725 788
            this.form.product_date =val.product_date  
726 789
            this.form.count = val.count
727
-          
790
+           this.index = index
728 791
            this.editdialogVisible = true
729 792
         },
730 793
         saveInventory(){
@@ -747,6 +810,24 @@ export default {
747 810
                this.tableData[i].product_date = this.form.product_date
748 811
                this.tableData[i].count =this.form.count
749 812
              }
813
+            if(this.index == i){
814
+               this.tableData[i].drug_id = this.form.drug_id
815
+               this.tableData[i].drug_name = this.form.drug_name
816
+               this.tableData[i].retail_price = this.form.retail_price
817
+               this.tableData[i].warehousing_order = this.form.warehousing_order
818
+               this.tableData[i].number = this.form.number
819
+               this.tableData[i].dealer = this.form.dealer
820
+               this.tableData[i].manufacturer = this.form.manufacturer
821
+               this.tableData[i].remark = this.form.remark
822
+               this.tableData[i].warehouseing_unit = this.form.warehousing_unit
823
+               this.tableData[i].total = this.form.total
824
+               this.tableData[i].batch_number = this.form.batch_number
825
+               this.tableData[i].last_price = this.form.last_price
826
+               this.tableData[i].specification_name = this.form.specification_name
827
+               this.tableData[i].expiry_date = this.form.expiry_date
828
+               this.tableData[i].product_date = this.form.product_date
829
+               this.tableData[i].count =this.form.count
830
+             }
750 831
           }   
751 832
           this.editdialogVisible = false
752 833
         },
@@ -864,6 +945,7 @@ export default {
864 945
        getDrugInventoryDetail(id).then(response=>{
865 946
          if(response.data.state == 1){
866 947
             var detail = response.data.data.detail
948
+            console.log("detial2323223",detail)
867 949
             this.id = detail.id
868 950
             this.form.drug_id = detail.drug_id
869 951
             this.form.drug_name = detail.drug_name
@@ -878,9 +960,12 @@ export default {
878 960
             this.form.total = detail.total
879 961
         
880 962
             this.form.last_price = detail.last_price
881
-          
963
+           
882 964
             this.form.count =  parseInt(detail.count)
883 965
             this.form.drug_origin_place = detail.drug_origin_place
966
+            this.form.stock_max_number = detail.stock_max_number
967
+            this.form.stock_min_number = detail.stock_min_number
968
+            this.form.warehouse_info_id = detail.warehouse_info_id
884 969
             this.modifydialogVisible = true
885 970
          }
886 971
        })
@@ -891,7 +976,7 @@ export default {
891 976
           drug_id:this.form.drug_id,
892 977
           drug_name:this.form.drug_name,
893 978
           specification_name:this.form.specification_name,
894
-          warehousing_unit:this.form.warehouseing_unit,
979
+          warehousing_unit:this.form.warehousing_unit,
895 980
           last_price:this.form.last_price,
896 981
           retail_price:this.form.retail_price,
897 982
           count:this.form.count,
@@ -900,7 +985,12 @@ export default {
900 985
           batch_number:this.form.batch_number,
901 986
           manufacturer:this.form.manufacturer,
902 987
           remark:this.form.remark,
988
+          stock_max_number:this.form.stock_max_number,
989
+          stock_min_number:this.form.stock_min_number,
990
+          warehouse_info_id:this.form.warehouse_info_id,
903 991
        }
992
+       console.log("params2222",params)
993
+      
904 994
       modifyInventory(params).then(response=>{
905 995
          if(response.data.state == 1){
906 996
            var inventory =  response.data.data.inventory
@@ -933,7 +1023,7 @@ export default {
933 1023
           this.loading = false
934 1024
         });   
935 1025
      },
936
-       exportList(){
1026
+    exportList(){
937 1027
        
938 1028
          import('@/vendor/Export2Excel').then(excel => {
939 1029
          const tHeader = ['药品名称', '规格', '单位','零售价','当前库存','盘点数','亏损金额']
@@ -1013,9 +1103,39 @@ export default {
1013 1103
        changeEndTime(val){
1014 1104
          this.end_time = this.getTime(val)
1015 1105
          this.getlist()
1016
-       }
1106
+       },
1107
+      getDrugWarehouseInfoTotal(val){
1108
+        var params = {
1109
+          id:val,
1110
+        }
1111
+      getDrugWarehouseInfoTotal(params).then(response=>{
1112
+         if(response.data.state == 1){
1113
+           var list = response.data.data.list
1114
+           console.log("list",list)
1115
+        
1116
+          if(list.stock_max_number > 0){
1117
+            this.form.total = list.stock_max_number + list.XtBaseDrug.max_unit
1118
+            this.form.stock_max_number = list.stock_max_number
1119
+          }
1120
+          if(list.stock_min_number >0 ){
1121
+            this.form.total = list.stock_min_number + list.XtBaseDrug.min_unit
1122
+            this.form.stock_min_number = list.stock_min_number
1123
+          }
1124
+          
1125
+         }
1126
+      })
1127
+     },
1128
+     getDataConfig(module, filed_name) {
1129
+       return getDataConfig(module, filed_name)
1130
+      },  
1131
+    changeMaxUnit(val){
1132
+      console.log("val23232",val)
1133
+      this.form.warehousing_unit = val
1134
+    }
1017 1135
     },
1018 1136
     created(){
1137
+      this.unitList =  this.getDataConfig('hemodialysis','units')
1138
+      console.log("单位",this.unitList)
1019 1139
       this.getlist()
1020 1140
     },
1021 1141
     mounted() {

+ 0 - 1
src/xt_pages/stock/stockModifyPrice.vue Просмотреть файл

@@ -727,7 +727,6 @@ export default {
727 727
     
728 728
      },
729 729
      SaveCheckedPrice(){
730
-       
731 730
          var params = {
732 731
             ids:this.ids,
733 732
             check_time:this.getTime(this.check_time),

+ 28 - 21
src/xt_pages/stock/stockQuery.vue Просмотреть файл

@@ -109,13 +109,15 @@
109 109
        </el-table-column>
110 110
        <el-table-column label="出库数量" align="center">
111 111
          <template slot-scope="scope">
112
-            <span v-if="getWareInfo(scope.row.xt_warehouse_info)>0">{{getWareInfo(scope.row.xt_warehouse_info) - getOverplus(scope.row.xt_warehouse_info) - getCancelInfo(scope.row.cancel_stock_info)}}{{scope.row.packing_unit}}</span>
112
+            {{getAutoCount(scope.row.id) + getOutCount(scope.row.id)}}
113
+            <!-- <span v-if="getWareInfo(scope.row.xt_warehouse_info)>0">{{getWareInfo(scope.row.xt_warehouse_info) - getOverplus(scope.row.xt_warehouse_info) - getCancelInfo(scope.row.cancel_stock_info)}}{{scope.row.packing_unit}}</span> -->
113 114
          </template>
114 115
        </el-table-column>
115 116
 
116 117
        <el-table-column label="剩余库存量" align="center">
117 118
          <template slot-scope="scope">
118
-           <span v-if="getOverplus(scope.row.xt_warehouse_info)>0">{{getOverplus(scope.row.xt_warehouse_info)}}{{scope.row.packing_unit}}</span>
119
+          <span v-if="getWareInfo(scope.row.xt_warehouse_info) > 0">{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span> 
120
+           <!-- <span v-if="getOverplus(scope.row.xt_warehouse_info)>0">{{getOverplus(scope.row.xt_warehouse_info)}}{{scope.row.packing_unit}}</span> -->
119 121
          </template>
120 122
        </el-table-column>
121 123
        <el-table-column label="操作" align="center" width="260px">
@@ -179,16 +181,11 @@ export default {
179 181
     nowYear = nowDate.getFullYear();
180 182
     nowMonth = nowDate.getMonth() + 1;
181 183
     nowDay = nowDate.getDate();
182
-    this.start_time =
183
-      nowYear +
184
-      "-" +
185
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
186
-      "-" +
187
-      (nowDay < 10 ? "0" + nowDay : nowDay);
184
+    this.start_time = nowYear +"-" +(nowMonth < 10 ? "0" + nowMonth : nowMonth) +"-" +(nowDay < 10 ? "0" + nowDay : nowDay);
188 185
     this.GetAllGoodInfo();
189 186
     this.GetAllGoodType();
190 187
     this.getlist()
191
-    // this.getStockDrugCount()
188
+    this.getStockDrugCount()
192 189
   },
193 190
   components: {
194 191
     BreadCrumb
@@ -324,6 +321,7 @@ export default {
324 321
       this.limit = val;
325 322
 
326 323
       this.getlist()
324
+      
327 325
     },
328 326
     handleCurrentChange(val) {
329 327
       this.page = val;
@@ -341,6 +339,8 @@ export default {
341 339
       } else {
342 340
         this.start_time = val
343 341
          this.getlist()
342
+         this.getStockDrugCount()
343
+
344 344
       }
345 345
     },
346 346
     endTimeChange: function(val) {
@@ -351,6 +351,7 @@ export default {
351 351
       } else {
352 352
         this.end_time = val
353 353
          this.getlist()
354
+         this.getStockDrugCount()
354 355
       }
355 356
 
356 357
     },
@@ -403,9 +404,15 @@ export default {
403 404
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
404 405
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
405 406
            this.tableList[i].inCount =  this.getWareInfo(this.tableList[i].xt_warehouse_info)
406
-        
407
-          this.tableList[i].outCount = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getOverplus(this.tableList[i].xt_warehouse_info) - this.getCancelInfo(this.tableList[i].cancel_stock_info)
408
-          this.tableList[i].overplus = this.getOverplus(this.tableList[i].xt_warehouse_info)
407
+          this.tableList[i].outCount =  this.getAutoCount(this.tableList[i].id) + this.getOutCount(this.tableList[i].id)
408
+          // this.tableList[i].outCount = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getOverplus(this.tableList[i].xt_warehouse_info) - this.getCancelInfo(this.tableList[i].cancel_stock_info)
409
+          // this.tableList[i].overplus = this.getOverplus(this.tableList[i].xt_warehouse_info)
410
+          if(this.getWareInfo(this.tableList[i].xt_warehouse_info) > 0){
411
+            this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
412
+          }else{
413
+             this.tableList[i].overplus = 0
414
+          }
415
+          
409 416
          }
410 417
          console.log("table",this.tableList)
411 418
          const data = this.formatJson(filterVal, this.tableList)
@@ -510,24 +517,24 @@ export default {
510 517
     },
511 518
     getStockDrugCount(){
512 519
         var params ={
513
-          keywords: this.$route.query.keywords,
514
-          start_time:this.$route.query.start_time,
515
-          end_time:this.$route.query.end_time,
520
+           keywords: this.$route.query.keywords,
521
+           start_time:this.start_time,
522
+           end_time:this.end_time,
516 523
         }
517 524
       getStockDrugCount(params).then(response=>{
518 525
          if(response.data.state == 1){
519
-           var count = response.data.data.count
520
-           console.log("入库统计",count)
521
-           this.countList = count
526
+          //  var count = response.data.data.count
527
+          //  console.log("入库统计",count)
528
+          //  this.countList = count
522 529
            var outlist = response.data.data.outList
523 530
            console.log("出库数量",outlist)
524 531
            this.outCountList = outlist
525 532
            var autoCount = response.data.data.autoCount
526 533
            console.log("autoCount",autoCount)
527 534
            this.autoCountList = autoCount
528
-           var totalCount = response.data.data.totalCount
529
-           console.log("totalcount",totalCount)
530
-           this.cancelCountList = totalCount
535
+          //  var totalCount = response.data.data.totalCount
536
+          //  console.log("totalcount",totalCount)
537
+          //  this.cancelCountList = totalCount
531 538
          }
532 539
       })
533 540
     },

+ 49 - 9
src/xt_pages/user/templateSummary.vue Просмотреть файл

@@ -126,7 +126,7 @@
126 126
                 <el-row :gutter="24">
127 127
                   <el-col :span="20">
128 128
                     <el-form-item label="阶段小结名称:">
129
-                      <el-input v-model="form.title"></el-input>
129
+                      <el-input v-model="form.title" style="width:200px"></el-input>
130 130
                     </el-form-item>
131 131
                   </el-col>
132 132
                 </el-row>
@@ -308,7 +308,7 @@
308 308
                      <keep-alive>
309 309
                         <editor ref="edit_neditor"
310 310
                                 id="edit_editor1"
311
-                                style="width: 800px"
311
+                                style="width: 1200px"
312 312
                                 v-bind:r_content="form.template_summary_content">
313 313
                         </editor>
314 314
                     </keep-alive>
@@ -400,7 +400,7 @@
400 400
                 <el-row :gutter="24">
401 401
                   <el-col :span="20">
402 402
                     <el-form-item label="阶段小结名称:">
403
-                      <el-input v-model="form.title"></el-input>
403
+                      <el-input v-model="form.title" style="width:200px"></el-input>
404 404
                     </el-form-item>
405 405
                   </el-col>
406 406
                 </el-row>
@@ -580,7 +580,7 @@
580 580
                        <keep-alive>
581 581
                         <editor ref="edit_neditor"
582 582
                                 id="edit_editor2"
583
-                                style="width: 800px"
583
+                                style="width: 1200px"
584 584
                                 v-bind:r_content="form.template_summary_content">
585 585
                         </editor>
586 586
                       </keep-alive>
@@ -672,7 +672,7 @@
672 672
               <el-form-item>
673 673
                 <span>选择检验检查时间:</span>
674 674
                 <div>
675
-                  <el-form-item
675
+                  <!-- <el-form-item
676 676
                    label="时间:"
677 677
                    prop="startYear"
678 678
                    style="width:100%;"
@@ -686,6 +686,16 @@
686 686
                     format="yyyy-MM"
687 687
                     value-format="yyyy-MM">
688 688
 	               </el-date-picker>
689
+                 </el-form-item> -->
690
+                 <el-form-item>
691
+                    <el-select v-model="quartype" placeholder="请选择" @change="changetype">
692
+                      <el-option
693
+                        v-for="item in quarterType"
694
+                        :key="item.id"
695
+                        :label="item.name"
696
+                        :value="item.id">
697
+                      </el-option>
698
+                    </el-select>
689 699
                  </el-form-item>
690 700
                  <!-- <el-form-item  label="月份:"
691 701
                    prop="startYear"
@@ -939,9 +949,17 @@
939 949
         end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
940 950
         ids:"",
941 951
         lastYear:new moment().subtract(1,'months').date(1).format("YYYY-MM-DD"),
952
+       quarterType: [
953
+        { id: 1, name: "第一季度"},
954
+        { id: 2,  name: "第二季度"},
955
+        { id: 3, name: "第三季度"},
956
+        { id: 4, name: "第四季度"}
957
+       ],
958
+       quartype:1,
942 959
       }
943 960
     },
944 961
     created() {
962
+     
945 963
       console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
946 964
       this.patient_id = this.$route.params && this.$route.params.id
947 965
       var now = new Date()
@@ -1162,14 +1180,36 @@
1162 1180
 
1163 1181
         this.dialogVisibleInspection = true
1164 1182
       },
1165
-
1183
+      changetype(){
1184
+        this.getInspectionMajor()
1185
+      },
1166 1186
       //获取大项数据来源
1167 1187
       getInspectionMajor(){
1168
-          console.log("start_year",this.startYear)
1188
+          console.log("type23232232",this.quartype)
1189
+          var start_time = ""
1190
+          var end_time = ""
1191
+          if(this.quartype == 1){
1192
+             start_time =  moment().startOf('year').format('YYYY-MM-DD')
1193
+             end_time = moment().month(2).endOf('month').format("YYYY-MM-DD")
1194
+          }
1195
+          if(this.quartype == 2){
1196
+            start_time = moment().month(3).startOf('month').format("YYYY-MM-DD")   
1197
+            end_time = moment().month(5).endOf('month').format("YYYY-MM-DD")
1198
+          }
1199
+          if(this.quartype == 3){
1200
+            start_time = moment().month(6).startOf('month').format("YYYY-MM-DD")
1201
+            end_time = moment().month(8).endOf('month').format("YYYY-MM-DD")
1202
+          }
1203
+          if(this.quartype == 4){
1204
+             start_time = moment().month(8).startOf('month').format("YYYY-MM-DD")
1205
+             end_time = moment().month(11).endOf('month').format("YYYY-MM-DD")
1206
+          }
1207
+          console.log("start_time",start_time)
1208
+          console.log("end_time",end_time)
1169 1209
           var params = {
1170
-            other_start_time:this.startYear,
1210
+            other_start_time:end_time,
1171 1211
             patient_id:this.patient_id,
1172
-            last_time:this.lastYear,
1212
+            last_time:start_time,
1173 1213
           }
1174 1214
          console.log("开始数据",params)
1175 1215
         getInspectionMajorItem(params).then(response=>{