Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
8ac92a1b17

+ 28 - 11
src/xt_pages/data/components/consumables.vue View File

@@ -34,6 +34,15 @@
34 34
             :value="item.value">
35 35
           </el-option>
36 36
         </el-select>
37
+        <span style="color: #909399;font-size:14px;">耗材类型 : &nbsp;</span>
38
+        <el-select v-model="is_type" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeTypeList">
39
+          <el-option
40
+            v-for="(item,index) in goodTypeList"
41
+            :key="index"
42
+            :label="item.type_name"
43
+            :value="item.id">
44
+          </el-option>
45
+        </el-select>
37 46
 
38 47
       </div>
39 48
       <div>
@@ -94,9 +103,9 @@
94 103
           {{ getGoodTypeByID(scope.row.good_type_id) }}
95 104
         </template>
96 105
       </el-table-column>
97
-      <el-table-column label="耗材编号" width="140" align="center">
106
+      <el-table-column label="注册编码" width="140" align="center">
98 107
         <template slot-scope="scope">
99
-          {{ scope.row.good_number }}
108
+          {{ scope.row.register_number }}
100 109
         </template>
101 110
       </el-table-column>
102 111
 
@@ -339,7 +348,9 @@
339 348
         dealers:[],
340 349
         exportLogVisible:false,
341 350
         logs: [],
342
-        goodKindList:[]
351
+        goodKindList:[],
352
+        goodTypeList:[{id:0,type_name:"全部"}],
353
+        is_type:0,
343 354
       }
344 355
     },
345 356
     methods: {
@@ -745,6 +756,7 @@
745 756
           is_charge: this.is_charge,
746 757
           is_mark:this.is_record,
747 758
           manufacturer:this.manufacturer,
759
+          is_type:this.is_type,
748 760
         };
749 761
 
750 762
         getGoodInfoList(params).then(response => {
@@ -790,7 +802,7 @@
790 802
         })
791 803
       },
