XMLWAN 3 年前
父节点
当前提交
99a01f4980

+ 9 - 8
src/xt_pages/stock/detail/stockInDetail.vue 查看文件

273
       goodUnit:[],
273
       goodUnit:[],
274
       stockTotal:[],
274
       stockTotal:[],
275
       org_id:0,
275
       org_id:0,
276
+      tableInfo:[],
276
     };
277
     };
277
   },
278
   },
278
   methods: {
279
   methods: {
746
     
747
     
747
       exportList(){
748
       exportList(){
748
   
749
   
749
-        console.log("hhhh",this.tableList)
750
+        console.log("hhhh",this.tableInfo)
750
        
751
        
751
-        for(let i=0;i<this.tableList.length;i++){
752
-          this.tableList[i].index = i+1  
753
-          this.tableList[i].total_price = (this.tableList[i].warehousing_count * this.tableList[i].packing_price).toFixed(2) 
752
+        for(let i=0;i<this.tableInfo.length;i++){
753
+          this.tableInfo[i].index = i+1  
754
+          this.tableInfo[i].total_price = (this.tableInfo[i].warehousing_count * this.tableInfo[i].packing_price).toFixed(2) 
754
         }
755
         }
755
-        console.log("总共条数555",this.tableList)   
756
+        console.log("总共条数555",this.tableInfo)   
756
         import('@/vendor/Export2Excel').then(excel => {
757
         import('@/vendor/Export2Excel').then(excel => {
757
         const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','进货价','总价','备注']
758
         const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','进货价','总价','备注']
758
         const filterVal = ['index','good_name', 'specification_name', 'packing_unit','warehousing_count','price','total_price','remark']
759
         const filterVal = ['index','good_name', 'specification_name', 'packing_unit','warehousing_count','price','total_price','remark']
759
-        console.log("hhhhhhhh",this.tableList)
760
+        console.log("hhhhhhhh",this.tableInfo)
760
        
761
        
761
-        const data = this.formatJson(filterVal, this.tableList)
762
+        const data = this.formatJson(filterVal, this.tableInfo)
762
         console.log("data222222222",data)
763
         console.log("data222222222",data)
763
           excel.export_json_to_excel({
764
           excel.export_json_to_excel({
764
             header: tHeader,
765
             header: tHeader,
790
         if(response.data.state == 1){
791
         if(response.data.state == 1){
791
           var list = response.data.data.list
792
           var list = response.data.data.list
792
           console.log("入库详情单",list)
793
           console.log("入库详情单",list)
793
-          this.tableList = list
794
+          this.tableInfo = list
794
         }
795
         }
795
       })
796
       })
796
      }
797
      }

+ 5 - 2
src/xt_pages/stock/detail/stockOutDetail.vue 查看文件

276
     changeType: function(val) {
276
     changeType: function(val) {
277
       this.order_type = val;
277
       this.order_type = val;
278
       this.GetCancelStock();
278
       this.GetCancelStock();
279
+      this.getGoodDetailPrintList()
279
       // this.getPrintStockGood()
280
       // this.getPrintStockGood()
280
     },
281
     },
281
     changeManufacturer: function(val) {
282
     changeManufacturer: function(val) {
282
       this.manufacturer_id = val;
283
       this.manufacturer_id = val;
283
       this.GetCancelStock();
284
       this.GetCancelStock();
284
       // this.getPrintStockGood()
285
       // this.getPrintStockGood()
286
+       this.getGoodDetailPrintList()
285
     },
287
     },
286
     getTypeName: function(row) {
288
     getTypeName: function(row) {
287
       let name = "";
289
       let name = "";
461
         this.start_time = "";
463
         this.start_time = "";
462
       } else {
464
       } else {
463
         this.GetCancelStock();
465
         this.GetCancelStock();
464
-        // this.getPrintStockGood()
466
+        this.getGoodDetailPrintList()
467
+       
465
       }
468
       }
466
     },
469
     },
467
     endTimeChange(val) {
470
     endTimeChange(val) {
471
         this.end_time = "";
474
         this.end_time = "";
472
       } else {
475
       } else {
473
         this.GetCancelStock();
476
         this.GetCancelStock();
474
-        // this.getPrintStockGood()
477
+        this.getGoodDetailPrintList()
475
       }
478
       }
476
     },
479
     },
477
     getTimestamp(time) {
480
     getTimestamp(time) {

+ 24 - 16
src/xt_pages/stock/drugs/query.vue 查看文件

116
         </el-table-column>
116
         </el-table-column>
117
         <el-table-column prop="drug_name" label="出库数量" align="center">
117
         <el-table-column prop="drug_name" label="出库数量" align="center">
118
            <template slot-scope="scope">
118
            <template slot-scope="scope">
119
-            {{getWarehouseOutInfo(scope.row.drug_warehouse_out,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}
119
+              <span v-if="org_id == 10028 || org_id == 9671">{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}</span>
120
+              <span v-else>{{getWarehouseOutInfo(scope.row.drug_warehouse_out,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span> 
120
            </template>
121
            </template>
121
         </el-table-column>
122
         </el-table-column>
122
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
123
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
123
            <template slot-scope="scope">
124
            <template slot-scope="scope">
124
-             <span>{{getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span> 
125
+            <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
126
+               <span v-if="(org_id == 10028 || org_id == 9671)">{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}} </span>
127
+               <span v-else>{{getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span> 
128
+            </div>
125
            </template>
129
            </template>
126
         </el-table-column>
130
         </el-table-column>
127
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
131
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
174
     name: 'stockIn',
178
     name: 'stockIn',
175
     created() {
179
     created() {
176
       
180
       
177
-      var nowDate = new Date();
178
-      var nowYear = nowDate.getFullYear();
179
-      var nowMonth = nowDate.getMonth() + 1;
180
-      var nowDay = nowDate.getDate();
181
-      this.end_time =nowYear +"-" +(nowMonth < 10 ? "0" + nowMonth : nowMonth) +"-" +(nowDay < 10 ? "0" + nowDay : nowDay);
182
-      nowDate.setMonth(nowDate.getMonth() - 1);
183
-      nowYear = nowDate.getFullYear();
184
-      nowMonth = nowDate.getMonth() + 1;
185
-      nowDay = nowDate.getDate();
186
-      this.start_time =nowYear +"-" +(nowMonth < 10 ? "0" + nowMonth : nowMonth) +"-" +(nowDay < 10 ? "0" + nowDay : nowDay);
181
+      // var nowDate = new Date();
182
+      // var nowYear = nowDate.getFullYear();
183
+      // var nowMonth = nowDate.getMonth() + 1;
184
+      // var nowDay = nowDate.getDate();
185
+      // this.end_time =nowYear +"-" +(nowMonth < 10 ? "0" + nowMonth : nowMonth) +"-" +(nowDay < 10 ? "0" + nowDay : nowDay);
186
+      // nowDate.setMonth(nowDate.getMonth() - 1);
187
+      // nowYear = nowDate.getFullYear();
188
+      // nowMonth = nowDate.getMonth() + 1;
189
+      // nowDay = nowDate.getDate();
190
+      // this.start_time =nowYear +"-" +(nowMonth < 10 ? "0" + nowMonth : nowMonth) +"-" +(nowDay < 10 ? "0" + nowDay : nowDay);
187
       this.getlist()
191
       this.getlist()
188
       var drugCategory = getDictionaryDataConfig('system','drug_category')
192
       var drugCategory = getDictionaryDataConfig('system','drug_category')
189
       this.drugCategory.push(...drugCategory)
193
       this.drugCategory.push(...drugCategory)
190
       var drugTypeList = getDictionaryDataConfig('system','drug_type') 
194
       var drugTypeList = getDictionaryDataConfig('system','drug_type') 
191
       this.drugTypeList.push(...drugTypeList)
195
       this.drugTypeList.push(...drugTypeList)
192
-     
193
-      // this.getDrugCountList()
196
+      this.org_id =  this.$store.getters.xt_user.org.id
197
+      console.log("机构ID",this.org_id)
198
+      this.getDrugCountList()
194
      
199
      
195
       
200
       
196
     },
201
     },
240
         drugOutList:[],
245
         drugOutList:[],
241
         cancelCountList:[],
246
         cancelCountList:[],
242
         allCountList:[],
247
         allCountList:[],
248
+        org_id:"",
243
       }
249
       }
244
     },
250
     },
245
     methods: {
251
     methods: {
528
                  info[i].count = info[i].count * info[i].min_number
534
                  info[i].count = info[i].count * info[i].min_number
529
               }
535
               }
530
             }
536
             }
531
-            console.log("搜有列表",this.autoCountList)
532
-            console.log("info2222222",info)
537
+            this.outCountList = response.data.data.outCountList
538
+            console.log("手动出库",this.outCountList)
539
+            this.auCountList = response.data.data.auCountList
540
+            console.log("自动出库",this.auCountList)
533
             this.drugOutList = info
541
             this.drugOutList = info
534
           }
542
           }
535
         })
543
         })

