XMLWAN vor 3 Jahren
Ursprung
Commit
5480c23174
28 geänderte Dateien mit 642 neuen und 262 gelöschten Zeilen
  1. 8 0
      src/api/drug/drug_stock.js
  2. 8 0
      src/api/stock.js
  3. 1 1
      src/xt_pages/data/components/consumables.vue
  4. 26 12
      src/xt_pages/data/druguseTemplate.vue
  5. 8 4
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  6. 15 6
      src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue
  7. 1 1
      src/xt_pages/stock/Dialog/goodInfoDailog.vue
  8. 11 1
      src/xt_pages/stock/cancelStockOrderAdd.vue
  9. 2 2
      src/xt_pages/stock/detail/cancelStockDetail.vue
  10. 5 2
      src/xt_pages/stock/detail/stockInDetail.vue
  11. 4 4
      src/xt_pages/stock/detail/stockOutDetail.vue
  12. 11 15
      src/xt_pages/stock/drugs/drugStockFlow.vue
  13. 2 1
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  14. 2 2
      src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue
  15. 2 1
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  16. 236 27
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  17. 53 42
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  18. 6 5
      src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue
  19. 8 2
      src/xt_pages/stock/drugs/query.vue
  20. 14 7
      src/xt_pages/stock/stockFlow.vue
  21. 6 5
      src/xt_pages/stock/stockInOrder.vue
  22. 3 3
      src/xt_pages/stock/stockInOrderAdd.vue
  23. 2 1
      src/xt_pages/stock/stockInOrderEdit.vue
  24. 88 38
      src/xt_pages/stock/stockOutOrder.vue
  25. 33 58
      src/xt_pages/stock/stockOutOrderAdd.vue
  26. 60 3
      src/xt_pages/stock/stockOutOrderDetailPrint.vue
  27. 24 16
      src/xt_pages/stock/stockOutOrderEdit.vue
  28. 3 3
      src/xt_pages/stock/stockQuery.vue

+ 8 - 0
src/api/drug/drug_stock.js Datei anzeigen

509
     params: params
509
     params: params
510
   })
510
   })
511
 }
511
 }
512
+
513
+export function getDrugBatchNumber(params) {
514
+  return request({
515
+    url: '/api/drug/getdrugbatchnumber',
516
+    method: 'Get',
517
+    params: params
518
+  })
519
+}

+ 8 - 0
src/api/stock.js Datei anzeigen

689
     params: params
689
     params: params
690
   })
690
   })
691
 }
691
 }
692
+
693
+export function getStockBatchNumber(params) {
694
+  return request({
695
+    url: '/api/stock/getstockbatchnumber',
696
+    method: 'get',
697
+    params: params
698
+  })
699
+}

+ 1 - 1
src/xt_pages/data/components/consumables.vue Datei anzeigen

105
           {{ getGoodUnit(scope.row.good_unit) }}
105
           {{ getGoodUnit(scope.row.good_unit) }}
106
         </template>
106
         </template>
107
       </el-table-column> -->
107
       </el-table-column> -->
108
-      <el-table-column label="包装零售价" width="100" align="center">
108
+      <el-table-column label="零售价" width="100" align="center">
109
         <template slot-scope="scope">
109
         <template slot-scope="scope">
110
           {{ scope.row.packing_price }}
110
           {{ scope.row.packing_price }}
111
         </template>
111
         </template>

+ 26 - 12
src/xt_pages/data/druguseTemplate.vue Datei anzeigen

347
                           :fetch-suggestions="querySearch"
347
                           :fetch-suggestions="querySearch"
348
                           placeholder="请输入内容"
348
                           placeholder="请输入内容"
349
                           @input="changeDrugName"
349
                           @input="changeDrugName"
350
+                          @select="hangleSelectChange"
350
                       ></el-autocomplete>
351
                       ></el-autocomplete>
351
                     </el-form-item>
352
                     </el-form-item>
352
                   </el-col>
353
                   </el-col>
549
                           :fetch-suggestions="querySearch"
550
                           :fetch-suggestions="querySearch"
550
                           placeholder="请输入内容"
551
                           placeholder="请输入内容"
551
                           @input="changeDrugNameTwo"
552
                           @input="changeDrugNameTwo"
553
+                          @select="hangdleSelectTwo"
552
                          ></el-autocomplete>
554
                          ></el-autocomplete>
553
                     </el-form-item>
555
                     </el-form-item>
554
                   </el-col>
556
                   </el-col>
1685
         let name = encodeURIComponent(this.form.name)
1687
         let name = encodeURIComponent(this.form.name)
1686
         console.log("params",params)
1688
         console.log("params",params)
1687
         let sort = this.form.sort
1689
         let sort = this.form.sort
1690
+        
1688
         postAdviceTemplate(params, name,sort, this.form.advice_type).then(response => {
1691
         postAdviceTemplate(params, name,sort, this.form.advice_type).then(response => {
1689
 
1692
 
1690
           if (response.data.state == 0) {
1693
           if (response.data.state == 0) {
1821
       },
1824
       },
1822
       submitTemplate(formName) {
1825
       submitTemplate(formName) {
1823
 
1826
 
1824
-        if(this.src_type == ""){
1825
-            this.templateForm.way = 0
1826
-            this.templateForm.drug_id = 0
1827
-        }
1827
+        // if(this.src_type == ""){
1828
+        //     this.templateForm.way = 0
1829
+        //     this.templateForm.drug_id = 0
1830
+        // }
1828
 
1831
 
1829
         if(this.src_type == 2){ //自备药
1832
         if(this.src_type == 2){ //自备药
1830
             var arr = this.templateForm.advice_name.split("(自备药)")
1833
             var arr = this.templateForm.advice_name.split("(自备药)")
2198
       //编辑医嘱
2201
       //编辑医嘱
2199
       submitEditTemplate(formName) {
2202
       submitEditTemplate(formName) {
2200
 
2203
 
2201
-         var drug_id = 0
2202
-         for(let i=0;i<this.all_drug.length;i++){
2203
-           if(this.templateFormEdit.advice_name == this.all_drug[i].drug_name){
2204
-              drug_id = this.all_drug[i].id
2205
-           }
2206
-         }
2207
-        this.templateFormEdit.drug_id = drug_id
2204
+        //  var drug_id = 0
2205
+        //  for(let i=0;i<this.all_drug.length;i++){
2206
+        //    if(this.templateFormEdit.advice_name == this.all_drug[i].drug_name){
2207
+        //       drug_id = this.all_drug[i].id
2208
+        //    }
2209
+        //  }
2210
+        // this.templateFormEdit.drug_id = drug_id
2208
 
2211
 
2209
         console.log("编辑子药",this.templateFormEdit)
2212
         console.log("编辑子药",this.templateFormEdit)
2210
 
2213
 
2896
             }
2899
             }
2897
         }
2900
         }
2898
       },
2901
       },
2902
+      hangdleSelectTwo(val){
2903
+        console.log("我的223232",val)
2904
+
2905
+        this.templateFormEdit.drug_id = val.id
2906
+      },
2899
       changeDrugDescTwo(name) {
2907
       changeDrugDescTwo(name) {
2900
         this.current_drug_spec = name
2908
         this.current_drug_spec = name
2901
         for (let i = 0; i < this.drugSpec.length; i++) {
2909
         for (let i = 0; i < this.drugSpec.length; i++) {
2913
       },
2921
       },
2914
 
2922
 
2915
 
2923
 
2924
+
2925
+
2916
      querySearch(queryString, cb) {
2926
      querySearch(queryString, cb) {
2917
         console.log('queryString',queryString)
2927
         console.log('queryString',queryString)
2918
         var restaurants = this.all_drug;
2928
         var restaurants = this.all_drug;
2945
       },
2955
       },
2946
      sortData(a, b) {
2956
      sortData(a, b) {
2947
        return a.sort - b.sort
2957
        return a.sort - b.sort
2948
-     }
2958
+     },
2959
+     hangleSelectChange(val){
2960
+      this.templateForm.way = 1
2961
+      this.templateForm.drug_id = val.id
2962
+    }
2949
     }
2963
     }
2950
   }
2964
   }
2951
 </script>
2965
 </script>

+ 8 - 4
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Datei anzeigen

1275
               this.exceLoading = false
1275
               this.exceLoading = false
1276
               return false
1276
               return false
1277
             } else {
1277
             } else {
1278
-
1279
               this.$notify({
1278
               this.$notify({
1280
                 title: '成功',
1279
                 title: '成功',
1281
                 message: '执行医嘱成功',
1280
                 message: '执行医嘱成功',
1283
                 duration: 2000
1282
                 duration: 2000
1284
               })
1283
               })
1285
               var msg = response.data.data.msg
1284
               var msg = response.data.data.msg
1286
-              if(msg == "ok"){
1287
-                 this.$message.error("请入库,库存不足")
1285
+              if(msg == 1){
1286
+                this.$message.error("无库存,请入库")
1287
+                return
1288
+              }
1289
+
1290
+              if(msg == 2){
1291
+                this.$message.error("库存不足,请入库")
1292
+                return
1288
               }
1293
               }
1289
-            
1290
               var exid = response.data.data.advice.id
1294
               var exid = response.data.data.advice.id
1291
               if (response.data.data.advice.parent_id > 0) {
1295
               if (response.data.data.advice.parent_id > 0) {
1292
                 exid = response.data.data.advice.parent_id
1296
                 exid = response.data.data.advice.parent_id

+ 15 - 6
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Datei anzeigen

695
             remark: this.groupForm.remark,
695
             remark: this.groupForm.remark,
696
             parent_id: this.groupForm.parent_id,
696
             parent_id: this.groupForm.parent_id,
697
             id:this.groupForm.id,
697
             id:this.groupForm.id,
698
-          };
699
          
698
          
699
+          };
700
+          console.log("hhhhh",this.drug_id,this.nameForm.way)
700
           var adviceNames = [];
701
           var adviceNames = [];
701
           for (const index in this.groupForm.adviceNames) {
702
           for (const index in this.groupForm.adviceNames) {
702
             adviceNames.unshift(this.groupForm.adviceNames[index]);
703
             adviceNames.unshift(this.groupForm.adviceNames[index]);
733
              }
734
              }
734
           }
735
           }
735
           console.log("2222",submitForm)
736
           console.log("2222",submitForm)
736
-  
737
+         
737
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
738
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
738
             response => {
739
             response => {
739
               if (response.data.state == 0) {
740
               if (response.data.state == 0) {
857
     submitNameForm(formName) {
858
     submitNameForm(formName) {
858
       
859
       
859
        if(this.src_type == ""){
860
        if(this.src_type == ""){
860
-          this.nameForm.way = 0
861
-          this.nameForm.drug_id = 0
861
+          this.nameForm.way = 1
862
+          this.nameForm.drug_id = this.drug_id
862
           this.nameForm.drug_name_id = 0
863
           this.nameForm.drug_name_id = 0
863
        }
864
        }
864
 
865
 
1559
                 obj.type = 2
1560
                 obj.type = 2
1560
                 obj.custom_id = this.rand(10000000, 99999999)
1561
                 obj.custom_id = this.rand(10000000, 99999999)
1561
                 obj.drug_specs = medicalList[i].drug_specs
1562
                 obj.drug_specs = medicalList[i].drug_specs
1563
+                obj.id = medicalList[i].id
1562
                 this.all_drug.push(obj)
1564
                 this.all_drug.push(obj)
1563
               }
1565
               }
1564
             }
1566
             }
1594
                 obj.type = 1
1596
                 obj.type = 1
1595
                 obj.custom_id = this.rand(10000000, 99999999)
1597
                 obj.custom_id = this.rand(10000000, 99999999)
1596
                 obj.drug_specs = base_drug_list[i].drug_specs
1598
                 obj.drug_specs = base_drug_list[i].drug_specs
1599
+                obj.id = base_drug_list[i].id
1597
                 this.all_drug.push(obj)
1600
                 this.all_drug.push(obj)
1598
 
1601
 
1599
               }
1602
               }
1614
             this.drugSpec = this.all_drug[i].drug_specs
1617
             this.drugSpec = this.all_drug[i].drug_specs
1615
           }
1618
           }
1616
        }
1619
        }
1620
+     
1617
     },
1621
     },
1618
     changeDrugDesc(name) {
1622
     changeDrugDesc(name) {
1623
+      
1619
         this.current_drug_spec = name
1624
         this.current_drug_spec = name
1620
         for (let i = 0; i < this.drugSpec.length; i++) {
1625
         for (let i = 0; i < this.drugSpec.length; i++) {
1621
           if (this.drugSpec[i].drug_spec == name) {
1626
           if (this.drugSpec[i].drug_spec == name) {
1673
         cb(results);
1678
         cb(results);
1674
       },
1679
       },
1675
 
1680
 
1676
-      handleSelect(){
1677
-
1681
+      handleSelect(val){
1682
+        console.log("22222",val)
1683
+        this.drug_id = val.id
1684
+        this.nameForm.way = 1 
1685
+        console.log("hhhh23",this.drug_id) 
1686
+        console.log("hhhhhh",this.nameForm.way)
1678
       },
1687
       },
1679
       handleSelect1(){
1688
       handleSelect1(){
1680
 
1689
 

+ 1 - 1
src/xt_pages/stock/Dialog/goodInfoDailog.vue Datei anzeigen

82
                 </el-option>
82
                 </el-option>
83
               </el-select>
83
               </el-select>
84
             </el-form-item> -->
84
             </el-form-item> -->
85
-            <el-form-item label="包装零售价 : " prop="retail_price">
85
+            <el-form-item label="零售价 : " prop="retail_price">
86
               <el-input v-model="form.packing_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
86
               <el-input v-model="form.packing_price" style="width:160px;" placeholder="" maxlength="30"></el-input>
87
             </el-form-item>
87
             </el-form-item>
88
             <!-- <el-form-item label="拆零零售价 : " prop="retail_price">
88
             <!-- <el-form-item label="拆零零售价 : " prop="retail_price">

+ 11 - 1
src/xt_pages/stock/cancelStockOrderAdd.vue Datei anzeigen

425
               this.$message.error(response.data.msg);
425
               this.$message.error(response.data.msg);
426
               return false;
426
               return false;
427
             } else {
427
             } else {
428
-              this.$notify({
428
+             var msg =  response.data.data.msg
429
+             if (msg == 1){
430
+                this.$message.error("该耗材无出库记录")
431
+                return
432
+             }
433
+             if(msg == 2){
434
+               this.$message.error("退库数量大于出库数量")
435
+             }
436
+             if(msg == 3){
437
+               this.$notify({
429
                 title: "成功",
438
                 title: "成功",
430
                 message: "退库成功",
439
                 message: "退库成功",
431
                 type: "success",
440
                 type: "success",
433
               });
442
               });
434
               this.recordInfo.recordData = [];
443
               this.recordInfo.recordData = [];
435
               this.$router.back(-1);
444
               this.$router.back(-1);
445
+             }        
436
             }
446
             }
437
           });
447
           });
