瀏覽代碼

11月14日 库存扣减更新

XMLWAN 3 年之前
父節點
當前提交
a3a7cb5589

+ 7 - 16
src/xt_pages/dialysis/dialysisDoctorAdvice.vue 查看文件

@@ -24,20 +24,6 @@
24 24
     </div>
25 25
     <div class="app-container">
26 26
       <div class="filter-container">
27
-       <!-- <el-autocomplete
28
-            style="margin:16px 5px"
29
-            popper-class="my-autocomplete"
30
-            v-model.trim="listQuery.keyword"
31
-            :fetch-suggestions="querySearchAsync"
32
-            :trigger-on-focus="false"
33
-            placeholder="病人名字"
34
-            @select="handleSelect"
35
-    >
36
-        <i class="el-icon-search el-input__icon" slot="suffix"> </i>
37
-        <template slot-scope="{ item }">
38
-            <div class="name">{{ item.name }}</div>
39
-        </template>
40
-     </el-autocomplete> -->
41 27
       <el-autocomplete
42 28
           class="checkSearch"
43 29
           popper-class="my-autocomplete"
@@ -52,7 +38,7 @@
52 38
             <div class="name">{{ item.name }}</div>
53 39
           </template>
54 40
        </el-autocomplete>
55
-       
41
+       <el-button type="primary" @click="toSeach">搜索</el-button>
56 42
       </div>
57 43
       <div class="cell clearfix">
58 44
         <label class="title">
@@ -433,6 +419,7 @@ export default {
433 419
       deliveryWay:[],
434 420
       delivery_way:0,
435 421
       patient_id:0,
422
+      org_id:0,
436 423
     };
437 424
   },
438 425
   created() {
@@ -454,6 +441,7 @@ export default {
454 441
     this.getTemplateInfo();
455 442
     this.requestSchedualDoctors(this.time)
456 443
     // this.template_id = this.$store.getters.xt_user.template_info.template_id;
444
+  
457 445
   },
458 446
   methods: {
459 447
     getTemplateInfo() {
@@ -1017,10 +1005,13 @@ export default {
1017 1005
         return searchArray
1018 1006
       },
1019 1007
      handleSelect(val) {
1020
-       console.log("val23323232322323",val.id)
1021 1008
        this.patient_id = val.id
1022 1009
        this.requestSchedualDoctors(this.time)
1023 1010
       },
1011
+     toSeach(){
1012
+       this.patient_id = 0
1013
+       this.requestSchedualDoctors(this.time)
1014
+     }
1024 1015
   },
1025 1016
   components: {
1026 1017
     BreadCrumb

+ 1 - 1
src/xt_pages/stock/cancelStockOrderAdd.vue 查看文件

@@ -283,7 +283,7 @@
283 283
 
284 284
 <script>
285 285
 import { uParseTime } from "@/utils/tools";
286
-import { getCancelStockConfig, postCancelStock,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList,getStockBatchNumber } from "@/api/stock";
286
+import { postCancelStock,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList,getStockBatchNumber } from "@/api/stock";
287 287
 import BreadCrumb from "../components/bread-crumb";
288 288
 import StockInDialog from './Dialog/stockInDialog'
289 289
 

+ 4 - 2
src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue 查看文件

@@ -427,7 +427,8 @@
427 427
           }
428 428
         }
429 429
         return name;
430
-      }, handleEdit: function(index, row) {
430
+      }, 
431
+      handleEdit: function(index, row) {
431 432
         this.canCelShow = false
432 433
         const tempObj = {}
433 434
         tempObj['id'] = 0
@@ -676,6 +677,7 @@
676 677
             return
677 678
          }
678 679
          this.getDrugBatchNumber(val.id)