792 804
       goodInfoDialogComfirm: function(val) {
793
-        console.log("val22222",val)
805
+        
794 806
         if (val.isCreated == 2) {
795 807
           //修改
796 808
           val['id'] = this.goodInfo.editGoodId;
@@ -858,9 +870,8 @@
858 870
       },
859 871
       goodInfoDialogCancle: function() {
860 872
         this.$refs.addConsumable.hide()
861
-      },getGoodTypeByID(id){
862
-        console.log( id)
863
-
873
+      },
874
+      getGoodTypeByID(id){
864 875
         let name = ""
865 876
         for(let i = 0;  i < this.goodInfo.goodInfoDialog.formValue.goodType.length;i++){
866 877
           if(this.goodInfo.goodInfoDialog.formValue.goodType[i].id == id){
@@ -883,9 +894,7 @@
883 894
               if (response.data.data.goodType[i].type == 1) {
884 895
                 response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
885 896
               }
886
-              this.goodInfo.goodInfoDialog.formValue.goodType.push(
887
-                response.data.data.goodType[i]
888
-              )
897
+              this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i])
889 898
             }
890 899
             if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
891 900
               this.$message.error('请先新增商品类型');
@@ -941,6 +950,11 @@
941 950
             this.$message.error(response.data.msg);
942 951
             return false
943 952
           } else {
953
+           
954
+            for(let i=0;i<response.data.data.goodType.length;i++){
955
+              this.goodTypeList.push(response.data.data.goodType[i])
956
+            }
957
+ 
944 958
             for (let i = 0; i < response.data.data.goodType.length; i++) {
945 959
               if (response.data.data.goodType[i].type == 1) {
946 960
                 response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
@@ -1127,7 +1141,10 @@
1127 1141
         this.getList()
1128 1142
       },
1129 1143
       changeRecord(){
1130
-         this.getList()
1144
+        this.getList()
1145
+      },
1146
+      changeTypeList(){
1147
+        this.getList()
1131 1148
       },
1132 1149
       handleSuccess({ results, header }) {
1133 1150
 

+ 48 - 3
src/xt_pages/data/components/drugs.vue View File

@@ -65,6 +65,14 @@
65 65
           size="small"
66 66
         >下载日志
67 67
         </el-button>
68
+       <!-- <el-button
69
+          style="margin-left:10px;"
70
+          @click="exportList()"
71
+          class="filter-item"
72
+          type="primary"
73
+          size="small"
74
+        >点击导出
75
+        </el-button> -->
68 76
       </div>
69 77
     <el-table :data="list" border style="width: 100%" :row-style="{ color: '#303133' }"
70 78
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
@@ -99,6 +107,16 @@
99 107
         <template slot-scope="scope">
100 108
           <div>{{scope.row.retail_price}}</div>
101 109
         </template>
110
+      </el-table-column>
111
+      <el-table-column label="拆零价" width="100" align="center">
112
+        <template slot-scope="scope">
113
+          <div>{{scope.row.min_price}}</div>
114
+        </template>
115
+      </el-table-column>
116
+      <el-table-column label="包装价" width="100" align="center">
117
+        <template slot-scope="scope">
118
+          <div>{{scope.row.retail_price}}</div>
119
+        </template>
102 120
       </el-table-column>
103 121
        <el-table-column prop="date" label="国家编码" width="100" align="center">
104 122
         <template slot-scope="scope">
@@ -120,7 +138,7 @@
120 138
           <div>{{getDealer(scope.row.dealer)}}</div>
121 139
         </template>
122 140
       </el-table-column>
123
-      <el-table-column prop="date" label="备案日期" align="center" width="100">
141
+      <!-- <el-table-column prop="date" label="备案日期" align="center" width="100">
124 142
         <template slot-scope="scope">
125 143
           <span>{{getTime(scope.row.record_date)}}</span>
126 144
         </template>
@@ -129,7 +147,7 @@
129 147
         <template slot-scope="scope">
130 148
           <div>{{scope.row.drug_remark}}</div>
131 149
         </template>
132
-      </el-table-column>
150
+      </el-table-column> -->
133 151
       <el-table-column label="状态" width="60" align="center">
134 152
         <template slot-scope="scope">
135 153
           <div>{{scope.row.drug_status.indexOf('停用') == -1 ? '启用':'停用' }}</div>
@@ -167,7 +185,7 @@
167 185
     <el-pagination
168 186
       @size-change="handleSizeChange"
169 187
       @current-change="handleCurrentChange"
170
-      :page-sizes="[10, 50, 100]"
188
+      :page-sizes="[10, 50, 100,500,1000]"
171 189
       :page-size="10"
172 190
       background
173 191
       align="right"
@@ -1451,6 +1469,33 @@
1451 1469
         return getDictionaryDataConfig(module,filed_name)
1452 1470
       },
1453 1471
 
1472
+      exportList(){
1473
+         import('@/vendor/Export2Excel').then(excel => {
1474
+         
1475
+        
1476
+         console.log("this.table",this.list)
1477
+         for(let i=0;i<this.list.length;i++){
1478
+            this.list[i].specification_name = this.list[i].dose + this.list[i].dose_unit + this.list[i].min_number + this.list[i].min_unit + "/"+this.list[i].max_unit
1479
+
1480
+         }
1481
+         const tHeader = ['药品名称','药品规格','剂量','剂量单位','拆零','拆零单位','包装单位','药品类型','库存警戒','产地','药品剂型','拆零零售价','包装零售价','进货价','药物分类','默认单次用量','默认单次用量单位','生产厂商','经销商','医保编码','社保目录编码']
1482
+         const filterVal = ['drug_name', 'specification_name', 'dose','dose','dose_unit','min_number','min_unit','max_unit','drug_stock_limit','drug_origin_place','drug_dosage_form','min_price','retail_price','last_price','drug_classify','drug_dose','drug_dose_unit','manufacturer','dealer','medical_insurance_number','social_security_directory_code'] 
1483
+         
1484
+         const data = this.formatJson(filterVal,this.list)
1485
+     
1486
+         excel.export_json_to_excel({
1487
+           header: tHeader,
1488
+           data,
1489
+           filename: '药品信息'
1490
+         })
1491
+          this.downloadLoading = false
1492
+    
1493
+        })
1494
+       },
1495
+       formatJson(filterVal, jsonData) {
1496
+        return jsonData.map(v => filterVal.map(j => v[j]))
1497
+       },
1498
+
1454 1499
     },
1455 1500
     created() {
1456 1501
 

+ 4 - 7
src/xt_pages/data/specialDictionary.vue View File

@@ -18,21 +18,18 @@
18 18
         <inspection v-if="activeName == 4"></inspection>
19 19
         </el-tab-pane>
20 20
         <el-tab-pane label="生产厂商" name="5">
21
-          <!--<manufacturer></manufacturer>-->
21
+         
22 22
           <manufacturer v-if="activeName == 5"></manufacturer>
23 23
         </el-tab-pane>
24 24
         <el-tab-pane label="经销商" name="6">
25
-          <!--<supplier></supplier>-->
25
+         
26 26
           <dealer v-if="activeName == 6"></dealer>
27 27
         </el-tab-pane>
28 28
         <el-tab-pane label="疾病类型" name="7">
29
-        <!--<manufacturer></manufacturer>-->
29
+       
30 30
         <diagnosis v-if="activeName == 7"></diagnosis>
31 31
       </el-tab-pane>
32
-        <!--<el-tab-pane label="医疗类别" name="8">-->
33
-          <!--&lt;!&ndash;<manufacturer></manufacturer>&ndash;&gt;-->
34
-          <!--<diagnosis></diagnosis>-->
35
-        <!--</el-tab-pane>-->
32
+      
36 33
         <el-tab-pane label="附加收费配置" name="8">
37 34
           <addtion v-if="activeName == 8"></addtion>
38 35
         </el-tab-pane>

+ 2 - 2
src/xt_pages/dialysis/batch_print/batch_print_order_fortyThree.vue View File

@@ -713,8 +713,8 @@ export default {
713 713
           this.org_template_info = resp.data.templateInfo
714 714
 
715 715
           this.records = this.records.concat(resp.data.schedules)
716
-
717
-
716
+          console.log("记录23323322332",this.records)
717
+ 
718 718
 
719 719
           for (const recordIndex in this.records) {
720 720
             var dlegh = 0

+ 1 - 1
src/xt_pages/stock/Dialog/goodInfoDailog.vue View File

@@ -48,7 +48,7 @@
48 48
 
49 49
 
50 50
             <el-form-item label="规格型号 : " prop="specification_name">
51
-              <el-input v-model="form.specification_name" placeholder="" maxlength="30"></el-input>
51
+              <el-input v-model="form.specification_name" placeholder=""></el-input>
52 52
             </el-form-item>
53 53
             <el-form-item prop="packing_unit"  label="包装单位:">
54 54
               <el-select v-model="form.packing_unit" style="width:160px;" placeholder="包装单位" @change="changePackingUnit">