438
         } else {
448
         } else {

+ 2 - 2
src/xt_pages/stock/detail/cancelStockDetail.vue Datei anzeigen

140
           </template>
140
           </template>
141
         </el-table-column>
141
         </el-table-column>
142
 
142
 
143
-        <el-table-column label="单据类型" align="center">
143
+        <!-- <el-table-column label="单据类型" align="center">
144
           <template slot-scope="scope">
144
           <template slot-scope="scope">
145
             {{ getTypeName(scope.row) }}
145
             {{ getTypeName(scope.row) }}
146
           </template>
146
           </template>
147
-        </el-table-column>
147
+        </el-table-column> -->
148
 
148
 
149
         <el-table-column label="操作时间" align="center">
149
         <el-table-column label="操作时间" align="center">
150
           <template slot-scope="scope">
150
           <template slot-scope="scope">

+ 5 - 2
src/xt_pages/stock/detail/stockInDetail.vue Datei anzeigen

341
           this.$message.error(response.data.msg);
341
           this.$message.error(response.data.msg);
342
           return false;
342
           return false;
343
         } else {
343
         } else {
344
-          
345
           this.total = response.data.data.total;
344
           this.total = response.data.data.total;
345
+          console.log("hhhhhhshsss",response.data.data.list)
346
+          var total_price = 0
346
           for (let i = 0; i < response.data.data.list.length; i++) {
347
           for (let i = 0; i < response.data.data.list.length; i++) {
347
             var obj = response.data.data.list[i];
348
             var obj = response.data.data.list[i];
349
+            total_price += response.data.data.list[i].price * response.data.data.list[i].warehousing_count
348
             obj["is_total"] = 0;
350
             obj["is_total"] = 0;
349
             this.cancelStockDate.push(obj);
351
             this.cancelStockDate.push(obj);
350
           }
352
           }
352
           this.cancelStockDate.push({
354
           this.cancelStockDate.push({
353
             warehousing_order: "合计",
355
             warehousing_order: "合计",
354
             is_total: 1,
356
             is_total: 1,
355
-            total: response.data.data.total_price,
357
+            total: total_price,
356
             Warehousing: {
358
             Warehousing: {
357
               warehousing_time: 0
359
               warehousing_time: 0
358
             }
360
             }
391
           return false;
393
           return false;
392
         } else {
394
         } else {
393
           this.total = response.data.data.total;
395
           this.total = response.data.data.total;
396
+          var total_price = ""
394
           for (let i = 0; i < response.data.data.list.length; i++) {
397
           for (let i = 0; i < response.data.data.list.length; i++) {
395
             var obj = response.data.data.list[i];
398
             var obj = response.data.data.list[i];
396
             obj["is_total"] = 0;
399
             obj["is_total"] = 0;

+ 4 - 4
src/xt_pages/stock/detail/stockOutDetail.vue Datei anzeigen

140
           </template>
140
           </template>
141
         </el-table-column>
141
         </el-table-column>
142
 
142
 
143
-        <el-table-column label="单据类型" align="center">
143
+        <!-- <el-table-column label="单据类型" align="center">
144
           <template slot-scope="scope">
144
           <template slot-scope="scope">
145
             {{ getTypeName(scope.row) }}
145
             {{ getTypeName(scope.row) }}
146
           </template>
146
           </template>
147
-        </el-table-column>
147
+        </el-table-column> -->
148
 
148
 
149
         <el-table-column label="操作时间" align="center">
149
         <el-table-column label="操作时间" align="center">
150
           <template slot-scope="scope">
150
           <template slot-scope="scope">
377
         } else {
377
         } else {
378
 
378
 
379
           this.total = response.data.data.total;
379
           this.total = response.data.data.total;
380
-
380
+          console.log("详情23233323",response.data.data.list)
381
           for (let i = 0; i < response.data.data.list.length; i++) {
381
           for (let i = 0; i < response.data.data.list.length; i++) {
382
             var obj = response.data.data.list[i];
382
             var obj = response.data.data.list[i];
383
             obj["is_total"] = 0;
383
             obj["is_total"] = 0;
384
             this.cancelStockDate.push(obj);
384
             this.cancelStockDate.push(obj);
385
-
385
+            
386
           }
386
           }
387
           this.cancelStockDate.push({
387
           this.cancelStockDate.push({
388
             warehouse_out_order_number: "合计",
388
             warehouse_out_order_number: "合计",

+ 11 - 15
src/xt_pages/stock/drugs/drugStockFlow.vue Datei anzeigen

84
          <el-table-column prop="drug_name" label="出入库数量" align="center">
84
          <el-table-column prop="drug_name" label="出入库数量" align="center">
85
            <template slot-scope="scope">
85
            <template slot-scope="scope">
86
              <span v-if="scope.row.drug_way == 4"> {{scope.row.warehousing_count}}{{scope.row.max_unit}}</span>
86
              <span v-if="scope.row.drug_way == 4"> {{scope.row.warehousing_count}}{{scope.row.max_unit}}</span>
87
-             <span v-if="scope.row.drug_way == 2 || scope.row.drug_way == 1">{{scope.row.count}}{{scope.row.max_unit}}</span>
87
+             <span v-if="scope.row.drug_way == 2 || scope.row.drug_way == 1">{{scope.row.count}}{{scope.row.count_unit}}</span>
88
            </template>
88
            </template>
89
         </el-table-column>
89
         </el-table-column>
90
          <el-table-column prop="drug_name" label="剩余库存量" align="center">
90
          <el-table-column prop="drug_name" label="剩余库存量" align="center">
91
            <template slot-scope="scope">
91
            <template slot-scope="scope">
92
-             <!-- {{getCountTwo(this.$route.query.drug_id,this.$route.query.min_number,this.$route.query.max_unit,this.$route.query.min_unit)}} -->
93
                {{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
92
                {{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
94
-              <!-- {{getInCount(scope.row.drug_id) - getOutCount(scope.row.drug_id) - getAutoCount(scope.row.drug_id)}} -->
95
              <span></span>
93
              <span></span>
96
            </template>
94
            </template>
97
         </el-table-column>
95
         </el-table-column>
109
         </el-table-column>
107
         </el-table-column>
110
         <el-table-column prop="drug_name" label="批号" align="center">
108
         <el-table-column prop="drug_name" label="批号" align="center">
111
            <template slot-scope="scope">
109
            <template slot-scope="scope">
112
-             <span v-if="scope.row.drug_way == 2 || scope.row.drug_way ==1"> {{scope.row.number}}</span>
113
-             <span v-if="scope.row.drug_way == 4">{{scope.row.number}}</span>
110
+             <span v-if="scope.row.drug_way == 2 || scope.row.drug_way ==1"> {{scope.row.batch_number}}</span>
111
+             <span v-if="scope.row.drug_way == 4">{{scope.row.batch_number}}</span>
114
            </template>
112
            </template>
115
         </el-table-column>
113
         </el-table-column>
116
         <el-table-column prop="drug_name" label="生产商" align="center">
114
         <el-table-column prop="drug_name" label="生产商" align="center">
240
              limit:this.limit,
238
              limit:this.limit,
241
              stock_type:this.stock_type,  
239
              stock_type:this.stock_type,  
242
            }
240
            }
243
-          console.log("params",params)
244
          getDrugStockFlow(params).then(response=>{
241
          getDrugStockFlow(params).then(response=>{
245
            if(response.data.state == 1){
242
            if(response.data.state == 1){
246
             var list = response.data.data.list
243
             var list = response.data.data.list
247
-            console.log("入库数据0000",list)
248
             for(let i=0;i<list.length;i++){
244
             for(let i=0;i<list.length;i++){
249
                list[i].drug_way = 4
245
                list[i].drug_way = 4
250
                this.tableList.push(list[i])
246
                this.tableList.push(list[i])
266
              limit:this.limit,
262
              limit:this.limit,
267
              stock_type:this.stock_type,  
263
              stock_type:this.stock_type,  
268
            }
264
            }
269
-          console.log("出库数据",params)
270
-
271
          getOutDrugStockFlow(params).then(response=>{
265
          getOutDrugStockFlow(params).then(response=>{
272
             if(response.data.state == 1){
266
             if(response.data.state == 1){
273
                var outList = response.data.data.outList
267
                var outList = response.data.data.outList
274
                console.log("outlist",outList)
268
                console.log("outlist",outList)
275
 
269
 
276
               for(let i=0;i<outList.length;i++){
270
               for(let i=0;i<outList.length;i++){
271
+               
277
                 if(outList[i].is_sys == 1){
272
                 if(outList[i].is_sys == 1){
278
                   outList[i].drug_way = 2
273
                   outList[i].drug_way = 2
279
                 }
274
                 }
280
-                if(outList.is_sys == 0){
275
+                if(outList[i].is_sys == 0){
276
+                  console.log("进来22222")
281
                   outList[i].drug_way = 1
277
                   outList[i].drug_way = 1
282
                 }
278
                 }
283
                 this.tableList.push(outList[i])
279
                 this.tableList.push(outList[i])
346
       getDrugCountList(params).then(response=>{
342
       getDrugCountList(params).then(response=>{
347
           if(response.data.state == 1){
343
           if(response.data.state == 1){
348
             var countlist =  response.data.data.countList
344
             var countlist =  response.data.data.countList
349
-            console.log("入库数据",countlist)
345
+            // console.log("入库数据",countlist)
350
             this.countList = countlist
346
             this.countList = countlist
351
             var outcountlist = response.data.data.outCountList
347
             var outcountlist = response.data.data.outCountList
352
-            console.log("出库数据",outcountlist)
348
+            // console.log("出库数据",outcountlist)
353
             this.outCountList = outcountlist
349
             this.outCountList = outcountlist
354
             var aucountlist = response.data.data.auCountList
350
             var aucountlist = response.data.data.auCountList
355
-            console.log("自动数据",aucountlist)
351
+            // console.log("自动数据",aucountlist)
356
             this.autoCountList = aucountlist
352
             this.autoCountList = aucountlist
357
              var minCount = response.data.data.minCount
353
              var minCount = response.data.data.minCount
358
-            console.log("minCount",minCount)
354
+            // console.log("minCount",minCount)
359
             this.minCount = minCount
355
             this.minCount = minCount
360
             var info = response.data.data.info
356
             var info = response.data.data.info
361
             for(let i=0;i<info.length;i++){
357
             for(let i=0;i<info.length;i++){
363
                  info[i].count = info[i].count * info[i].min_number
359
                  info[i].count = info[i].count * info[i].min_number
364
               }
360
               }
365
             }
361
             }
366
-            console.log("info2222222",info)
362
+            // console.log("info2222222",info)
367
             this.drugOutList = info
363
             this.drugOutList = info
368
           }
364
           }
369
         })
365
         })

+ 2 - 1
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue Datei anzeigen

55
                     popper-class="my-autocomplete"
55
                     popper-class="my-autocomplete"
56
                     v-model="scope.row.drug_name"
56
                     v-model="scope.row.drug_name"
57
                     :fetch-suggestions="querySearchAsync"
57
                     :fetch-suggestions="querySearchAsync"
58
-                    :trigger-on-focus="false"
58
+                    :trigger-on-focus="true"
59
                     placeholder="请输入药品名称"
59
                     placeholder="请输入药品名称"
60
                     @select="handleSelect"
60
                     @select="handleSelect"
61
                     @input="changeDrugName(scope.$index)"
61
                     @input="changeDrugName(scope.$index)"
218
             <template slot-scope="scope">
218
             <template slot-scope="scope">
219
               <el-form-item style="padding-top: 20px">
219
               <el-form-item style="padding-top: 20px">
220
                 <el-input
220
                 <el-input
221
+                 :disabled="true"
221
                   placeholder="请输入批准文号"
222
                   placeholder="请输入批准文号"
222
                   v-model="scope.row.number"
223
                   v-model="scope.row.number"
223
                 ></el-input>
224
                 ></el-input>

+ 2 - 2
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue Datei anzeigen

55
                   <span>{{(item.warehousing_count * item.price).toFixed(2)}}</span>
55
                   <span>{{(item.warehousing_count * item.price).toFixed(2)}}</span>
56
               </td>
56
               </td>
57
               <td style="line-height:18px">{{ item.number }}</td>
57
               <td style="line-height:18px">{{ item.number }}</td>
58
-              <td style="line-height:18px">{{ getTime(item.product_date)}}</td>
59
-              <td style="line-height:18px">{{ getTime(item.expiry_date)}}</td>
58
+              <td style="line-height:18px">{{ getTime(item.product_date,'{y}-{m}-{d}')}}</td>
59
+              <td style="line-height:18px">{{ getTime(item.expiry_date,'{y}-{m}-{d}')}}</td>
60
               <td style="line-height:18px">正常<br>入库</td>
60
               <td style="line-height:18px">正常<br>入库</td>
61
               <td style="line-height:18px">合格</td>
61
               <td style="line-height:18px">合格</td>
62
             </tr>
62
             </tr>

+ 2 - 1
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue Datei anzeigen

120
                     popper-class="my-autocomplete"
120
                     popper-class="my-autocomplete"
121
                     v-model="scope.row.drug_name"
121
                     v-model="scope.row.drug_name"
122
                     :fetch-suggestions="querySearchAsync"
122
                     :fetch-suggestions="querySearchAsync"
123
-                    :trigger-on-focus="false"
123
+                    :trigger-on-focus="true"
124
                     placeholder="请输入药品名称"
124
                     placeholder="请输入药品名称"
125
                     @select="handleSelect"
125
                     @select="handleSelect"
126
                     @input="changeDrugName(scope.$index)"
126
                     @input="changeDrugName(scope.$index)"
285
             <template slot-scope="scope">
285
             <template slot-scope="scope">
286
               <el-form-item style="padding-top: 20px">
286
               <el-form-item style="padding-top: 20px">
287
                 <el-input
287
                 <el-input
288
+                  :disabled="true"
288
                   placeholder="请输入批准文号"
289
                   placeholder="请输入批准文号"
289
                   v-model="scope.row.number"
290
                   v-model="scope.row.number"
290
                 ></el-input>
291
                 ></el-input>

+ 236 - 27
src/xt_pages/stock/drugs/drugStockOutOrder.vue Datei anzeigen

231
           </el-table-column>
231
           </el-table-column>
232
           <el-table-column label="出库数量" align="center">
232
           <el-table-column label="出库数量" align="center">
233
             <template slot-scope="scope">
233
             <template slot-scope="scope">
234
-              {{scope.row.count}}{{scope.row.max_unit}}
234
+              {{getTotalCount(scope.row.drug_id)}}
235
             </template>
235
             </template>
236
           </el-table-column>
236
           </el-table-column>
237
-          <el-table-column label="进货价" align="center">
237
+          <el-table-column label="出货单价" align="center">
238
             <template slot-scope="scope">
238
             <template slot-scope="scope">
239
               {{scope.row.price}}
239
               {{scope.row.price}}
240
             </template>
240
             </template>
241
           </el-table-column>
241
           </el-table-column>
242
+          <el-table-column label="拆零零售价" align="center">
243
+            <template slot-scope="scope">
244
+              {{scope.row.min_price}}
245
+            </template>
246
+          </el-table-column>
242
           <el-table-column label="总价" align="center">
247
           <el-table-column label="总价" align="center">
243
             <template slot-scope="scope">
248
             <template slot-scope="scope">
244
-              {{(scope.row.count * scope.row.price).toFixed(2)}}
249
+              <span>{{getAllPrice(scope.row.drug_id,scope.row.price,scope.row.min_price).toFixed(2)}}</span>
245
             </template>
250
             </template>
246
           </el-table-column>
251
           </el-table-column>
247
           <el-table-column label="生产厂家" align="center">
252
           <el-table-column label="生产厂家" align="center">
277
           </el-table-column>
282
           </el-table-column>
278
           <el-table-column label="操作" align="center">
283
           <el-table-column label="操作" align="center">
279
             <template slot-scope="scope">
284
             <template slot-scope="scope">
280
-              <span style="color: #589ff8" v-if="scope.row.is_sys == 1" @click="toDetail(scope.row)">使用明细</span>
285
+              <span style="color: #589ff8"  @click="toDetail(scope.row)">使用明细</span>
281
             </template>
286
             </template>
282
           </el-table-column>
287
           </el-table-column>
283
         </el-table>
288
         </el-table>
332
             </template>
337
             </template>
333
           </el-table-column>
338
           </el-table-column>
334
 
339
 
340
+
341
+          <el-table-column min-width="35" align="center">
342
+            <template slot="header" slot-scope="scope">
343
+              <span>批次号</span>
344
+            </template>
345
+            <template slot-scope="scope">
346
+              <span>{{getDrugBatchNumber(scope.row.id)}}</span>
347
+            </template>
348
+          </el-table-column>
349
+
335
         </el-table>
350
         </el-table>
336
       </span>
351
       </span>
337
       <span slot="footer" class="dialog-footer">
352
       <span slot="footer" class="dialog-footer">
339
         <el-button type="primary" @click="drugDialogVisible = false">确 定</el-button>
354
         <el-button type="primary" @click="drugDialogVisible = false">确 定</el-button>
340
       </span>
355
       </span>
341
     </el-dialog>
356
     </el-dialog>
357
+
358
+
359
+
360
+    <el-dialog
361
+      title="提示"
362
+      :visible.sync="drugDialogVisibleTwo"
363
+      width="90%">
364
+      <span>
365
+        <el-table :data="userListOne" :class="signAndWeighBoxPatients" style="width: 50%"
366
+                  border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
367
+        >
368
+          <el-table-column min-width="35" align="center">
369
+            <template slot="header" slot-scope="scope">
370
+              <span>序号</span>
371
+            </template>
372
+            <template slot-scope="scope">
373
+              {{scope.$index+1}}
374
+            </template>
375
+          </el-table-column>
376
+
377
+          <el-table-column min-width="35" align="center">
378
+            <template slot="header" slot-scope="scope">
379
+              <span>使用人</span>
380
+            </template>
381
+            <template slot-scope="scope">
382
+              <span>系统</span>
383
+            </template>
384
+          </el-table-column>
385
+          <el-table-column min-width="35" align="center">
386
+            <template slot="header" slot-scope="scope">
387
+              <span>使用数量</span>
388
+            </template>
389
+            <template slot-scope="scope">
390
+               {{scope.row.count}}
391
+            </template>
392
+          </el-table-column>
393
+
394
+          <el-table-column min-width="35" align="center">
395
+            <template slot="header" slot-scope="scope">
396
+              <span>使用时间</span>
397
+            </template>
398
+            <template slot-scope="scope">
399
+              <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
400
+            </template>
401
+          </el-table-column>
402
+
403
+         <el-table-column min-width="35" align="center">
404
+            <template slot="header" slot-scope="scope">
405
+              <span>批号</span>
406
+            </template>
407
+            <template slot-scope="scope">
408
+              <span>{{scope.row.batch_number}} </span>
409
+            </template>
410
+          </el-table-column>
411
+
412
+        </el-table>
413
+      </span>
414
+      <span slot="footer" class="dialog-footer">
415
+        <el-button @click="drugDialogVisibleTwo = false">取 消</el-button>
416
+        <el-button type="primary" @click="drugDialogVisibleTwo = false">确 定</el-button>
417
+      </span>
418
+    </el-dialog>
342
    </div>
419
    </div>
343
 </template>
420
 </template>
344
 
421
 
350
   deleteDrugWarehouseOut,
427
   deleteDrugWarehouseOut,
351
   GetAllConfig,
428
   GetAllConfig,
352
   getDrugWarehouseOutList,
429
   getDrugWarehouseOutList,
353
-  getDrugWarehouseOutInfo,
354
   getDrugWarehouseOutUser,
430
   getDrugWarehouseOutUser,
355
   getDrugAutoMaticList,
431
   getDrugAutoMaticList,
356
   getSinleOrderDetail,
432
   getSinleOrderDetail,
357
-  getAutoDrugDetail
433
+  getAutoDrugDetail,
434
+  getDrugCountList
358
 } from "@/api/drug/drug_stock";
435
 } from "@/api/drug/drug_stock";
359
 import BreadCrumb from "../../components/bread-crumb";
436
 import BreadCrumb from "../../components/bread-crumb";
360
 import { getInitializtion } from '@/api/stock'
437
 import { getInitializtion } from '@/api/stock'
383
       "-" +
460
       "-" +
384
       (nowDay < 10 ? "0" + nowDay : nowDay);
461
       (nowDay < 10 ? "0" + nowDay : nowDay);
385
     this.GetWarehouseOut();
462
     this.GetWarehouseOut();
386
-    // this.GetConfigInfo();
387
     this.fetchAllAdminUsers();
463
     this.fetchAllAdminUsers();
464
+    this.getDrugCountList()
388
   },
465
   },
389
   data() {
466
   data() {
390
     return {
467
     return {
427
       tableShow:false,
504
       tableShow:false,
428
       manufacturerList:[],
505
       manufacturerList:[],
429
       drugDialogVisible:false,
506
       drugDialogVisible:false,
507
+      drugDialogVisibleTwo:false,
430
       order_id:0,
508
       order_id:0,
431
-      dealerList:[]
509
+      dealerList:[],
510
+      countList:[],
511
+      outCountList:[],
512
+      autoCountList:[],
513
+      keyword:"",
514
+      drug_type:0,
515
+      minCount:[],
516
+      drugOutList:[],
517
+      outList:[],
518
+      userListOne:[],
432
     };
519
     };
433
   },
520
   },
434
   methods: {
521
   methods: {
441
         type: this.type,
528
         type: this.type,
442
         keywords: this.searchKey
529
         keywords: this.searchKey
443
       };
530
       };
444
-      console.log("paras22222222",Params)
445
       this.warehouseOutDate = [];
531
       this.warehouseOutDate = [];
446
       getDrugWarehouseOutList(Params).then(response => {
532
       getDrugWarehouseOutList(Params).then(response => {
447
         if (response.data.state == 0) {
533
         if (response.data.state == 0) {
480
           for (let i = 0; i < response.data.data.list.length; i++) {
566
           for (let i = 0; i < response.data.data.list.length; i++) {
481
             this.warehouseOutDate.push(response.data.data.list[i]);
567
             this.warehouseOutDate.push(response.data.data.list[i]);
482
           }
568
           }
483
-          console.log("列表22222",this.warehouseOutDate)
569
+         
484
         }
570
         }
485
       });
571
       });
486
     },
572
     },
509
     },
595
     },
510
     fetchAllAdminUsers() {
596
     fetchAllAdminUsers() {
511
       fetchAllAdminUsers().then(response => {
597
       fetchAllAdminUsers().then(response => {
512
-        console.log(response);
513
         if (response.data.state == 1) {
598
         if (response.data.state == 1) {
514
           this.adminUserOptions = response.data.data.users;
599
           this.adminUserOptions = response.data.data.users;
515
           var alen = this.adminUserOptions.length;
600
           var alen = this.adminUserOptions.length;
571
     },
656
     },
572
 
657
 
573
     handleEdit: function(index, row) {
658
     handleEdit: function(index, row) {
574
-      console.log("row2222222",row)
659
+   
575
       this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys})
660
       this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys})
576
     },
661
     },
577
     handleSearch(val){
662
     handleSearch(val){
644
       }
729
       }
645
       const ids = [];
730
       const ids = [];
646
       for (let i = 0; i < this.selectedTableData.length; i++) {
731
       for (let i = 0; i < this.selectedTableData.length; i++) {
647
-        ids.push(this.selectedTableData[i].id);
732
+        if(this.selectedTableData[i].is_sys == 0){
733
+          ids.push(this.selectedTableData[i].id);
734
+        }
648
       }
735
       }
649
       const idStr = ids.join(",");
736
       const idStr = ids.join(",");
650
       const params = {
737
       const params = {
651
         ids: idStr
738
         ids: idStr
652
       };
739
       };
653
-      this.$confirm("确认删除退货单记录?", "删除退货单记录", {
740
+      this.$confirm("确认删除出库单记录?", "删除出库单记录", {
654
         confirmButtonText: "确定",
741
         confirmButtonText: "确定",
655
         cancelButtonText: "取消",
742
         cancelButtonText: "取消",
656
         type: "warning"
743
         type: "warning"
657
-      })
658
-        .then(() => {
744
+      }).then(() => {
659
           deleteDrugWarehouseOut(params).then(response => {
745
           deleteDrugWarehouseOut(params).then(response => {
660
             if (response.data.state == 0) {
746
             if (response.data.state == 0) {
661
               this.$message.error(response.data.msg);
747
               this.$message.error(response.data.msg);
699
           } else {
785
           } else {
700
             this.userList=[]
786
             this.userList=[]
701
             var total = 0
787
             var total = 0
702
-            console.log("888888888888",response.data.data.list)
788
+
703
             for (let i = 0; i < response.data.data.list.length; i++) {
789
             for (let i = 0; i < response.data.data.list.length; i++) {
704
               var obj = response.data.data.list[i]
790
               var obj = response.data.data.list[i]
705
               obj['is_total'] = 0
791
               obj['is_total'] = 0
770
       getDrugAutoMaticList(params).then(response=>{
856
       getDrugAutoMaticList(params).then(response=>{
771
          if(response.data.state ==1){
857
          if(response.data.state ==1){
772
            var list =   response.data.data.list
858
            var list =   response.data.data.list
773
-           console.log("list222222",list)
774
            this.list = list
859
            this.list = list
775
            var drugConfig =  response.data.data.drugConfig
860
            var drugConfig =  response.data.data.drugConfig
776
-           console.log("drugconfig",drugConfig)
861
+         
777
            this.drugConfig = drugConfig
862
            this.drugConfig = drugConfig
778
            var drugList = response.data.data.drugList
863
            var drugList = response.data.data.drugList
779
-           console.log("药品列表",drugList)
780
            this.drugList = drugList
864
            this.drugList = drugList
781
            var manulist = response.data.data.manufacturerList
865
            var manulist = response.data.data.manufacturerList
782
            this.manufacturerList = manulist
866
            this.manufacturerList = manulist
816
       getInitializtion().then(response=>{
900
       getInitializtion().then(response=>{
817
           if(response.data.state ==1){
901
           if(response.data.state ==1){
818
             var drugTypeList = response.data.data.drugTypeList
902
             var drugTypeList = response.data.data.drugTypeList
819
-            console.log("hhhhhhh",drugTypeList)
903
+
820
             this.drugTypeList = drugTypeList
904
             this.drugTypeList = drugTypeList
821
           }
905
           }
822
       })
906
       })
857
           this.tableShow = true
941
           this.tableShow = true
858
           this.tableList = []
942
           this.tableList = []
859
           var list =  response.data.data.list
943
           var list =  response.data.data.list
860
-          console.log("list",list)
944
+          var outList = response.data.data.outList
945
+          for(let i=0;i<outList.length;i++){
946
+              //如果都是最大单位,把最数量转为最小数量
947
+             if(outList[i].count_unit == outList[i].max_unit){
948
+                outList[i].count = outList[i].min_number * outList[i].count 
949
+             }
950
+          }
951
+          this.outList = outList
952
+       
953
+          // console.log("list",list)
954
+          // console.log("outList222",outList)
861
          this.manufacturerList = response.data.data.manufacturerList
955
          this.manufacturerList = response.data.data.manufacturerList
862
          this.dealerList = response.data.data.dealerList
956
          this.dealerList = response.data.data.dealerList
863
          for(let i=0;i<list.length;i++){
957
          for(let i=0;i<list.length;i++){
874
      })
968
      })
875
    },
969
    },
876
    toDetail(val){
970
    toDetail(val){
877
-    
878
      console.log("val",val)
971
      console.log("val",val)
879
      var params = {
972
      var params = {
973
+       warehouse_out_id:val.warehouse_out_id,
880
        drug_id:val.drug_id,
974
        drug_id:val.drug_id,
881
        record_time:val.sys_record_time,
975
        record_time:val.sys_record_time,
882
      }
976
      }
883
      this.userList = []
977
      this.userList = []
884
      getAutoDrugDetail(params).then(response=>{
978
      getAutoDrugDetail(params).then(response=>{
885
        if(response.data.state == 1){
979
        if(response.data.state == 1){
886
-        this.drugDialogVisible = true
980
+      
887
         var total = 0
981
         var total = 0
888
         for (let i = 0; i < response.data.data.list.length; i++) {
982
         for (let i = 0; i < response.data.data.list.length; i++) {
889
           var obj = response.data.data.list[i]
983
           var obj = response.data.data.list[i]
890
           obj['is_total'] = 0
984
           obj['is_total'] = 0
891
           this.userList.push(obj)
985
           this.userList.push(obj)
892
-          total = total + response.data.data.list[i].count
986
+         total = this.getTotalCount(response.data.data.list[i].drug_id)
893
         }
987
         }
894
-        console.log("出库数据222222222",this.userList)
895
         this.userList.push({
988
         this.userList.push({
896
           is_total: 1,
989
           is_total: 1,
897
           total: total,
990
           total: total,
898
         })
991
         })
992
+        if(val.is_sys == 1){
993
+          this.drugDialogVisible = true
994
+        }
995
+        if(val.is_sys == 0){
996
+          this.drugDialogVisibleTwo = true
997
+        }
998
+         var userListOne = response.data.data.outList
999
+         console.log("手动出库2232332",userListOne)
1000
+         this.userListOne = userListOne
899
        }
1001
        }
900
      })
1002
      })
901
    },
1003
    },
905
      }else{
1007
      }else{
906
        this.$router.push({path:"/stock/drugStockOutOrderDetailPrint?id="+this.order_id})
1008
        this.$router.push({path:"/stock/drugStockOutOrderDetailPrint?id="+this.order_id})
907
      }
1009
      }
908
-   }
1010
+   },
1011
+
1012
+    getDrugCountList(){
1013
+         var params = {
1014
+          keyword: this.keywords,
1015
+          start_time:this.start_time,
1016
+          end_time:this.end_time,
1017
+         }
1018
+         console.log("paramsw2ww",params)
1019
+        getDrugCountList(params).then(response=>{
1020
+          if(response.data.state == 1){
1021
+            var countlist =  response.data.data.countList
1022
+            // console.log("入库数据",countlist)
1023
+            this.countList = countlist
1024
+            var outcountlist = response.data.data.outCountList
1025
+            // console.log("出库数据",outcountlist)
1026
+            this.outCountList = outcountlist
1027
+            var aucountlist = response.data.data.auCountList
1028
+            // console.log("自动数据",aucountlist)
1029
+            this.autoCountList = aucountlist
1030
+            var minCount = response.data.data.minCount
1031
+            // console.log("minCount",minCount)
1032
+            this.minCount = minCount
1033
+            var info = response.data.data.info
1034
+            for(let i=0;i<info.length;i++){
1035
+              if(info[i].count_unit == info[i].max_unit){
1036
+                 info[i].count = info[i].count * info[i].min_number
1037
+              }
1038
+            }
1039
+            // console.log("info2222222",info)
1040
+            this.drugOutList = info
1041
+          }
1042
+        })
1043
+      },
1044
+    
1045
+      getCount(drug_id,min_number,max_unit,min_unit){
1046
+        var count= 0
1047
+        var str = ""
1048
+        var min_str = ""
1049
+        for(let i=0;i<this.drugOutList.length;i++){
1050
+          if(drug_id == this.drugOutList[i].drug_id){
1051
+             count += parseInt(this.drugOutList[i].count)
1052
+          }
1053
+        }
1054
+        if(parseInt(count/min_number)!=0){
1055
+          str = parseInt(count/min_number)+ max_unit
1056
+        }
1057
+        if((count%min_number)!=0){
1058
+          min_str =  count%min_number + min_unit
1059
+        }
1060
+        return str + min_str
1061
+      },
1062
+      getTotalCount(drug_id){
1063
+         var str = ""
1064
+         var min_str = ""
1065
+         for(let i=0;i<this.outList.length;i++){
1066
+           if(this.outList[i].drug_id == drug_id){
1067
+            if(parseInt(this.outList[i].count/this.outList[i].min_number)!=0){
1068
+              str = parseInt(this.outList[i].count/this.outList[i].min_number)+ this.outList[i].max_unit
1069
+            }
1070
+            if((this.outList[i].count%this.outList[i].min_number)!=0){
1071
+              min_str =  this.outList[i].count%this.outList[i].min_number + this.outList[i].min_unit
1072
+            }
1073
+           }
1074
+         }
1075
+         return str + min_str
1076
+      },
1077
+      getAllPrice(drug_id,price,min_price){
1078
+         var strprice = 0
1079
+         var minstrprice = 0
1080
+         var str = ""
1081
+         var min_str = ""
1082
+         var total_price = 0
1083
+         for(let i=0;i<this.outList.length;i++){
1084
+           if(this.outList[i].drug_id == drug_id){
1085
+            if(parseInt(this.outList[i].count/this.outList[i].min_number)!=0){
1086
+              str = parseInt(this.outList[i].count/this.outList[i].min_number)
1087
+            }
1088
+            if((this.outList[i].count%this.outList[i].min_number)!=0){
1089
+              min_str =  this.outList[i].count%this.outList[i].min_number
1090
+            }
1091
+           }
1092
+         }
1093
+         strprice = str * price 
1094
+         minstrprice = min_str * min_price 
1095
+        //  console.log("strprice3",strprice)
1096
+        //  console.log("minstrprice",minstrprice)
1097
+         total_price = strprice + minstrprice
1098
+         return  total_price
1099
+      },
1100
+
1101
+      getDrugBatchNumber(id){
1102
+        
1103
+        var arr= []
1104
+        var batchNumber =[]
1105
+        
1106
+        for(let i=0;i<this.userList.length;i++){
1107
+           if(id == this.userList[i].id){
1108
+            arr.push(this.userList[i].drugwarehouseoutinfo)
1109
+           }
1110
+        }
1111
+        if(batchNumber.length > 0 ){
1112
+         for(let j=0;j<arr.length;j++){
1113
+           batchNumber.push(arr[j].batch_number)
1114
+          }
1115
+        }
1116
+        return batchNumber.join(",")
1117
+      }
909
     
1118
     
910
   }
1119
   }
911
 };
1120
 };

+ 53 - 42
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Datei anzeigen

27
     <div class="app-container">
27
     <div class="app-container">
28
   
28
   
29
 
29
 
30
-      <drugs-stock-dialog
30
+      <!-- <drugs-stock-dialog
31
         ref="dialog" :propForm="propForm"
31
         ref="dialog" :propForm="propForm"
32
         :visibility="isVisibility"
32
         :visibility="isVisibility"
33
         v-on:dialog-comfirm="comfirm"
33
         v-on:dialog-comfirm="comfirm"
34
         v-on:dialog-cancle="cancle"
34
         v-on:dialog-cancle="cancle"
35
-      ></drugs-stock-dialog>
35
+      ></drugs-stock-dialog> -->
36
 
36
 
37
 
37
 
38
       <div class="cell clearfix">
38
       <div class="cell clearfix">
73
                     popper-class="my-autocomplete"
73
                     popper-class="my-autocomplete"
74
                     v-model="scope.row.drug_name"
74
                     v-model="scope.row.drug_name"
75
                     :fetch-suggestions="querySearchAsync"
75
                     :fetch-suggestions="querySearchAsync"
76
-                    :trigger-on-focus="false"
76
+                    :trigger-on-focus="true"
77
                     placeholder="请输入药品名称"
77
                     placeholder="请输入药品名称"
78
                     @select="handleSelect"
78
                     @select="handleSelect"
79
                     @input="changeGoodName(scope.$index)"
79
                     @input="changeGoodName(scope.$index)"
122
               </template>
122
               </template>
123
                 <template slot-scope="scope">
123
                 <template slot-scope="scope">
124
                   <el-form-item style="padding-top: 20px">
124
                   <el-form-item style="padding-top: 20px">
125
-                    <el-input
125
+                    <!-- <el-input
126
                       placeholder="请输入批号"
126
                       placeholder="请输入批号"
127
                       v-model="scope.row.batch_number"
127
                       v-model="scope.row.batch_number"
128
-                    ></el-input>
128
+                    ></el-input> -->
129
+                    <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
130
+                      <el-option
131
+                        v-for="(item,index) in numberList"
132
+                        :key="index"
133
+                        :label="item.batch_number"
134
+                        :value="item.batch_number">
135
+                      </el-option>
136
+                    </el-select>
129
                   </el-form-item>
137
                   </el-form-item>
130
               </template>
138
               </template>
131
           </el-table-column>
139
           </el-table-column>
145
                     type="number"
153
                     type="number"
146
                     v-model="scope.row.count"
154
                     v-model="scope.row.count"
147
                   ></el-input>
155
                   ></el-input>
148
-                  {{scope.row.packing_unit}}
149
                 </div>
156
                 </div>
150
               </el-form-item>
157
               </el-form-item>
151
-              
158
+              <el-select v-model="scope.row.max_unit" filterable placeholder="请选择单位">
159
+                <el-option
160
+                  v-for="(option, index) in unitList"
161
+                  :key="index"
162
+                  :label="option.name"
163
+                  :value="option.name">
164
+                </el-option>
165
+               </el-select>
152
             </template>
166
             </template>
167
+
153
           </el-table-column>
168
           </el-table-column>
154
           <el-table-column width="120" align="center">
169
           <el-table-column width="120" align="center">
155
             <template slot="header" slot-scope="scope">
170
             <template slot="header" slot-scope="scope">
220
         
235
         
221
         <el-table-column align="center" width="150" label="批准文号">
236
         <el-table-column align="center" width="150" label="批准文号">
222
             <template slot-scope="scope">
237
             <template slot-scope="scope">
223
-              <el-form-item style="padding-top: 20px">
238
+              <el-form-item style="padding-top: 20px" :disabled="true">
224
                 <el-input
239
                 <el-input
240
+                  :disabled="true"
225
                   placeholder="请输入批准文号"
241
                   placeholder="请输入批准文号"
226
                   v-model="scope.row.number"
242
                   v-model="scope.row.number"
227
                 ></el-input>
243
                 ></el-input>
235
                 <el-option
251
                 <el-option
236
                   v-for="(option, index) in dealerList"
252
                   v-for="(option, index) in dealerList"
237
                   :key="index"
253
                   :key="index"
238
-                  :label="option.dealer"
254
+                  :label="option.dealer_name"
239
                   :value="option.id">
255
                   :value="option.id">
240
                 </el-option>
256
                 </el-option>
241
                </el-select>
257
                </el-select>
288
 
304
 
289
 <script>
305
 <script>
290
 import { uParseTime } from "@/utils/tools";
306
 import { uParseTime } from "@/utils/tools";
291
-import {  postDrugWarehouseOut,GetAllConfig,GetAllDrugInfoByID } from "@/api/drug/drug_stock";
307
+import {  postDrugWarehouseOut,GetAllConfig,GetAllDrugInfoByID,getDrugBatchNumber } from "@/api/drug/drug_stock";
292
 
308
 
293
 import BreadCrumb from "../../components/bread-crumb";
309
 import BreadCrumb from "../../components/bread-crumb";
294
 import DrugsStockDialog from './drugsStockDialog/index'
310
 import DrugsStockDialog from './drugsStockDialog/index'
353
       showTwo:false,
369
       showTwo:false,
354
       drugTypeList:[],
370
       drugTypeList:[],
355
       totalPrice:0,
371
       totalPrice:0,
372
+      unitList:[],
373
+      numberList:[]
356
     };
374
     };
357
   },
375
   },
358
   methods: {
376
   methods: {
359
-    // comfirm: function(val) {
360
-    //   this.propForm.goodType = []
361
-    //   this.propForm.goods = []
362
-
363
-    //   this.$refs.dialog.hide()
364
-
365
-    //   if (val.selectedGoodInfo.length > 0) {
366
-    //     for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
367
-    //       if (i == 0) {
368
-    //         this.recordInfo.recordData[this.currentIndex].drug_id = val.selectedGoodInfo[i].id
369
-    //         this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].last_price.toString()
370
-    //         this.recordInfo.recordData[this.currentIndex].retail_price = val.selectedGoodInfo[i].retail_price.toString()
371
-    //         this.recordInfo.recordData[this.currentIndex].min_unit = val.selectedGoodInfo[i].min_unit.toString()
372
-    //       } else {
373
-    //         const tempForm = {}
374
-    //         tempForm['drug_id'] = val.selectedGoodInfo[i].id
375
-    //         tempForm['retail_price'] = val.selectedGoodInfo[i].retail_price.toString()
376
-    //         tempForm['price'] =  val.selectedGoodInfo[i].last_price.toString()
377
-    //         tempForm['count'] = ''
378
-    //         tempForm['remark'] = ''
379
-    //         tempForm['min_unit'] = val.selectedGoodInfo[i].min_unit
380
-    //         this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
381
-    //       }
382
-    //     }
383
-    //   }
384
-
385
-    //   this.currentIndex = -1
386
-
387
-    // },
377
+    
388
     cancle: function() {
378
     cancle: function() {
389
       this.$refs.dialog.hide();
379
       this.$refs.dialog.hide();
390
     },
380
     },
455
       tempObj["min_number"] = ""
445
       tempObj["min_number"] = ""
456
       tempObj["number"] = ""
446
       tempObj["number"] = ""
457
       tempObj["batch_number"] = ""
447
       tempObj["batch_number"] = ""
448
+      tempObj["max_unit"] = ""
458
       this.recordInfo.recordData.push(tempObj);
449
       this.recordInfo.recordData.push(tempObj);
459
     },
450
     },
460
     handleDelete: function(index, row) {
451
     handleDelete: function(index, row) {
592
             } else {
583
             } else {
593
               var msg = response.data.data.msg
584
               var msg = response.data.data.msg
594
               var drug_name =  response.data.data.drug_name
585
               var drug_name =  response.data.data.drug_name
586
+              console.log("drug_name",drug_name)
595
               var dose = response.data.data.dose
587
               var dose = response.data.data.dose
588
+              console.log("dose",dose)
596
               var dose_unit = response.data.data.dose_unit
589
               var dose_unit = response.data.data.dose_unit
590
+              console.log("dose_unit",dose_unit)
597
               var min_number = response.data.data.min_number
591
               var min_number = response.data.data.min_number
592
+              console.log("min_number",min_number)
598
               var min_unit =  response.data.data.min_unit
593
               var min_unit =  response.data.data.min_unit
594
+              console.log("min_unit",min_unit)
599
               var max_unit =  response.data.data.max_unit
595
               var max_unit =  response.data.data.max_unit
600
-
601
-              var str = drug_name + "" + dose + dose_unit * min_number + min_unit+"/"+max_unit
596
+              console.log("max_unit",max_unit)
597
+              var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
602
               console.log("str22222222",str)
598
               console.log("str22222222",str)
603
               if(msg == 1){
599
               if(msg == 1){
604
                 this.$message.error(str + "库存不足,请入库")
600
                 this.$message.error(str + "库存不足,请入库")
636
         postSearchDrugList(key).then(response => {
632
         postSearchDrugList(key).then(response => {
637
           if (response.data.state == 1) {
633
           if (response.data.state == 1) {
638
             searchArray = response.data.data.list;
634
             searchArray = response.data.data.list;
639
-            
640
              var list = response.data.data.list
635
              var list = response.data.data.list
641
              console.log("list99999999",list)
636
              console.log("list99999999",list)
642
              this.drugList = list
637
              this.drugList = list
644
              this.manufacturerList = manufacturerList
639
              this.manufacturerList = manufacturerList
645
              var dealerList = response.data.data.dealerList
640
              var dealerList = response.data.data.dealerList
646
              this.dealerList = dealerList
641
              this.dealerList = dealerList
642
+             console.log("经销商",this.dealerList)
647
              for(let i=0;i<this.drugList.length;i++){
643
              for(let i=0;i<this.drugList.length;i++){
648
                 for(let j=0;j<this.manufacturerList.length;j++){
644
                 for(let j=0;j<this.manufacturerList.length;j++){
649
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
645
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
669
       },
665
       },
670
       handleSelect(val){
666
       handleSelect(val){
671
         console.log("val2222222",val)
667
         console.log("val2222222",val)
668
+         this.getDrugBatchNumber(val.id)
672
         for(let i=0;i<this.recordInfo.recordData.length;i++){
669
         for(let i=0;i<this.recordInfo.recordData.length;i++){
673
           if(this.currentIndex == i){
670
           if(this.currentIndex == i){
674
             this.recordInfo.recordData[i].drug_id = val.id
671
             this.recordInfo.recordData[i].drug_id = val.id
701
       getDictionaryDataConfig(module, filed_name) {
698
       getDictionaryDataConfig(module, filed_name) {
702
         return getDictionaryDataConfig(module, filed_name)
699
         return getDictionaryDataConfig(module, filed_name)
703
       },
700
       },
701
+      getDrugBatchNumber(id){
702
+          var params = {
703
+            id:id
704
+          }
705
+        getDrugBatchNumber(params).then(response=>{
706
+           if(response.data.state == 1){
707
+             var list = response.data.data.list
708
+             console.log("list2222",list)
709
+             this.numberList = list
710
+           }
711
+        })
712
+      }
704
   },
713
   },
705
   created() {
714
   created() {
706
     this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
715
     this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
731
     this.recordInfo.recordData.push(tempObj);
740
     this.recordInfo.recordData.push(tempObj);
732
     this.GetConfigInfo();
741
     this.GetConfigInfo();
733
     this.propForm.goodUnit = this.$store.getters.good_unit;
742
     this.propForm.goodUnit = this.$store.getters.good_unit;
743
+    this.unitList =  getDataConfig('hemodialysis','units')
744
+    console.log("单位",this.unitList)
734
   }
745
   }
735
 };
746
 };
736
 </script>
747
 </script>

+ 6 - 5
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Datei anzeigen

40
                     popper-class="my-autocomplete"
40
                     popper-class="my-autocomplete"
41
                     v-model="scope.row.drug_name"
41
                     v-model="scope.row.drug_name"
42
                     :fetch-suggestions="querySearchAsync"
42
                     :fetch-suggestions="querySearchAsync"
43
-                    :trigger-on-focus="false"
43
+                    :trigger-on-focus="true"
44
                     placeholder="请输入药品名称"
44
                     placeholder="请输入药品名称"
45
                     @select="handleSelect"
45
                     @select="handleSelect"
46
                     @input="changeDrugName(scope.$index)"
46
                     @input="changeDrugName(scope.$index)"
115
                     type="number"
115
                     type="number"
116
                     v-model="scope.row.count"
116
                     v-model="scope.row.count"
117
                   ></el-input>
117
                   ></el-input>
118
-                  {{scope.row.packing_unit}}
118
+                  {{scope.row.count_unit}}
119
                 </div>
119
                 </div>
120
               </el-form-item>
120
               </el-form-item>
121
               
121
               
143
           </el-table-column>
143
           </el-table-column>
144
            <el-table-column label="总价" width="80" align="center">
144
            <el-table-column label="总价" width="80" align="center">
145
             <template slot-scope="scope">
145
             <template slot-scope="scope">
146
-              {{ calculate(scope.row.last_price * scope.row.count) }}
146
+              {{ calculate(scope.row.price * scope.row.count) }}
147
             </template>
147
             </template>
148
           </el-table-column>
148
           </el-table-column>
149
           <el-table-column label="生产厂家" width="140" align="center">
149
           <el-table-column label="生产厂家" width="140" align="center">
200
           </el-table-column>
200
           </el-table-column>
201
            <el-table-column align="center" width="150" label="批准文号">
201
            <el-table-column align="center" width="150" label="批准文号">
202
             <template slot-scope="scope">
202
             <template slot-scope="scope">
203
-              <el-form-item style="padding-top: 20px">
203
+              <el-form-item style="padding-top: 20px" :disabled="true">
204
                 <el-input
204
                 <el-input
205
                  :disabled="drug_show"
205
                  :disabled="drug_show"
206
                   placeholder="请输入批准文号"
206
                   placeholder="请输入批准文号"
570
             return false
570
             return false
571
           } else {
571
           } else {
572
              console.log("出库详情",response.data.data.list)
572
              console.log("出库详情",response.data.data.list)
573
+
573
             var manulist = response.data.data.manulist
574
             var manulist = response.data.data.manulist
574
             this.manufacturerList = manulist
575
             this.manufacturerList = manulist
575
             this.dealerList =  response.data.data.dealerList
576
             this.dealerList =  response.data.data.dealerList
591
               
592
               
592
              
593
              
593
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
594
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
594
-              response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
595
+              response.data.data.list[i].retail_price = response.data.data.list[i].price.toString()
595
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
596
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
596
               if(response.data.data.list[i].dealer == "0" || response.data.data.list[i].dealer == 0){
597
               if(response.data.data.list[i].dealer == "0" || response.data.data.list[i].dealer == 0){
597
                   response.data.data.list[i].dealer = ""
598
                   response.data.data.list[i].dealer = ""

+ 8 - 2
src/xt_pages/stock/drugs/query.vue Datei anzeigen

123
         </el-table-column>
123
         </el-table-column>
124
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
124
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
125
            <template slot-scope="scope">
125
            <template slot-scope="scope">
126
-           
127
-            {{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
126
+             <span v-if="getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)!=''">{{getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span>
127
+              <span v-if="getCountTwo(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit) ==''">0{{scope.row.max_unit}}0{{scope.row.min_unit}}</span>
128
            </template>
128
            </template>
129
         </el-table-column>
129
         </el-table-column>
130
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
130
         <el-table-column prop="drug_name" label="操作" align="center" width="200px">
647
         return count
647
         return count
648
       },
648
       },
649
      getCountTwo(drug_id,min_number,max_unit,min_unit){
649
      getCountTwo(drug_id,min_number,max_unit,min_unit){
650
+      
650
        var total_count = 0
651
        var total_count = 0
651
        var out_count = 0
652
        var out_count = 0
652
        var count = 0
653
        var count = 0
653
        var str = ""
654
        var str = ""
654
        var str_min = ""
655
        var str_min = ""
655
        total_count = this.getInCount(drug_id) * min_number
656
        total_count = this.getInCount(drug_id) * min_number
657
+
656
        out_count = this.getCountOne(drug_id)
658
        out_count = this.getCountOne(drug_id)
657
        count = total_count-out_count
659
        count = total_count-out_count
660
+
658
        if(parseInt(count/min_number)!=0){
661
        if(parseInt(count/min_number)!=0){
659
          str = parseInt(count/min_number) + max_unit
662
          str = parseInt(count/min_number) + max_unit
660
        }
663
        }
664
+       console.log("str2222",str)
661
        if((count%min_number)!=0){
665
        if((count%min_number)!=0){
662
          str_min = count%min_number + min_unit
666
          str_min = count%min_number + min_unit
663
        }
667
        }
668
+
669
+       console.log("str0000000",str,str_min)
664
        return str+str_min
670
        return str+str_min
665
      }
671
      }
666
     }
672
     }

+ 14 - 7
src/xt_pages/stock/stockFlow.vue Datei anzeigen

63
         </el-table-column>
63
         </el-table-column>
64
         <el-table-column prop="drug_type" label="出入库方式" width="180" align="center">
64
         <el-table-column prop="drug_type" label="出入库方式" width="180" align="center">
65
            <template slot-scope="scope">
65
            <template slot-scope="scope">
66
-             <span v-if="scope.row.stock_way == 4">采购入库</span>
66
+             <span v-if="scope.row.stock_way == 4">手动入库</span>
67
              <span v-if="scope.row.stock_way == 3">手动出库</span>
67
              <span v-if="scope.row.stock_way == 3">手动出库</span>
68
              <span v-if="scope.row.stock_way == 2">自动出库</span>
68
              <span v-if="scope.row.stock_way == 2">自动出库</span>
69
            </template>
69
            </template>
86
              <span v-if="(scope.row.stock_way == 2 || scope.row.stock_way == 3) && scope.row.count!=0">{{scope.row.count}}{{packing_unit}}</span>
86
              <span v-if="(scope.row.stock_way == 2 || scope.row.stock_way == 3) && scope.row.count!=0">{{scope.row.count}}{{packing_unit}}</span>
87
            </template>
87
            </template>
88
         </el-table-column>
88
         </el-table-column>
89
+       <el-table-column label="退库数量" align="center">
90
+         <template slot-scope="scope">
91
+           <span>{{getCancelCount(scope.row.good_id)}}{{packing_unit}}</span>
92
+
93
+         </template>
94
+       </el-table-column>
89
          <el-table-column prop="drug_name" label="剩余库存量"  align="center">
95
          <el-table-column prop="drug_name" label="剩余库存量"  align="center">
90
            <template slot-scope="scope">
96
            <template slot-scope="scope">
91
              <!-- <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span> -->
97
              <!-- <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span> -->
205
           {id:0,name:"全部"},
211
           {id:0,name:"全部"},
206
           {id:3,name:"手动出库"},
212
           {id:3,name:"手动出库"},
207
           {id:2,name:"自动出库"},
213
           {id:2,name:"自动出库"},
208
-          {id:4,name:"采购入库"},
214
+          {id:4,name:"手动入库"},
209
         ],
215
         ],
210
         countList:[],
216
         countList:[],
211
         outCountList:[],
217
         outCountList:[],
292
            }
298
            }
293
            var total = response.data.data.total
299
            var total = response.data.data.total
294
            this.total = total
300
            this.total = total
295
-           console.log("入库数据",this.tableList)
301
+          //  console.log("入库数据",this.tableList)
296
            var manufacturerList = response.data.data.manufacturerList
302
            var manufacturerList = response.data.data.manufacturerList
297
            this.manufacturerList = manufacturerList
303
            this.manufacturerList = manufacturerList
298
          }
304
          }
320
              }
326
              }
321
              this.tableList.push(outList[i])
327
              this.tableList.push(outList[i])
322
            }
328
            }
329
+          console.log("hhhhhhhhhh",this.tableList)
323
           var total = response.data.data.total
330
           var total = response.data.data.total
324
           this.total = total
331
           this.total = total
325
         }  
332
         }  
334
       getStockDrugCount(params).then(response=>{
341
       getStockDrugCount(params).then(response=>{
335
          if(response.data.state == 1){
342
          if(response.data.state == 1){
336
            var count = response.data.data.count
343
            var count = response.data.data.count
337
-           console.log("详情入库统计",count)
344
+          //  console.log("详情入库统计",count)
338
            this.countList = count
345
            this.countList = count
339
            var outlist = response.data.data.outList
346
            var outlist = response.data.data.outList
340
-           console.log("详情出库数量",outlist)
347
+          //  console.log("详情出库数量",outlist)
341
           
348
           
342
            this.outCountList = outlist
349
            this.outCountList = outlist
343
            var autoCount = response.data.data.autoCount
350
            var autoCount = response.data.data.autoCount
344
-           console.log("详情自动出库",autoCount)
351
+          //  console.log("详情自动出库",autoCount)
345
            this.autoCountList = autoCount
352
            this.autoCountList = autoCount
346
            var totalCount = response.data.data.totalCount
353
            var totalCount = response.data.data.totalCount
347
-           console.log("totalcount",totalCount)
354
+          //  console.log("totalcount",totalCount)
348
            this.cancelCountList = totalCount
355
            this.cancelCountList = totalCount
349
          }
356
          }
350
       })
357
       })

+ 6 - 5
src/xt_pages/stock/stockInOrder.vue Datei anzeigen

1474
            }
1474
            }
1475
           for(let i=0;i<list.length;i++){
1475
           for(let i=0;i<list.length;i++){
1476
             list[i].unit = list[i].specification_name + list[i].packing_unit
1476
             list[i].unit = list[i].specification_name + list[i].packing_unit
1477
-            list[i].total_price = (list[i].total_count * list[i].price).toFixed(2)
1477
+            list[i].total_price = (list[i].warehousing_count * list[i].price).toFixed(2)
1478
             list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{m}-{d}")
1478
             list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{m}-{d}")
1479
             list[i].product_date = this.getTime(list[i].product_date,"{y}-{m}-{d}")
1479
             list[i].product_date = this.getTime(list[i].product_date,"{y}-{m}-{d}")
1480
             for(let j=0;j<this.manufacturer.length;j++){
1480
             for(let j=0;j<this.manufacturer.length;j++){
1482
                   list[i].manufacturer = this.manufacturer[j].manufacturer_name
1482
                   list[i].manufacturer = this.manufacturer[j].manufacturer_name
1483
                }
1483
                }
1484
             }
1484
             }
1485
-
1485
+           console.log("经销⬆商",this.dealer)
1486
            for(let z=0;z<this.dealer.length;z++){
1486
            for(let z=0;z<this.dealer.length;z++){
1487
-               if(list[i].dealer = this.dealer[z].id){
1487
+               if(list[i].dealer == this.dealer[z].id){
1488
                  list[i].dealer = this.dealer[z].dealer_name
1488
                  list[i].dealer = this.dealer[z].dealer_name
1489
                }
1489
                }
1490
             }
1490
             }
1491
           }
1491
           }
1492
           console.log("表格2222222",this.exportList)
1492
           console.log("表格2222222",this.exportList)
1493
+          
1493
           this.exportList = list
1494
           this.exportList = list
1494
         }
1495
         }
1495
       })
1496
       })
1501
       }
1502
       }
1502
       import('@/vendor/Export2Excel').then(excel => {
1503
       import('@/vendor/Export2Excel').then(excel => {
1503
 
1504
 
1504
-      const tHeader = ['耗材名称','注册证号/批准文号/备案凭证号', '规格型号','生产厂家','单位','进货价','入库数量','总价','批号','生产日期','有效日期']
1505
-      const filterVal = ['good_name', 'license_number', 'unit','manufacturer','packing_unit','price','warehousing_count','total_price','number','product_date','expiry_date']
1505
+      const tHeader = ['耗材名称','注册证号/批准文号/备案凭证号', '规格型号','生产厂家','单位','进货价','入库数量','总价','批号','生产日期','有效日期','经销商']
1506
+      const filterVal = ['good_name', 'license_number', 'unit','manufacturer','packing_unit','price','warehousing_count','total_price','number','product_date','expiry_date','dealer']
1506
 
1507
 
1507
       console.log("table",this.exportList)
1508
       console.log("table",this.exportList)
1508
       
1509
       

+ 3 - 3
src/xt_pages/stock/stockInOrderAdd.vue Datei anzeigen

42
                     popper-class="my-autocomplete"
42
                     popper-class="my-autocomplete"
43
                     v-model="scope.row.good_name"
43
                     v-model="scope.row.good_name"
44
                     :fetch-suggestions="querySearchAsync"
44
                     :fetch-suggestions="querySearchAsync"
45
-                    :trigger-on-focus="false"
45
+                    :trigger-on-focus="true"
46
                     placeholder="请输入耗材名称"
46
                     placeholder="请输入耗材名称"
47
                     @select="handleSelect"
47
                     @select="handleSelect"
48
                     @input="changeGoodName(scope.$index)"
48
                     @input="changeGoodName(scope.$index)"
167
             </template>
167
             </template>
168
             <template slot-scope="scope">
168
             <template slot-scope="scope">
169
               <el-form-item style="padding-top: 20px">
169
               <el-form-item style="padding-top: 20px">
170
-                <el-input placeholder="请输入批号" v-model="scope.row.license_number"></el-input>
170
+                <el-input placeholder="请输入批号" v-model="scope.row.license_number" ></el-input>
171
               </el-form-item>
171
               </el-form-item>
172
             </template>
172
             </template>
173
           </el-table-column>
173
           </el-table-column>
732
         })
732
         })
733
       },
733
       },
734
       changeGoodName(val){
734
       changeGoodName(val){
735
+        console.log("val",val)
735
         this.currentIndex = val
736
         this.currentIndex = val
736
       },
737
       },
737
       handleSelect(val){
738
       handleSelect(val){
738
-        console.log("val",val)
739
          for(let i=0;i<this.recordInfo.recordData.length;i++){
739
          for(let i=0;i<this.recordInfo.recordData.length;i++){
740
            if(this.currentIndex == i){
740
            if(this.currentIndex == i){
741
               this.recordInfo.recordData[i].good_type_id = val.id
741
               this.recordInfo.recordData[i].good_type_id = val.id

+ 2 - 1
src/xt_pages/stock/stockInOrderEdit.vue Datei anzeigen

109
                     popper-class="my-autocomplete"
109
                     popper-class="my-autocomplete"
110
                     v-model="scope.row.good_name"
110
                     v-model="scope.row.good_name"
111
                     :fetch-suggestions="querySearchAsync"
111
                     :fetch-suggestions="querySearchAsync"
112
-                    :trigger-on-focus="false"
112
+                    :trigger-on-focus="true"
113
                     placeholder="请输入耗材名称"
113
                     placeholder="请输入耗材名称"
114
                     @select="handleSelect"
114
                     @select="handleSelect"
115
                     @input="changeGoodName(scope.$index)"
115
                     @input="changeGoodName(scope.$index)"
273
                 <el-input
273
                 <el-input
274
                   placeholder="请输入批号"
274
                   placeholder="请输入批号"
275
                   v-model="scope.row.license_number"
275
                   v-model="scope.row.license_number"
276
+                  
276
                 ></el-input>
277
                 ></el-input>
277
               </el-form-item>
278
               </el-form-item>
278
             </template>
279
             </template>

+ 88 - 38
src/xt_pages/stock/stockOutOrder.vue Datei anzeigen

194
               {{ scope.row.specification_name}} / {{scope.row.packing_unit}}
194
               {{ scope.row.specification_name}} / {{scope.row.packing_unit}}
195
             </template>
195
             </template>
196
           </el-table-column>
196
           </el-table-column>
197
-          <el-table-column label="批号" align="center">
197
+          <!-- <el-table-column label="批号" align="center">
198
             <template slot-scope="scope">
198
             <template slot-scope="scope">
199
               {{ scope.row.number}}
199
               {{ scope.row.number}}
200
             </template>
200
             </template>
201
-          </el-table-column>
201
+          </el-table-column> -->
202
           <el-table-column label="出库数量" align="center">
202
           <el-table-column label="出库数量" align="center">
203
             <template slot-scope="scope">
203
             <template slot-scope="scope">
204
               <span v-if="scope.row.is_sys == 0">{{ scope.row.count}}{{scope.row.packing_unit}}</span> 
204
               <span v-if="scope.row.is_sys == 0">{{ scope.row.count}}{{scope.row.packing_unit}}</span> 
212
           </el-table-column>
212
           </el-table-column>
213
           <el-table-column label="总价" align="center">
213
           <el-table-column label="总价" align="center">
214
             <template slot-scope="scope">
214
             <template slot-scope="scope">
215
-              {{ (scope.row.count * scope.row.price).toFixed(2)}}
215
+             <span v-if="scope.row.is_sys == 0">{{ (scope.row.count * scope.row.price).toFixed(2)}}</span> 
216
+             <span v-if="scope.row.is_sys == 1">{{(getOutStockCount(scope.row.good_id)*scope.row.price).toFixed(2)}}</span>
216
             </template>
217
             </template>
217
           </el-table-column>
218
           </el-table-column>
218
           <el-table-column label="生产厂家" align="center">
219
           <el-table-column label="生产厂家" align="center">
235
               {{ getTime(scope.row.expiry_date,"{y}-{m}-{d}")}}
236
               {{ getTime(scope.row.expiry_date,"{y}-{m}-{d}")}}
236
             </template>
237
             </template>
237
           </el-table-column>
238
           </el-table-column>
238
-          <el-table-column label="批准文号" align="center">
239
+          <!-- <el-table-column label="批准文号" align="center">
239
             <template slot-scope="scope">
240
             <template slot-scope="scope">
240
               {{ scope.row.license_number}}
241
               {{ scope.row.license_number}}
241
             </template>
242
             </template>
242
-          </el-table-column>
243
+          </el-table-column> -->
243
           <el-table-column label="备注" align="center">
244
           <el-table-column label="备注" align="center">
244
             <template slot-scope="scope">
245
             <template slot-scope="scope">
245
               {{ scope.row.remark }}
246
               {{ scope.row.remark }}
247
           </el-table-column>
248
           </el-table-column>
248
           <el-table-column label="操作" align="center">
249
           <el-table-column label="操作" align="center">
249
             <template slot-scope="scope">
250
             <template slot-scope="scope">
250
-              <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetailById(scope.row)">使用明细</span>
251
+              <span style="color: #589ff8" @click="GetOrderDetailById(scope.row)">使用明细</span>
251
             </template>
252
             </template>
252
           </el-table-column>
253
           </el-table-column>
253
         </el-table>
254
         </el-table>
384
       </div>
385
       </div>
385
      
386
      
386
        <el-row :gutter="12" style="margin-top: 10px">
387
        <el-row :gutter="12" style="margin-top: 10px">
387
-        <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 80%"
388
+        <el-table :data="infoList" :class="signAndWeighBoxPatients" style="width: 80%"
388
                   border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
389
                   border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
389
         >
390
         >
390
           <el-table-column min-width="35" align="center">
391
           <el-table-column min-width="35" align="center">
392
               <span>序号</span>
393
               <span>序号</span>
393
             </template>
394
             </template>
394
             <template slot-scope="scope">
395
             <template slot-scope="scope">
395
-              <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
396
-              <span v-if="scope.row.is_total == 1">{{'合计'}}</span>
396
+              {{scope.$index+1}}
397
             </template>
397
             </template>
398
           </el-table-column>
398
           </el-table-column>
399
 
399
 
402
               <span>使用人</span>
402
               <span>使用人</span>
403
             </template>
403
             </template>
404
             <template slot-scope="scope">
404
             <template slot-scope="scope">
405
-              <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
406
-              <span v-if="scope.row.is_total == 1"></span>
405
+              系统
407
             </template>
406
             </template>
408
           </el-table-column>
407
           </el-table-column>
409
           <el-table-column min-width="35" align="center">
408
           <el-table-column min-width="35" align="center">
411
               <span>使用数量</span>
410
               <span>使用数量</span>
412
             </template>
411
             </template>
413
             <template slot-scope="scope">
412
             <template slot-scope="scope">
414
-              <span v-if="scope.row.is_total == 0">{{scope.row.count}}{{scope.row.info.packing_unit}}</span>
415
-              <span  v-if="scope.row.is_total == 1">{{scope.row.total}}{{scope.row.info.packing_unit}} </span>
416
-
413
+             {{scope.row.count}}
414
+            </template>
415
+          </el-table-column>
416
+          <el-table-column min-width="35" align="center">
417
+            <template slot="header" slot-scope="scope">
418
+              <span>批次号</span>
419
+            </template>
420
+            <template slot-scope="scope">
421
+               {{scope.row.number}}
417
             </template>
422
             </template>
418
           </el-table-column>
423
           </el-table-column>
419
           <el-table-column min-width="35" align="center">
424
           <el-table-column min-width="35" align="center">
422
             </template>
427
             </template>
423
             <template slot-scope="scope">
428
             <template slot-scope="scope">
424
               <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
429
               <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
425
-
426
             </template>
430
             </template>
427
           </el-table-column>
431
           </el-table-column>
428
 
432
 
430
       </el-row>
434
       </el-row>
431
     </span>
435
     </span>
432
     <span slot="footer" class="dialog-footer">
436
     <span slot="footer" class="dialog-footer">
433
-      <el-button @click="editdialogVisible = false">取 消</el-button>
434
-      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
437
+      <el-button @click="editdialogVisibleTwo = false">取 消</el-button>
438
+      <el-button type="primary" @click="editdialogVisibleTwo = false">确 定</el-button>
435
     </span>
439
     </span>
436
   </el-dialog>
440
   </el-dialog>
437
   
441
   
574
     <el-dialog
578
     <el-dialog
575
       title="出库明细"
579
       title="出库明细"
576
       :visible.sync="editdialogVisibleThree"
580
       :visible.sync="editdialogVisibleThree"
577
-      width="60%">
581
+      width="70%">
578
       <span>
582
       <span>
579
          <div class="app-container">
583
          <div class="app-container">
580
 
584
 
582
         <span style="font-size: 18px;color: #606266">商品使用明细</span>
586
         <span style="font-size: 18px;color: #606266">商品使用明细</span>
583
       </div>
587
       </div>
584
 
588
 
585
-       <!-- <div class="cell clearfix">
586
-        <span style="width: 300px;color: #606266">商品类型: {{userList[0].type.type_name}} </span>
587
-        <span style="width: 300px;color: #606266">规格名称: {{userList[0].info.specification_name}}</span>
588
-      </div> -->
589
-
590
       <el-row :gutter="12" style="margin-top: 10px">
589
       <el-row :gutter="12" style="margin-top: 10px">
591
       <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 50%"
590
       <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 50%"
592
               border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
591
               border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
619
 
618
 
620
             </template>
619
             </template>
621
           </el-table-column>
620
           </el-table-column>
622
-          <el-table-column min-width="35" align="center">
621
+          <el-table-column min-width="60" align="center">
623
             <template slot="header" slot-scope="scope">
622
             <template slot="header" slot-scope="scope">
624
               <span>使用时间</span>
623
               <span>使用时间</span>
625
             </template>
624
             </template>
628
 
627
 
629
             </template>
628
             </template>
630
           </el-table-column>
629
           </el-table-column>
631
-
630
+         <el-table-column min-width="70" align="center">
631
+            <template slot="header" slot-scope="scope">
632
+              <span>批次号</span>
633
+            </template>
634
+            <template slot-scope="scope">
635
+              <span v-if="scope.row.is_total == 0">{{getNumber(scope.row.id)}}</span>
636
+            </template>
637
+          </el-table-column>
638
+<!-- 
639
+          <el-table-column min-width="70" align="center">
640
+            <template slot="header" slot-scope="scope">
641
+              <span>批次详情</span>
642
+            </template>
643
+            <template slot-scope="scope">
644
+              <span v-if="scope.row.is_total == 0">批次详情</span>
645
+            </template>
646
+          </el-table-column> -->
632
         </el-table>
647
         </el-table>
633
       </el-row>
648
       </el-row>
634
     </div>
649
     </div>
788
       editdialogVisibleThree:false,
803
       editdialogVisibleThree:false,
789
       order_id:"",
804
       order_id:"",
790
       warehouse_out_time:"",
805
       warehouse_out_time:"",
791
-      exportList:[]
806
+      exportList:[],
807
+      is_sys:0,
808
+      infoList:[]
792
     };
809
     };
793
   },
810
   },
794
   methods: {
811
   methods: {
933
           this.dealer = response.data.data.dealer;
950
           this.dealer = response.data.data.dealer;
934
           this.goodInfo = response.data.data.goodInfo
951
           this.goodInfo = response.data.data.goodInfo
935
           this.goodType = response.data.data.goodType
952
           this.goodType = response.data.data.goodType
936
-          this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
937
-          this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
953
+          // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
954
+          // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
938
           this.getlist()
955
           this.getlist()
939
         }
956
         }
940
       });
957
       });
1004
       }
1021
       }
1005
     },
1022
     },
1006
     select(selection) {
1023
     select(selection) {
1024
+      
1007
       var ids = []
1025
       var ids = []
1008
       for(let i=0;i<selection.length;i++){
1026
       for(let i=0;i<selection.length;i++){
1009
         ids.push(selection[i].id)
1027
         ids.push(selection[i].id)
1017
 
1035
 
1018
     },
1036
     },
1019
     batchDelete() {
1037
     batchDelete() {
1038
+    
1020
       if (this.selectedTableData.length <= 0) {
1039
       if (this.selectedTableData.length <= 0) {
1021
         this.$message.error("请选择要删除的记录");
1040
         this.$message.error("请选择要删除的记录");
1022
         return;
1041
         return;
1023
       }
1042
       }
1024
       const ids = [];
1043
       const ids = [];
1025
       for (let i = 0; i < this.selectedTableData.length; i++) {
1044
       for (let i = 0; i < this.selectedTableData.length; i++) {
1026
-        ids.push(this.selectedTableData[i].id);
1045
+         if(this.selectedTableData[i].is_sys == 0){
1046
+           ids.push(this.selectedTableData[i].id);
1047
+         }
1027
       }
1048
       }
1028
       const idStr = ids.join(",");
1049
       const idStr = ids.join(",");
1029
       const params = {
1050
       const params = {
1030
         ids: idStr
1051
         ids: idStr
1031
       };
1052
       };
1032
-      this.$confirm("确认删除退货单记录?", "删除退货单记录", {
1053
+      this.$confirm("确认删除出库单记录?", "删除出库单记录", {
1033
         confirmButtonText: "确定",
1054
         confirmButtonText: "确定",
1034
         cancelButtonText: "取消",
1055
         cancelButtonText: "取消",
1035
         type: "warning"
1056
         type: "warning"
1060
         .catch(() => {});
1081
         .catch(() => {});
1061
     },
1082
     },
1062
 
1083
 
1063
- 
1064
-
1065
-    
1066
-  
1067
 
1084
 
1068
     handleSearch(val){
1085
     handleSearch(val){
1069
       this.tableList = []
1086
       this.tableList = []
1083
               var list = response.data.data.list
1100
               var list = response.data.data.list
1084
               console.log("list22222222",list)
1101
               console.log("list22222222",list)
1085
               for(let i=0;i<list.length;i++){
1102
               for(let i=0;i<list.length;i++){
1103
+                if(list[i].dealer == 0){
1104
+                  list[i].dealer = ""
1105
+                }
1106
+                if(list[i].manufacturer == 0){
1107
+                  list[i].manufacturer = ""
1108
+                }
1086
                 this.tableList.push(list[i])
1109
                 this.tableList.push(list[i])
1087
               }
1110
               }
1088
             }
1111
             }
1479
       }, 
1502
       }, 
1480
      
1503
      
1481
       GetOrderDetailById(val){
1504
       GetOrderDetailById(val){
1505
+        console.log("val",val)
1482
          this.userList =[]
1506
          this.userList =[]
1483
          var params = {
1507
          var params = {
1508
+           id:val.warehouse_out_id,
1484
            good_id:val.good_id,
1509
            good_id:val.good_id,
1485
            record_time:val.sys_record_time,
1510
            record_time:val.sys_record_time,
1486
           }
1511
           }
1489
               var total = 0
1514
               var total = 0
1490
               var list = response.data.data.list
1515
               var list = response.data.data.list
1491
               var arrList =  this.unique(list)
1516
               var arrList =  this.unique(list)
1517
+              var info = response.data.data.info
1518
+              this.infoList = info
1519
+              console.log("info列表22222222",info)
1492
               for (let i = 0; i < arrList.length; i++) {
1520
               for (let i = 0; i < arrList.length; i++) {
1493
                 var obj = arrList[i]
1521
                 var obj = arrList[i]
1494
                 obj['is_total'] = 0
1522
                 obj['is_total'] = 0
1499
                 is_total: 1,
1527
                 is_total: 1,
1500
                 total: total,
1528
                 total: total,
1501
               })
1529
               })
1502
-              // this.type_name = this.userList[0].type.type_name
1503
-              // this.specification_name = this.userList[0].info.specification_name
1530
+
1504
               console.log("详情数据区",this.userList)
1531
               console.log("详情数据区",this.userList)
1505
-              this.editdialogVisibleThree = true
1532
+              if(val.is_sys == 1){
1533
+                this.editdialogVisibleThree = true
1534
+              }
1535
+              if(val.is_sys == 0){
1536
+                this.editdialogVisibleTwo = true
1537
+              }  
1506
             }
1538
             }
1507
          })
1539
          })
1508
       },
1540
       },
1541
+      getNumber(id){
1542
+        var str = ""
1543
+        var arr = []
1544
+        var ids = []
1545
+        for(let i=0;i<this.userList.length;i++){
1546
+          if(id == this.userList[i].id){
1547
+            arr.push(...this.userList[i].warehouseOutInfo)
1548
+          }
1549
+        }
1550
+        console.log("arr",arr)
1551
+        if(arr.length > 0){
1552
+          for(let i=0;i<arr.length;i++){
1553
+              ids.push(arr[i].number)
1554
+          }
1555
+        }
1556
+        str = ids.join(",")
1557
+        return str
1558
+      },
1509
       toPrint(){
1559
       toPrint(){
1510
         if(this.order_id == ""){
1560
         if(this.order_id == ""){
1511
           this.$message.error("请选择出库单")
1561
           this.$message.error("请选择出库单")
1512
         }else{
1562
         }else{
1513
-            this.$router.push({path:"/stock/out/detail/print?id="+this.order_id+"&warehouse_out_time="+this.warehouse_out_time})
1563
+            this.$router.push({path:"/stock/out/detail/print?id="+this.order_id+"&warehouse_out_time="+this.warehouse_out_time+"&keyword="+this.searchKey+"&start_time="+this.start_time+"&end_time="+this.end_time})
1514
         }
1564
         }
1515
       },
1565
       },
1516
       getlist(){
1566
       getlist(){

+ 33 - 58
src/xt_pages/stock/stockOutOrderAdd.vue Datei anzeigen

52
         ></el-date-picker>
52
         ></el-date-picker>
53
       </div>
53
       </div>
54
 
54
 
55
-      <!-- <div class="cell clearfix">
56
-        <label class="title"><span class="name">经销商</span> : </label>
57
-        <el-select
58
-          size="small"
59
-          v-model="form.dealer"
60
-          filterable
61
-          placeholder="请选择经销商"
62
-          @change="changeDealer"
63
-          style="width: 200px;"
64
-        >
65
-          <el-option
66
-            v-for="(option, index) in dealer"
67
-            :key="index"
68
-            :label="option.dealer_name"
69
-            :value="option.id"
70
-          >
71
-          </el-option>
72
-        </el-select>
73
-      </div> -->
74
-
75
-      <!-- <div class="cell clearfix">
76
-        <label class="title"><span class="name">厂商</span> : </label>
77
-        <el-select
78
-          size="small"
79
-          v-model="form.manufacturer"
80
-          filterable
81
-          placeholder="请选择厂商"
82
-          @change="changeManufacturer"
83
-          style="width: 200px;"
84
-        >
85
-          <el-option
86
-            v-for="(option, index) in manufacturer"
87
-            :key="index"
88
-            :label="option.manufacturer_name"
89
-            :value="option.id"
90
-          >
91
-          </el-option>
92
-        </el-select>
93
-      </div> -->
94
-
55
+    
95
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
56
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
96
         <el-table
57
         <el-table
97
           :data="recordInfo.recordData"
58
           :data="recordInfo.recordData"
113
                     popper-class="my-autocomplete"
74
                     popper-class="my-autocomplete"
114
                     v-model="scope.row.good_name"
75
                     v-model="scope.row.good_name"
115
                     :fetch-suggestions="querySearchAsync"
76
                     :fetch-suggestions="querySearchAsync"
116
-                    :trigger-on-focus="false"
77
+                    :trigger-on-focus="true"
117
                     placeholder="请输入耗材名称"
78
                     placeholder="请输入耗材名称"
118
                     @select="handleSelect"
79
                     @select="handleSelect"
119
                     @input="changeGoodName(scope.$index)"
80
                     @input="changeGoodName(scope.$index)"
162
               <span>批号<span style="color: red"></span></span>
123
               <span>批号<span style="color: red"></span></span>
163
             </template>
124
             </template>
164
             <template slot-scope="scope">
125
             <template slot-scope="scope">
165
-               <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input>
166
-                <!-- <el-select v-model="scope.row.number" filterable placeholder="请选择">
126
+               <!-- <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input> -->
127
+                <el-select v-model="scope.row.number" filterable placeholder="请选择">
167
                   <el-option
128
                   <el-option
168
                     v-for="(item,index) in numberList"
129
                     v-for="(item,index) in numberList"
169
                     :key="index"
130
                     :key="index"
170
                     :label="item.number"
131
                     :label="item.number"
171
                     :value="item.number">
132
                     :value="item.number">
172
                   </el-option>
133
                   </el-option>
173
-                </el-select> -->
134
+                </el-select>
174
             </template>
135
             </template>
175
           </el-table-column>
136
           </el-table-column>
176
 
137
 
263
          
224
          
264
           <el-table-column  width="150" align="center">
225
           <el-table-column  width="150" align="center">
265
             <template slot="header" slot-scope="scope">
226
             <template slot="header" slot-scope="scope">
266
-            <span>批准文号<span style="color: red"></span></span>
227
+            <span>批准文号<span style="color: red" ></span></span>
267
           </template>
228
           </template>
268
           <template slot-scope="scope">
229
           <template slot-scope="scope">
269
-              <el-input placeholder="请输入批准文号" v-model="scope.row.license_number"></el-input>
230
+              <el-input placeholder="请输入批准文号" v-model="scope.row.license_number" ></el-input>
270
           </template>
231
           </template>
271
         </el-table-column>
232
         </el-table-column>
272
 
233
 
332
 
293
 
333
 <script>
294
 <script>
334
 import { uParseTime } from "@/utils/tools";
295
 import { uParseTime } from "@/utils/tools";
335
-import { getSalesReturnConfig, postWarehouseOut,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList } from "@/api/stock";
296
+import { getSalesReturnConfig, postWarehouseOut,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList,getStockBatchNumber } from "@/api/stock";
336
 
297
 
337
 import BreadCrumb from "../components/bread-crumb";
298
 import BreadCrumb from "../components/bread-crumb";
338
 import StockInDialog from './Dialog/stockInDialog'
299
 import StockInDialog from './Dialog/stockInDialog'
339
-
300
+import { getDataConfig } from '@/utils/data'
340
 export default {
301
 export default {
341
   components: { StockInDialog,  BreadCrumb },
302
   components: { StockInDialog,  BreadCrumb },
342
   name: "salesReturnOrderAdd",
303
   name: "salesReturnOrderAdd",
690
       console.log("keyrowrd",key)
651
       console.log("keyrowrd",key)
691
       postSearchGoodList(key).then(response => {
652
       postSearchGoodList(key).then(response => {
692
         if (response.data.state == 1) {
653
         if (response.data.state == 1) {
693
-          
694
             var list = response.data.data.list
654
             var list = response.data.data.list
695
             console.log("33334445555",list)
655
             console.log("33334445555",list)
696
             this.goodList = list
656
             this.goodList = list
723
       this.currentIndex = val
683
       this.currentIndex = val
724
     },
684
     },
725
     handleSelect(val){
685
     handleSelect(val){
686
+       console.log("val2222222222",val)
687
+        //获取当前耗材的批号
688
+        this.getStockBatchNumber(val.id)
726
         for(let i=0;i<this.recordInfo.recordData.length;i++){
689
         for(let i=0;i<this.recordInfo.recordData.length;i++){
727
           if(this.currentIndex == i){
690
           if(this.currentIndex == i){
728
             this.recordInfo.recordData[i].good_type_id = val.id
691
             this.recordInfo.recordData[i].good_type_id = val.id
744
             }else{
707
             }else{
745
              this.recordInfo.recordData[i].dealer = val.dealer
708
              this.recordInfo.recordData[i].dealer = val.dealer
746
             }
709
             }
747
-           
748
          }
710
          }
711
+
712
+       
749
       }
713
       }
750
 
714
 
751
-       if(val.xt_warehouse_info.length > 0){
752
-           var obj = {id:"",name:""}
753
-          for(let j=0;j<val.xt_warehouse_info.length;j++){
754
-            this.numberList.push(val.xt_warehouse_info[j])
755
-          }
756
-          
715
+       
716
+    },
717
+
718
+    getStockBatchNumber(id){
719
+       var params = {
720
+         id:id
721
+       }
722
+      getStockBatchNumber(params).then(response=>{
723
+        if(response.data.state == 1){
724
+          var list = response.data.data.list
725
+          console.log("list2243444",list)
726
+          this.numberList = list
757
         }
727
         }
758
-        console.log("9999999",this.numberList)
759
-    }
728
+     })
729
+    },
730
+    getDataConfig(module, filed_name) {
731
+      return getDataConfig(module, filed_name)
732
+    },
760
   },
733
   },
761
   created() {
734
   created() {
762
     var nowDate = new Date();
735
     var nowDate = new Date();
784
     this.recordInfo.recordData.push(tempObj);
757
     this.recordInfo.recordData.push(tempObj);
785
     this.GetConfigInfo();
758
     this.GetConfigInfo();
786
     this.propForm.goodUnit = this.$store.getters.good_unit;
759
     this.propForm.goodUnit = this.$store.getters.good_unit;
760
+    this.unitList =  getDataConfig('hemodialysis','units')
761
+    console.log("单位",this.unitList)
787
   }
762
   }
788
 };
763
 };
789
 </script>
764
 </script>

+ 60 - 3
src/xt_pages/stock/stockOutOrderDetailPrint.vue Datei anzeigen

82
 
82
 
83
 <script>
83
 <script>
84
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
84
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
85
-import { GetAllConfig,getWarehouseOutInfo,GetOutStockTotalCount,getGoodInfoList,getWarehouseOrderInfoList,getOrderDetailByOrderId } from "@/api/stock";
85
+import { GetAllConfig,getWarehouseOutInfo,GetOutStockTotalCount,getGoodInfoList,getWarehouseOrderInfoList,getOrderDetailByOrderId,getStockDrugCount } from "@/api/stock";
86
 import print from 'print-js'
86
 import print from 'print-js'
87
 const moment = require('moment');
87
 const moment = require('moment');
88
 import { uParseTime } from '@/utils/tools'
88
 import { uParseTime } from '@/utils/tools'
125
             orgName:'',
125
             orgName:'',
126
             orderInList:[],
126
             orderInList:[],
127
             tableList:[],
127
             tableList:[],
128
-            orderList:[]
128
+            orderList:[],
129
+            countList:[],
130
+            outCountList:[],
131
+            autoCountList:[],
132
+            cancelCountList:[]
129
         }
133
         }
130
     },