680
+         console.log("val2323232323223",val)
679 681
          for(let i=0;i<this.recordInfo.recordData.length;i++){
680 682
            if(i == this.currentIndex){
681 683
              this.recordInfo.recordData[i].drug_id  = val.id
@@ -683,7 +685,7 @@
683 685
              this.recordInfo.recordData[i].drug_type = val.drug_type
684 686
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
685 687
              this.recordInfo.recordData[i].last_price = val.last_price
686
-             this.recordInfo.recordData[i].price = val.price
688
+             this.recordInfo.recordData[i].price = val.last_price
687 689
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
688 690
              this.recordInfo.recordData[i].number =  val.number
689 691
              this.recordInfo.recordData[i].max_unit = val.max_unit

+ 1 - 2
src/xt_pages/stock/drugs/drugDamaged.vue 查看文件

@@ -130,8 +130,7 @@
130 130
               </el-table-column>
131 131
               <el-table-column prop="address" label="损耗数量" align="center">
132 132
                 <template slot-scope="scope">
133
-                  <span v-if="scope.row.last_stock_max_number>0">{{scope.row.last_stock_max_number}}{{scope.row.warehousing_unit}}</span>
134
-                   <span v-if="scope.row.last_stock_min_number>0">{{scope.row.last_stock_min_number}}{{scope.row.min_unit}}</span>
133
+                  <span v-if="scope.row.count>0">{{scope.row.count}}{{scope.row.min_unit}}</span>
135 134
                 </template>
136 135
               </el-table-column>
137 136
               <el-table-column prop="address" label="药损比" align="center">

+ 2 - 3
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue 查看文件

@@ -557,6 +557,7 @@
557 557
               }
558 558
             }
559 559
             for(let i=0;i<this.recordInfo.recordData.length;i++){
560
+              this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
560 561
               if(this.recordInfo.recordData[i].dealer == ""){
561 562
                 this.recordInfo.recordData[i].dealer = 0
562 563
               }
@@ -585,7 +586,7 @@
585 586
             const params = {
586 587
               'stockOut': this.recordInfo.recordData
587 588
             }
588
-          
589
+            console.log("param23322323233222323",params)
589 590
           
590 591
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
591 592
               if (response.data.state == 0) {
@@ -645,7 +646,6 @@
645 646
                 response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
646 647
               }
647 648
               
648
-             
649 649
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
650 650
               response.data.data.list[i].retail_price = response.data.data.list[i].price.toString()
651 651
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
@@ -657,7 +657,6 @@
657 657
              
658 658
               response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{h}-{d}")
659 659
               response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{h}-{d}")
660
-              
661 660
               this.recordInfo.recordData.push(response.data.data.list[i])
662 661
             }
663 662
              for(let j=0;j<this.recordInfo.recordData.length;j++){

+ 1 - 0
src/xt_pages/stock/drugs/inventory.vue 查看文件

@@ -317,6 +317,7 @@ export default {
317 317
                         batch_number:item.batch_number,
318 318
                         expiry_date:item.expiry_date,
319 319
                         type:0,
320
+                        
320 321
                       }
321 322
                     }
322 323
                   })

+ 0 - 18
src/xt_pages/stock/drugs/inventoryDetails.vue 查看文件

@@ -2,24 +2,6 @@
2 2
     <div>
3 3
         <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
4 4
             <div>
5
-                <!-- 耗材类别:
6
-                <el-select v-model="value" size="small" placeholder="请选择">
7
-                    <el-option
8
-                    v-for="item in options"
9
-                    :key="item.value"
10
-                    :label="item.label"
11
-                    :value="item.value">
12
-                    </el-option>
13
-                </el-select>
14
-                停用状态:
15
-                <el-select v-model="value" size="small" placeholder="请选择">
16
-                    <el-option
17
-                    v-for="item in options"
18
-                    :key="item.value"
19
-                    :label="item.label"
20
-                    :value="item.value">
21
-                    </el-option>
22
-                </el-select> -->
23 5
                 <el-input
24 6
                 size="small"
25 7
                 style="width: 200px;margin-left:10px;"

+ 24 - 23
src/xt_pages/stock/inventory.vue 查看文件

@@ -62,13 +62,13 @@
62 62
                     {{scope.row.manufacturer_name}}
63 63
                   </template> 
64 64
               </el-table-column>
65
-              <el-table-column prop="name" label="盘点前数量" width="100"  align="center">
65
+              <el-table-column prop="name" label="盘点前数量" width="120"  align="center">
66 66
                 <template slot-scope="scope">
67 67
                     <span><el-input style="width:80px" v-model="scope.row.stock_count" :disabled="true"></el-input>{{scope.row.max_unit}}</span> 
68 68
                   </template> 
69 69
               </el-table-column>
70 70
 
