소스 검색

11月14日 库存扣减更新

XMLWAN 3 년 전
부모
커밋
76a25267fc

+ 2 - 1
src/xt_pages/stock/cancelStockOrderEdit.vue 파일 보기

240
 <script>
240
 <script>
241
   import { uParseTime } from '@/utils/tools'
241
   import { uParseTime } from '@/utils/tools'
242
 
242
 
243
-  import { deleteCancelStockInfo, editCancelStockInfo, getCancelStockConfig, getCancelStockInfo,GetAllGoodInfoByID,GetAllConfig,postSearchGoodList,getStockBatchNumber  } from '@/api/stock'
243
+  import { deleteCancelStockInfo, editCancelStockInfo, getCancelStockInfo,GetAllGoodInfoByID,GetAllConfig,postSearchGoodList,getStockBatchNumber  } from '@/api/stock'
244
   import BreadCrumb from '../components/bread-crumb'
244
   import BreadCrumb from '../components/bread-crumb'
245
   import StockInDialog from './Dialog/stockInDialog'
245
   import StockInDialog from './Dialog/stockInDialog'
246
 
246
 
615
           this.manufacturerList = response.data.data.manufacturerList
615
           this.manufacturerList = response.data.data.manufacturerList
616
           this.dealerList = []
616
           this.dealerList = []
617
           this.dealerList = response.data.data.dealerList
617
           this.dealerList = response.data.data.dealerList
618
+          console.log("供应商2332322332232323232323",this.dealerList)
618
 
619
 
619
         })
620
         })