134
     },
131
     methods:{
135
     methods:{
337
           }
341
           }
338
         }
342
         }
339
         return total_price
343
         return total_price
344
+      },
345
+
346
+     getStockDrugCount(){
347
+        var params ={
348
+          keywords: this.keywords,
349
+          start_time:this.start_time,
350
+          end_time:this.end_time,
351
+        }
352
+      getStockDrugCount(params).then(response=>{
353
+         if(response.data.state == 1){
354
+           var count = response.data.data.count
355
+           console.log("入库统计",count)
356
+           this.countList = count
357
+           var outlist = response.data.data.outList
358
+           console.log("出库数量",outlist)
359
+           this.outCountList = outlist
360
+           var autoCount = response.data.data.autoCount
361
+           console.log("autoCount",autoCount)
362
+           this.autoCountList = autoCount
363
+           var totalCount = response.data.data.totalCount
364
+           console.log("totalcount",totalCount)
365
+           this.cancelCountList = totalCount
366
+         }
367
+      })
368
+    },
369
+     stockInCount: function(row) {
370
+      let total = 0;
371
+      for (let i = 0; i < row.query_warehousing_info.length; i++) {
372
+        total = total + row.query_warehousing_info[i].warehousing_count;
373
+      }
374
+      return total;
375
+    },
376
+    salesReturnCount: function(row) {
377
+      let total = 0;
378
+      for (let i = 0; i < row.query_sales_return_info.length; i++) {
379
+        total = total + row.query_sales_return_info[i].count;
340
       }
380
       }