71
-             <el-table-column prop="name" label="盘点后数量" width="100"  align="center">
71
+             <el-table-column prop="name" label="盘点后数量" width="120"  align="center">
72 72
                 <template slot-scope="scope">
73 73
                   <el-input style="width:80px" v-model="scope.row.last_stock_count"></el-input>
74 74
                  </template> 
@@ -272,27 +272,27 @@ export default {
272 272
           this.page = val
273 273
           this.getlist()
274 274
         },
275
-   getlist(){
276
-    var params = {
277
-          keyword:this.searchKey,
278
-          start_time:this.start_time,
279
-          end_time:this.end_time,
280
-          inventory_status:this.inventory_status, 
281
-          page:this.page,
282
-          limit:this.limit,
283
-         }
284
-        console.log("我爱你中国parasm",params)
285
-       getInventoryList(params).then(response=>{
286
-          if(response.data.state ==1 ){
287
-           var list =  response.data.data.list
288
-           console.log("列表23232323232",list)
289
-           this.tableList = list
290
-           var total = response.data.data.total
291
-           this.total = total
292
-           this.doctorList =  response.data.data.doctorlist
275
+    getlist(){
276
+      var params = {
277
+            keyword:this.searchKey,
278
+            start_time:this.start_time,
279
+            end_time:this.end_time,
280
+            inventory_status:this.inventory_status, 
281
+            page:this.page,
282
+            limit:this.limit,
293 283
           }
294
-       })
295
-     },
284
+          console.log("我爱你中国parasm",params)
285
+        getInventoryList(params).then(response=>{
286
+            if(response.data.state ==1 ){
287
+            var list =  response.data.data.list
288
+            console.log("列表23232323232",list)
289
+            this.tableList = list
290
+            var total = response.data.data.total
291
+            this.total = total
292
+            this.doctorList =  response.data.data.doctorlist
293
+            }
294
+        })
295
+      },
296 296
      getChecker(id){
297 297
        var name = ""
298 298
        for(let i=0;i<this.doctorList.length;i++){
@@ -452,12 +452,13 @@ export default {
452 452
           
453 453
             for(let i=0;i<this.WarehouseList.length;i++){
454 454
               for(let j=0;j<newList.length;j++){
455
-                if(this.WarehouseList[i].drug_id == newList[j].drug_id){
455
+                if(this.WarehouseList[i].good_id == newList[j].good_id){
456 456
                     newList[j].child.push(this.WarehouseList[i])
457 457
                 }
458 458
               }
459 459
             }
460 460
           console.log("newList2333232323232",newList)
461
+          
461 462
           this.tableData = newList
462 463
           this.showSearch = false
463 464
           this.showTable = true

+ 8 - 2
src/xt_pages/stock/inventoryDetails.vue 查看文件

@@ -117,8 +117,14 @@ export default {
117 117
            }
118 118
           this.$router.push({path:'/stock/inventoryDetailPrint?ids='+this.ids})
119 119
         },
120
-        handleSizeChange(){},
121
-        handleCurrentChange(){},
120
+        handleSizeChange(val){
121
+          this.limit = val
122
+          this.getlist()
123
+        },
124
+        handleCurrentChange(val){
125
+          this.page = val
126
+          this.getlist()
127
+        },
122 128
         getlist(){
123 129
          var params = {
124 130
             keyword:this.searchKey,

+ 42 - 10
src/xt_pages/stock/stockDamaged.vue 查看文件

@@ -14,10 +14,32 @@
14 14
         type="primary"
15 15
         icon="el-icon-search"
16 16
         @click="search">搜索</el-button>
17
+
18
+         <el-date-picker
19
+          size="small"
20
+          v-model="start_time"
21
+          type="date"
22
+          style="margin-left:5px;width:140px;"
23
+          placeholder="选择日期"
24
+          @change="changeStartTime">
25
+          </el-date-picker>
26
+          <el-date-picker
27
+          size="small"
28
+          v-model="end_time"
29
+          type="date"
30
+          style="margin-left:5px;width:140px;"
31
+          placeholder="选择日期"
32
+          @change="changeEndTime">
33
+      </el-date-picker>
17 34
     </div>
18 35
   
19
-    <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }" @selection-change="changePrice">
36
+    <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
20 37
         <el-table-column type="selection" width="55" align="center"> </el-table-column>
38
+        <el-table-column  prop="date" label="报损日期" align="center">
39
+            <template slot-scope="scope">
40
+              {{getTime(scope.row.ctime)}}
41
+            </template>
42
+        </el-table-column>
21 43
         <el-table-column prop="date" label="耗材名称"  align="center">
22 44
           <template  slot-scope="scope">
23 45
             {{scope.row.good_name}}
@@ -276,7 +298,7 @@
276 298
             </el-col>
277 299
             <el-col :span="8">
278 300
               <el-form-item label="原因:">
279
-                  <el-select v-model="form.type" placeholder="请选择">
301
+                  <el-select v-model="form.type" placeholder="请选择" @change="changeReason">
280 302
                       <el-option
281 303
                         v-for="item in reasonList"
282 304
                         :key="item.id"
@@ -730,6 +752,9 @@ export default {
730 752
           }
731 753
         }
732 754
         return count
755
+      },
756
+      changeReason(){
757
+
733 758
       },
734 759
       toDamagedDetail(good_id){
735 760
           var params = {
@@ -737,18 +762,25 @@ export default {
737 762
             warehousing_order:this.form.warehousing_order,
738 763
             type:this.form.type,
739 764
           }
765
+          console.log("para2233232",params)
740 766
          getDamageDetailByGoodId(params).then(response=>{
741 767
             if(response.data.state == 1){
742 768
               var list = response.data.data.list
743 769
               console.log("list233232",list)
744
-              this.modifyDialogVisible = true
745
-              this.good_name = list[0].good_name
746
-              this.price = list[0].buy_price
747
-              this.good_id = list[0].good_id
748
-              this.goodList = []
749
-              this.goodList = list
750
-              this.damageList = []
751
-              this.damageList = response.data.data.damageList
770
+              if (list.length>0){
771
+                this.modifyDialogVisible = true
772
+                this.good_name = list[0].good_name
773
+                this.price = list[0].buy_price
774
+                this.good_id = list[0].good_id
775
+                this.goodList = []
776
+                this.goodList = list
777
+                this.damageList = []
778
+                this.damageList = response.data.data.damageList
779
+              }else{
780
+                this.damageList = []
781
+                this.goodList = []
782
+              }
783
+            
752 784
             }
753 785
          })
754 786
       },

+ 9 - 8
src/xt_pages/user/doctorAdvice.vue 查看文件

@@ -159,19 +159,19 @@
159 159
           </template>
160 160
         </el-table-column>
161 161
 
162
+     、
163
+        
162 164
         <el-table-column
163
-          label="开始时间"
165
+          label="开时间"
164 166
           width="180"
165
-          property="start_time"
167
+          property="created_time"
166 168
           align="center"
167 169
         >
168 170
           <template slot-scope="scope">
169
-            <span>{{
170
-              scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}")
171
-            }}</span>
171
+            <span v-if="org_id == 10215">{{ scope.row.created_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
172
+            <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
172 173
           </template>
173 174
         </el-table-column>
174
-
175 175
         <el-table-column
176 176
           label="医嘱内容"
177 177
           property="advice_name"
@@ -2159,7 +2159,8 @@ export default {
2159 2159
       current_drug_name:"",
2160 2160
       current_drug_spec: "",
2161 2161
       drug_id: 0,
2162
-      src_type:""
2162
+      src_type:"",
2163
+      org_id:0,
2163 2164
     };
2164 2165
   },
2165 2166
   methods: {
@@ -4644,7 +4645,7 @@ export default {
4644 4645
       this.$router.push("/patients/patients");
4645 4646
     }
4646 4647
     this.listQuery.id = this.patientID;
4647
-
4648
+    this.org_id = this.$store.getters.xt_user.template_info.org_id
4648 4649
     // var nowDate = new Date()
4649 4650
     // var nowYear = nowDate.getFullYear()
4650 4651
     // var nowMonth = nowDate.getMonth() + 1

+ 2 - 0
src/xt_pages/workforce/template.vue 查看文件

@@ -370,6 +370,8 @@
370 370
         for (let key in results[0]) {
371 371
           headers.push(key)
372 372
         }
373
+        console.log("hhh2332323232",this.template_mode.mode)
374
+        console.log("result233232233223232323",results)
373 375
         if (this.template_mode.mode == 1) {
374 376
           if(results.length > 0) {
375 377