620
       },changeManufacturer(val) {
621
       },changeManufacturer(val) {

+ 5 - 3
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue 파일 보기

64
           max-height="450"
64
           max-height="450"
65
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
65
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
66
         >
66
         >
67
-          <el-table-column align="center" width="200" fixed="left">
67
+         <el-table-column align="center" width="200" fixed="left">
68
             <template slot="header" slot-scope="scope">
68
             <template slot="header" slot-scope="scope">
69
               <span>药品名称<span style="color: red">*</span></span>
69
               <span>药品名称<span style="color: red">*</span></span>
70
             </template>
70
             </template>
80
                     placeholder="请输入药品名称"
80
                     placeholder="请输入药品名称"
81
                     @select="handleSelect"
81
                     @select="handleSelect"
82
                     @input="changeDrugName(scope.$index)"
82
                     @input="changeDrugName(scope.$index)"
83
-                    style="width:160px;"
83
+                    style="width:250px;"
84
                   >
84
                   >
85
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
85
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
86
                   <template slot-scope="{ item }">
86
                   <template slot-scope="{ item }">
90
               </el-form-item>
90
               </el-form-item>
91
             </template>
91
             </template>
92
           </el-table-column>
92
           </el-table-column>
93
+
94
+
93
           <el-table-column align="center" width="140">
95
           <el-table-column align="center" width="140">
94
             <template slot="header" slot-scope="scope">
96
             <template slot="header" slot-scope="scope">
95
               <span>规格&单位</span>
97
               <span>规格&单位</span>
315
     return {
317
     return {
316
       crumbs: [
318
       crumbs: [
317
         { path: false, name: "库存管理" },
319
         { path: false, name: "库存管理" },
318
-        { path: false, name: "耗材退库单" },
320
+        { path: false, name: "药品退库单" },
319
         { path: false, name: "新增退库单" }
321
         { path: false, name: "新增退库单" }
320
       ],
322
       ],
321
       crumbs2: [
323
       crumbs2: [

+ 19 - 2
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue 파일 보기

164
               </el-form-item>
164
               </el-form-item>
165
             </template>
165
             </template>
166
           </el-table-column>
166
           </el-table-column>
167
-          <el-table-column align="center" width="140">
167
+          <el-table-column align="center" width="150">
168
+          <template slot="header" slot-scope="scope" >
169
+                <span >批号<span style="color: red">*</span></span>
170
+            </template>
171
+              <template slot-scope="scope">
172
+                <el-form-item style="padding-top: 20px" :rules="tableRules.batch_number"  :prop="'recordData.' + scope.$index + '.batch_number'">
173
+                  <el-input
174
+                    placeholder="请输入批号"
175
+                    v-model="scope.row.batch_number"
176
+                  ></el-input>
177
+                </el-form-item>
178
+              </template>
179
+         </el-table-column>
180
+          <!-- <el-table-column align="center" width="140">
168
             <template slot="header" slot-scope="scope" >
181
             <template slot="header" slot-scope="scope" >
169
               <span>批号</span>
182
               <span>批号</span>
170
               </template>
183
               </template>
176
                     ></el-input>
189
                     ></el-input>
177
                   </el-form-item>
190
                   </el-form-item>
178
                 </template>
191
                 </template>
179
-          </el-table-column>
192
+          </el-table-column> -->
180
                    
193
                    
181
          <el-table-column align="center" width="120">
194
          <el-table-column align="center" width="120">
182
             <template slot="header" slot-scope="scope">
195
             <template slot="header" slot-scope="scope">
413
         expiry_date:[
426
         expiry_date:[
414
          {required:true,message:'有效日期不能为空',trigger:'blur'}
427
          {required:true,message:'有效日期不能为空',trigger:'blur'}
415
         ],
428
         ],
429
+        batch_number:[
430
+          {required:true,message:'批号不能为空',trigger:'blur'}
431
+        ],
416
       },
432
       },
417
 
433
 
418
       total: "",
434
       total: "",
729
           console.log("000000000000",response.data.data.info)
745
           console.log("000000000000",response.data.data.info)
730
           this.manufacturerList = manufacturerList
746
           this.manufacturerList = manufacturerList
731
           var dealerList  = response.data.data.dealerList
747
           var dealerList  = response.data.data.dealerList
748
+          console.log("供应商232322332322332232323",this.dealerList)
732
           this.dealerList = dealerList
749
           this.dealerList = dealerList
733
           for (let i = 0; i < response.data.data.info.length; i++) {
750
           for (let i = 0; i < response.data.data.info.length; i++) {
734
             response.data.data.info[i].product_date = this.getTime(
751
             response.data.data.info[i].product_date = this.getTime(

+ 3 - 3
src/xt_pages/stock/drugs/query.vue 파일 보기

107
         </el-table-column>
107
         </el-table-column>
108
         <el-table-column prop="drug_name" label="入库数量" align="center">
108
         <el-table-column prop="drug_name" label="入库数量" align="center">
109
            <template slot-scope="scope">
109
            <template slot-scope="scope">
110
-            <span v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">{{getWarehoseInfo(scope.row.drug_warehouse_info)}}{{scope.row.max_unit}}</span>
110
+            <span v-if="getWarehoseInfo(scope.row.drug_warehouse_info)>0">{{getWarehoseInfo(scope.row.drug_warehouse_info)}}{{scope.row.max_unit}}</span>
111
            </template>
111
            </template>
112
         </el-table-column>
112
         </el-table-column>
113
         <el-table-column prop="drug_name" label="出库数量" align="center" v-if="showOne">
113
         <el-table-column prop="drug_name" label="出库数量" align="center" v-if="showOne">
128
         
128
         
129
         <el-table-column prop="drug_name" label="剩余库存量" align="center" v-if="showThree">
129
         <el-table-column prop="drug_name" label="剩余库存量" align="center" v-if="showThree">
130
            <template slot-scope="scope">
130
            <template slot-scope="scope">
131
-            <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
131
+            <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)>0">
132
                 {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
132
                 {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
133
             </div>
133
             </div>
134
            </template>
134
            </template>
135
         </el-table-column>
135
         </el-table-column>
136
         <el-table-column prop="drug_name" label="剩余库存量" align="center" v-if="showFour">
136
         <el-table-column prop="drug_name" label="剩余库存量" align="center" v-if="showFour">
137
            <template slot-scope="scope">
137
            <template slot-scope="scope">
138
-            <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
138
+            <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info) >0">
139
                <span>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span>         
139
                <span>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span>         
140
             </div>
140
             </div>
141
            </template>
141
            </template>

+ 3 - 3
src/xt_pages/stock/stockQuery.vue 파일 보기

512
       getStockDrugCount(params).then(response=>{
512
       getStockDrugCount(params).then(response=>{
513
          if(response.data.state == 1){
513
          if(response.data.state == 1){
514
            var outlist = response.data.data.outList
514
            var outlist = response.data.data.outList
515
-        
515
+          console.log("outlist22323232233",outlist)
516
            this.outCountList = outlist
516
            this.outCountList = outlist
517
            var autoCount = response.data.data.autoCount
517
            var autoCount = response.data.data.autoCount
518
         
518
         
539
            count = this.outCountList[i].count
539
            count = this.outCountList[i].count
540
          }
540
          }
541
       }
541
       }
542
-      return count
543
-    },
542
+     return count
543
+   },
544
    getAutoCount(id){
544
    getAutoCount(id){
545
      var count= 0
545
      var count= 0
546
      for(let i=0;i<this.autoCountList.length;i++){
546
      for(let i=0;i<this.autoCountList.length;i++){

+ 16 - 2
src/xt_pages/workforce/components/nextTableWeeks.vue 파일 보기

247
 </template>
247
 </template>
248
 
248
 
249
 <script>
249
 <script>
250
+import { uParseTime } from '@/utils/tools'
250
 import { getNextScheduleWeekDay,getAllZoneList } from "@/api/schedule";
251
 import { getNextScheduleWeekDay,getAllZoneList } from "@/api/schedule";
251
 import WeekItem from "./WeekItem";
252
 import WeekItem from "./WeekItem";
252
 const moment = require('moment')
253
 const moment = require('moment')
303
       zone:"",
304
       zone:"",
304
       // zoneList:[{id:0,name:"全部"}],
305
       // zoneList:[{id:0,name:"全部"}],
305
       zoneList:[],
306
       zoneList:[],
307
+      start_time:moment().week(moment().week() + 1).startOf('week').unix()
306
     };
308
     };
307
   },
309
   },
308
   watch: {
310
   watch: {
357
         if(zone != 0){
359
         if(zone != 0){
358
           str = zone.join(",")
360
           str = zone.join(",")
359
         }
361
         }
362
+
363
+        var now_time = parseInt(this.week_type) * 86400 + this.start_time
364
+
360
         const params = {
365
         const params = {
361
           start_time:moment().week(moment().week() + 1).startOf('week').unix(),
366
           start_time:moment().week(moment().week() + 1).startOf('week').unix(),
362
           end_time:moment().week(moment().week() + 1).endOf('week').unix(),
367
           end_time:moment().week(moment().week() + 1).endOf('week').unix(),
363
           week_type:this.week_type,
368
           week_type:this.week_type,
364
           week_time:this.week_time,
369
           week_time:this.week_time,
365
           zone:str,
370
           zone:str,
371
+          record_date:this.getTime(now_time)
366
         }
372
         }
367
         // const params = {
373
         // const params = {
368
         //   start_time:1609603200,
374
         //   start_time:1609603200,
370
         //   week_type:this.week_type,
376
         //   week_type:this.week_type,
371
         //   week_time:this.week_time,
377
         //   week_time:this.week_time,
372
         // }
378
         // }
373
-      console.log("params",params)
379
+      console.log("params0000000000",params)
374
       getNextScheduleWeekDay(params).then(response => {
380
       getNextScheduleWeekDay(params).then(response => {
375
         this.scheduleData = [];
381
         this.scheduleData = [];
376
         if (response.data.state == 1) {
382
         if (response.data.state == 1) {
662
         this.$router.push({
668
         this.$router.push({
663
           path: '/schedule/remind/print/setting?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + str + '&prestatus=' + this.pre_status+"&type="+2
669
           path: '/schedule/remind/print/setting?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + str + '&prestatus=' + this.pre_status+"&type="+2
664
         })
670
         })
665
-    }
671
+    },
672
+    getTime(val) {
673
+      if(val == ""){
674
+      return ""
675
+      }else {
676
+      return uParseTime(val, '{y}-{m}-{d}')
677
+      }
678
+    },
666
   },
679
   },
667
   components: {
680
   components: {
668
     WeekItem
681
     WeekItem
675
     // if (this.week_type == 0) {
688
     // if (this.week_type == 0) {
676
     //   this.week_type = 7;
689
     //   this.week_type = 7;
677
     // }
690
     // }
691
+
678
     this.getAllZoneList()
692
     this.getAllZoneList()
679
     this.org_id = this.$store.getters.xt_user.org.id
693
     this.org_id = this.$store.getters.xt_user.org.id
680
 
694
 

+ 5 - 4
src/xt_pages/workforce/next_remind_print.vue 파일 보기

144
       BreadCrumb
144
       BreadCrumb
145
     },
145
     },
146
     created() {
146
     created() {
147
+     var now_time = parseInt(this.week_type) * 86400 + this.start_time
148
+     this.now_time = now_time
147
      this.getPrintList()
149
      this.getPrintList()
148
      this.org_id = this.$store.getters.xt_user.org.id
150
      this.org_id = this.$store.getters.xt_user.org.id
149
      this.currentDate = this.getCurrentDate()
151
      this.currentDate = this.getCurrentDate()
160
           start_time:this.start_time,
162
           start_time:this.start_time,
161
           end_time:this.end_time,
163
           end_time:this.end_time,
162
           zone:this.zone,
164
           zone:this.zone,
165
+          record_date:this.getTime(now_time)
163
         }
166
         }
164
-
167
+     console.log("prarms23232323",params)
165
         //  const params = {
168
         //  const params = {
166
         //   week_type:this.week_type,
169
         //   week_type:this.week_type,
167
         //   week_time:this.week_time,
170
         //   week_time:this.week_time,
215
         this.$message.error(err)
218
         this.$message.error(err)
216
       })
219
       })
217
 
220
 
218
-      var now_time = parseInt(this.week_type) * 86400 + this.start_time
219
-      console.log("now",now_time)
220
-      this.now_time = now_time
221
+    
221
     },
222
     },
222
     methods: {
223
     methods: {
223
       getAdvice:function(doctor_advice) {
224
       getAdvice:function(doctor_advice) {

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

143
     created() {
143
     created() {
144
       this.getPrintList()
144
       this.getPrintList()
145
       this.org_id = this.$store.getters.xt_user.org.id
145
       this.org_id = this.$store.getters.xt_user.org.id
146
-      console.log("org_id23322323",this.org_id)
146
+     //console.log("org_id23322323",this.org_id)
147
     //  this.currentDate = this.getCurrentDate()
147
     //  this.currentDate = this.getCurrentDate()
148
       this.modeOptions = this.$store.getters.treatment_mode
148
       this.modeOptions = this.$store.getters.treatment_mode
149
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
149
       this.anticoagulants_confit = this.$store.getters.anticoagulants_confit

+ 2 - 0
src/xt_pages/workforce/remind_print_setting.vue 파일 보기

416
         // if(zone != 0){
416
         // if(zone != 0){
417
         //   str = zone.join(",")
417
         //   str = zone.join(",")
418
         // }
418
         // }
419
+        var now_time = parseInt(this.week_type) * 86400 + this.start_time
419
         const params = {
420
         const params = {
420
           start_time:moment().week(moment().week() + 1).startOf('week').unix(),
421
           start_time:moment().week(moment().week() + 1).startOf('week').unix(),
421
           end_time:moment().week(moment().week() + 1).endOf('week').unix(),
422
           end_time:moment().week(moment().week() + 1).endOf('week').unix(),
422
           week_type:this.week_type,
423
           week_type:this.week_type,
423
           week_time:this.week_time,
424
           week_time:this.week_time,
424
           zone:this.zone,
425
           zone:this.zone,
426
+          record_date:this.getTime(now_time)
425
         }
427
         }
426
         // const params = {
428
         // const params = {
427
         //   start_time:1609603200,
429
         //   start_time:1609603200,