381
+      return total;
382
+    },
383
+    stockOutCount: function(row) {
341
 
384
 
385
+      let total = 0;
386
+      for (let i = 0; i < row.query_warehouseout_info.length; i++) {
387
+        total = total + row.query_warehouseout_info[i].count;
388
+      }
389
+      return total;
390
+    },
391
+    cancelStockCount: function(row) {
392
+      let total = 0;
393
+      for (let i = 0; i < row.query_cancel_stock_info.length; i++) {
394
+        total = total + row.query_cancel_stock_info[i].count;
395
+      }
396
+      return total;
397
+    },
342
     },
398
     },
343
     created(){
399
     created(){
344
       this.orgName = this.$store.getters.xt_user.org.org_name;
400
       this.orgName = this.$store.getters.xt_user.org.org_name;
346
       const order_id = this.$route.query.id;
402
       const order_id = this.$route.query.id;
347
       const warehouse_out_time = this.$route.query.warehouse_out_time;
403
       const warehouse_out_time = this.$route.query.warehouse_out_time;
348
       this.GetConfigInfo();
404
       this.GetConfigInfo();
349
-      this.GetTotalCount(warehouse_out_time);
405
+      // this.GetTotalCount(warehouse_out_time);
350
       this.GetOrderDetailOne(order_id)
406
       this.GetOrderDetailOne(order_id)
351
       this.getList()
407
       this.getList()
408
+      this.getStockDrugCount()
352
     }
409
     }