+ 11 - 11
src/xt_pages/stock/stockQuery.vue 查看文件

171
     var nowYear = nowDate.getFullYear();
171
     var nowYear = nowDate.getFullYear();
172
     var nowMonth = nowDate.getMonth() + 1;
172
     var nowMonth = nowDate.getMonth() + 1;
173
     var nowDay = nowDate.getDate();
173
     var nowDay = nowDate.getDate();
174
-    this.end_time =
175
-      nowYear +
176
-      "-" +
177
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
178
-      "-" +
179
-      (nowDay < 10 ? "0" + nowDay : nowDay);
180
-    nowDate.setMonth(nowDate.getMonth() - 1);
181
-    nowYear = nowDate.getFullYear();
182
-    nowMonth = nowDate.getMonth() + 1;
183
-    nowDay = nowDate.getDate();
184
-    this.start_time = nowYear +"-" +(nowMonth < 10 ? "0" + nowMonth : nowMonth) +"-" +(nowDay < 10 ? "0" + nowDay : nowDay);
174
+    // this.end_time =
175
+    //   nowYear +
176
+    //   "-" +
177
+    //   (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
178
+    //   "-" +
179
+    //   (nowDay < 10 ? "0" + nowDay : nowDay);
180
+    // nowDate.setMonth(nowDate.getMonth() - 1);
181
+    // nowYear = nowDate.getFullYear();
182
+    // nowMonth = nowDate.getMonth() + 1;
183
+    // nowDay = nowDate.getDate();
184
+    // this.start_time = nowYear +"-" +(nowMonth < 10 ? "0" + nowMonth : nowMonth) +"-" +(nowDay < 10 ? "0" + nowDay : nowDay);
185
     this.GetAllGoodInfo();
185
     this.GetAllGoodInfo();
186
     this.GetAllGoodType();
186
     this.GetAllGoodType();
187
     this.getlist()
187
     this.getlist()