353
 }
410
 }
354
 </script>
411
 </script>

+ 24 - 16
src/xt_pages/stock/stockOutOrderEdit.vue Datei anzeigen

54
                       popper-class="my-autocomplete"
54
                       popper-class="my-autocomplete"
55
                       v-model="scope.row.good_name"
55
                       v-model="scope.row.good_name"
56
                       :fetch-suggestions="querySearchAsync"
56
                       :fetch-suggestions="querySearchAsync"
57
-                      :trigger-on-focus="false"
57
+                      :trigger-on-focus="true"
58
                       placeholder="请输入耗材名称"
58
                       placeholder="请输入耗材名称"
59
                       @select="handleSelect"
59
                       @select="handleSelect"
60
                       @input="changeGoodName(scope.$index)"
60
                       @input="changeGoodName(scope.$index)"
104
             </template>
104
             </template>
105
             <template slot-scope="scope">
105
             <template slot-scope="scope">
106
               <el-form-item style="padding-top: 20px">
106
               <el-form-item style="padding-top: 20px">
107
-                <el-input placeholder="请输入批号" v-model="scope.row.number"  :disabled="stockShow"></el-input>
108
-               <!-- <el-select v-model="scope.row.number" filterable placeholder="请选择">
107
+                <!-- <el-input placeholder="请输入批号" v-model="scope.row.number"  :disabled="stockShow"></el-input> -->
108
+               <el-select v-model="scope.row.number" filterable placeholder="请选择" :disabled="stockTrue">
109
                   <el-option
109
                   <el-option
110
                     v-for="(item,index) in numberList"
110
                     v-for="(item,index) in numberList"
111
                     :key="index"
111
                     :key="index"
112
                     :label="item.number"
112
                     :label="item.number"
113
                     :value="item.number">
113
                     :value="item.number">
114
                   </el-option>
114
                   </el-option>
115
-                </el-select> -->
115
+                </el-select>
116
               </el-form-item>
116
               </el-form-item>
117
             </template>
117
             </template>
118
           </el-table-column>
118
           </el-table-column>
196
             <span>批准文号<span style="color: red"></span></span>
196
             <span>批准文号<span style="color: red"></span></span>
197
           </template>
197
           </template>
198
           <template slot-scope="scope">
198
           <template slot-scope="scope">
199
-              <el-input placeholder="请输入批准文号" v-model="scope.row.license_number"></el-input>
199
+              <el-input placeholder="请输入批准文号" v-model="scope.row.license_number" ></el-input>
200
           </template>
200
           </template>
201
         </el-table-column>
201
         </el-table-column>
202
 
202
 
252
 <script>
252
 <script>
253
   import { uParseTime } from '@/utils/tools'
253
   import { uParseTime } from '@/utils/tools'
254
 
254
 
255
-  import { deleteWarehouseOutInfo, editWarehouseoutInfo, getSalesReturnConfig, getWarehouseOutInfo,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList,getSingleOutOrderDetail } from '@/api/stock'
255
+  import { deleteWarehouseOutInfo, editWarehouseoutInfo, getSalesReturnConfig, getWarehouseOutInfo,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList,getSingleOutOrderDetail,getStockBatchNumber } from '@/api/stock'
256
   import BreadCrumb from '../components/bread-crumb'
256
   import BreadCrumb from '../components/bread-crumb'
257
   import StockInDialog from './Dialog/stockInDialog'
257
   import StockInDialog from './Dialog/stockInDialog'
258
 
258
 
320
         goodType: [],
320
         goodType: [],
321
         goodInfo:[],
321
         goodInfo:[],
322
         numberList:[],
322
         numberList:[],
323
-        stockShow:false
323
+        stockShow:false,
324
+        stockTrue:true,
324
       }
325
       }
325
     },
326
     },
326
     methods: {
327
     methods: {
400
         return name;
401
         return name;
401
       }, 
402
       }, 
402
       handleEdit: function(index, row) {
403
       handleEdit: function(index, row) {
404
+        this.stockTrue = false
403
         if(this.stockShow == true){
405
         if(this.stockShow == true){
404
          this.$message.error("自动出库数据无法编辑")
406
          this.$message.error("自动出库数据无法编辑")
405
          return
407
          return
624
     },
626
     },
625
     handleSelect(val){
627
     handleSelect(val){
626
        console.log("val22222",val)
628
        console.log("val22222",val)
629
+        this.getStockBatchNumber(val.id)
627
         for(let i=0;i<this.recordInfo.recordData.length;i++){
630
         for(let i=0;i<this.recordInfo.recordData.length;i++){
628
           if(this.currentIndex == i){
631
           if(this.currentIndex == i){
629
             this.recordInfo.recordData[i].good_type_id = val.id
632
             this.recordInfo.recordData[i].good_type_id = val.id
649
            
652
            
650
          }
653
          }
651
       }
654
       }
652
-      // if(val.xt_warehouse_info.length > 0){
653
-      //     for(let j=0;j<val.xt_warehouse_info.length;j++){
654
-      //       this.numberList.push(val.xt_warehouse_info[j])
655
-      //     }
656
-      //    this.recordInfo.recordData[i].number = val.xt_warehouse_info[0].number
657
-      // }else{
658
-      //   this.recordInfo.recordData[i].number = ""
659
-      // }
660
     },
655
     },
661
      getSingleOutOrderDetail(order_id){
656
      getSingleOutOrderDetail(order_id){
662
 
657
 
699
           loading.close();
694
           loading.close();
700
         }
695
         }
701
       })
696
       })
702
-    }
697
+    },
698
+      getStockBatchNumber(id){
699
+        var params = {
700
+          id:id
701
+        }
702
+        getStockBatchNumber(params).then(response=>{
703
+          if(response.data.state == 1){
704
+            var list = response.data.data.list
705
+            console.log("list2243444",list)
706
+            this.numberList = list
707
+          }
708
+      })
709
+      }
703
     },
710
     },
704
     created() {
711
     created() {
705
       var nowDate = new Date();
712
       var nowDate = new Date();
722
       if(is_sys == 1){
729
       if(is_sys == 1){
723
         this.stockShow = true
730
         this.stockShow = true
724
       }
731
       }
732
+      
725
     }
733
     }
726
 
734
 
727
   }
735
   }

+ 3 - 3
src/xt_pages/stock/stockQuery.vue Datei anzeigen

514
     },
514
     },
515
     getStockDrugCount(){
515
     getStockDrugCount(){
516
         var params ={
516
         var params ={
517
-          keywords: this.keywords,
518
-          start_time:this.start_time,
519
-          end_time:this.end_time,
517
+          keywords: this.$route.query.keywords,
518
+          start_time:this.$route.query.start_time,
519
+          end_time:this.$route.query.end_time,
520
         }
520
         }
521
       getStockDrugCount(params).then(response=>{
521
       getStockDrugCount(params).then(response=>{
522
          if(response.data.state == 1){
522
          if(response.data.state == 1){