浏览代码

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 3 年前
父节点
当前提交
203b528e71

+ 8 - 0
src/api/drug/drug.js 查看文件

459
     params: params
459
     params: params
460
   })
460
   })
461
 }
461
 }
462
+
463
+export function getDrugWarehouseInfoTotal(params) {
464
+  return request({
465
+    url: '/api/drug/getdrugwarehouseinfototal',
466
+    method: 'Get',
467
+    params: params
468
+  })
469
+}

+ 3 - 3
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue 查看文件

151
                                                     </div>
151
                                                     </div>
152
                                                     </el-tab-pane>
152
                                                     </el-tab-pane>
153
 
153
 
154
-                                                    
154
+
155
 
155
 
156
                                                     <prescription-table ref="prescription_tables"
156
                                                     <prescription-table ref="prescription_tables"
157
                                                                         :prescription="items.curPrescriptions"></prescription-table>
157
                                                                         :prescription="items.curPrescriptions"></prescription-table>
979
             }
979
             }
980
           })
980
           })
981
         } else {
981
         } else {
982
-          if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
982
+          if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138 ||this.$store.getters.xt_user.org_id == 10088) {
983
             axios.get('http://127.0.0.1:9532/api/register/get', {
983
             axios.get('http://127.0.0.1:9532/api/register/get', {
984
               params: forms,
984
               params: forms,
985
               headers: {
985
               headers: {
2096
             })
2096
             })
2097
           }
2097
           }
2098
         } else if (index == 6) {
2098
         } else if (index == 6) {
2099
-          if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10028) {
2099
+          if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10088) {
2100
             this.$refs.register9504.show()
2100
             this.$refs.register9504.show()
2101
           } else {
2101
           } else {
2102
             this.$refs.register.show()
2102
             this.$refs.register.show()

+ 0 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 查看文件

1376
                     medical_code: prescription.project[b].project.medical_code,
1376
                     medical_code: prescription.project[b].project.medical_code,
1377
                     unit: prescription.project[b].project.unit,
1377
                     unit: prescription.project[b].project.unit,
1378
                     type: prescription.project[b].type,
1378
                     type: prescription.project[b].type,
1379
-                    groupno: prescription.advices[b].groupno
1380
 
1379
 
1381
                   }
1380
                   }
1382
 
1381
 

+ 2 - 4
src/xt_pages/outpatientRegistration/index.vue 查看文件

959
           this.is_Name = true
959
           this.is_Name = true
960
           return
960
           return
961
         }
961
         }
962
-
963
         if (this.form.sex == '') {
962
         if (this.form.sex == '') {
964
           this.$message.error('患者性别不能为空')
963
           this.$message.error('患者性别不能为空')
965
         }
964
         }
1543
 
1542
 
1544
           }
1543
           }
1545
         }
1544
         }
1546
-      }
1547
-      ,
1545
+      },
1548
       changeName(id) {
1546
       changeName(id) {
1549
         this.form.sex = ''
1547
         this.form.sex = ''
1550
         this.form.age = ''
1548
         this.form.age = ''
1583
 
1581
 
1584
     },
1582
     },
1585
     created() {
1583
     created() {
1586
-      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
1584
+      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 10088) {
1587
         this.form.certificates = 2
1585
         this.form.certificates = 2
1588
         this.form.id_card_type = 1
1586
         this.form.id_card_type = 1
1589
         this.form.settlementValue = 1
1587
         this.form.settlementValue = 1

+ 12 - 10
src/xt_pages/stock/detail/stockOutDetail.vue 查看文件

268
       stockTotal:[],
268
       stockTotal:[],
269
       goodInfoData:[],
269
       goodInfoData:[],
270
       orgId:"",
270
       orgId:"",
271
-      tableData:[]
271
+      tableData:[],
272
+      tableOut:[],
272
     };
273
     };
273
   },
274
   },
274
   methods: {
275
   methods: {
755
       },
756
       },
756
 
757
 
757
     exportList(){
758
     exportList(){
758
-       for(let i=0;i<this.tableData.length;i++){
759
-        this.tableData[i].index = i+1
760
-        this.tableData[i].good_name = this.tableData[i].good_name
761
-        this.tableData[i].specification_name = this.tableData[i].specification_name
762
-        this.tableData[i].packing_unit = this.tableData[i].packing_unit
763
-        this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].packing_price).toFixed(2)
764
-        this.tableData[i].out_count = this.getStockCount(this.tableData[i].good_id)
759
+       console.log("表格",this.tableOut)
760
+       for(let i=0;i<this.tableOut.length;i++){
761
+        this.tableOut[i].index = i+1
762
+        this.tableOut[i].good_name = this.tableOut[i].good_name
763
+        this.tableOut[i].specification_name = this.tableOut[i].specification_name
764
+        this.tableOut[i].packing_unit = this.tableOut[i].packing_unit
765
+        this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].packing_price).toFixed(2)
766
+        this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
765
        }
767
        }
766
        import('@/vendor/Export2Excel').then(excel => {
768
        import('@/vendor/Export2Excel').then(excel => {
767
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
769
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
768
        const filterVal = ['index','good_name', 'specification_name', 'packing_unit','out_count','packing_price','total_price','remark']
770
        const filterVal = ['index','good_name', 'specification_name', 'packing_unit','out_count','packing_price','total_price','remark']
769
 
771
 
770
-       const data = this.formatJson(filterVal, this.tableData)
772
+       const data = this.formatJson(filterVal, this.tableOut)
771
        console.log("data",data)
773
        console.log("data",data)
772
        
774
        
773
         excel.export_json_to_excel({
775
         excel.export_json_to_excel({
808
         if(response.data.state == 1){
810
         if(response.data.state == 1){
809
           var list = response.data.data.list
811
           var list = response.data.data.list
810
           console.log("出库单详单",list)
812
           console.log("出库单详单",list)
811
-          this.tableData = list
813
+          this.tableOut = list
812
           var stockTotal = response.data.data.stockTotal
814
           var stockTotal = response.data.data.stockTotal
813
           this.stockTotal = stockTotal
815
           this.stockTotal = stockTotal
814
         }
816
         }

+ 169 - 60
src/xt_pages/stock/drugs/drugDamaged.vue 查看文件

41
             <div>
41
             <div>
42
                 <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
42
                 <el-button size="small" type="primary" @click="dialogVisible = true">新增</el-button>
43
                 <el-button size="small" type="primary" @click="toCheck">核对</el-button>
43
                 <el-button size="small" type="primary" @click="toCheck">核对</el-button>
44
-                <el-button size="small" type="primary" @click="print">打印</el-button>
45
-                <el-button size="small" type="primary">导出</el-button>
44
+                <!-- <el-button size="small" type="primary" @click="print">打印</el-button>
45
+                <el-button size="small" type="primary">导出</el-button> -->
46
             </div>
46
             </div>
47
         </div>
47
         </div>
48
         <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"  @selection-change="changePrice">
48
         <el-table :data="tableList" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"  @selection-change="changePrice">
57
                   {{getTime(scope.row.start_time)}}
57
                   {{getTime(scope.row.start_time)}}
58
                 </template>
58
                 </template>
59
             </el-table-column>
59
             </el-table-column>
60
+            <el-table-column prop="name" label="药品名称" align="center">
61
+               <template slot-scope="scope">
62
+                  {{scope.row.drug_name}}
63
+                </template>
64
+            </el-table-column>
65
+            <el-table-column prop="name" label="规格" align="center">
66
+               <template slot-scope="scope">
67
+                  {{scope.row.specification_name}}
68
+                </template>
69
+            </el-table-column>
60
             <el-table-column prop="name" label="报损数量" align="center">
70
             <el-table-column prop="name" label="报损数量" align="center">
61
                <template slot-scope="scope">
71
                <template slot-scope="scope">
62
                   {{scope.row.count}}
72
                   {{scope.row.count}}
83
                 <span v-if="scope.row.checker_status == 2">未核对</span>
93
                 <span v-if="scope.row.checker_status == 2">未核对</span>
84
               </template>   
94
               </template>   
85
             </el-table-column>
95
             </el-table-column>
86
-            <el-table-column label="操作" align="center">
96
+            <el-table-column label="操作" align="center" width="200">
87
                 <template slot-scope="scope">
97
                 <template slot-scope="scope">
88
                   <el-button type="primary" size="small" @click="moDrugDamage(scope.row.id,scope.row.checker_status)">编辑</el-button>
98
                   <el-button type="primary" size="small" @click="moDrugDamage(scope.row.id,scope.row.checker_status)">编辑</el-button>
89
                   <el-button type="danger" size="small" @click="deleteDrugDamage(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
99
                   <el-button type="danger" size="small" @click="deleteDrugDamage(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
102
         </el-pagination>
112
         </el-pagination>
103
     </div>
113
     </div>
104
     <el-dialog
114
     <el-dialog
105
-        title="库房报损"
115
+        title="药品报损"
106
         :visible.sync="dialogVisible"
116
         :visible.sync="dialogVisible"
107
         width="1200px">
117
         width="1200px">
108
         <el-form :model="form" class="modifyDialog" label-width="120px">
118
         <el-form :model="form" class="modifyDialog" label-width="120px">
109
             <el-form-item label="药品ID">
119
             <el-form-item label="药品ID">
110
-                <el-input v-model="form.drug_id"></el-input>
120
+                <el-input v-model="form.drug_id" :disabled="true"></el-input>
111
             </el-form-item>
121
             </el-form-item>
112
             <el-form-item label="药品名称">
122
             <el-form-item label="药品名称">
113
               <el-autocomplete
123
               <el-autocomplete
119
                   placeholder="请输入药品名称"
129
                   placeholder="请输入药品名称"
120
                   @select="handleSelect"
130
                   @select="handleSelect"
121
                   @input="changeGoodName(scope.$index)"
131
                   @input="changeGoodName(scope.$index)"
122
-                  style="width:160px;"
132
+                  style="width:260px;"
123
                   >
133
                   >
124
                   <i class="el-icon-search el-input__icon" slot="suffix"></i>
134
                   <i class="el-icon-search el-input__icon" slot="suffix"></i>
125
                   <template slot-scope="{ item }">
135
                   <template slot-scope="{ item }">
140
             </el-form-item>
150
             </el-form-item>
141
          
151
          
142
             <el-form-item label="单位">
152
             <el-form-item label="单位">
143
-                <el-input v-model="form.warehousing_unit"></el-input>
144
-              <!-- <el-select v-model="scope.row.warehousing_unit" filterable placeholder="请选择单位" style="width:80px">
145
-                <el-option
146
-                  v-for="(option, index) in unitList"
147
-                  :key="index"
148
-                  :label="option.name"
149
-                  :value="option.name">
150
-                </el-option>
151
-              </el-select> -->
153
+                <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
152
             </el-form-item>
154
             </el-form-item>
153
             <el-form-item label="进货价">
155
             <el-form-item label="进货价">
154
-                <el-input v-model="form.last_price"></el-input>
156
+                <el-input v-model="form.last_price" :disabled="true"></el-input>
155
             </el-form-item>
157
             </el-form-item>
156
             <el-form-item label="零售价">
158
             <el-form-item label="零售价">
157
-                <el-input v-model="form.retail_price"></el-input>
159
+                <el-input v-model="form.retail_price" :disabled="true"></el-input>
158
             </el-form-item>
160
             </el-form-item>
159
             <el-form-item label="报损数量">
161
             <el-form-item label="报损数量">
160
                 <el-input v-model="form.count"></el-input>
162
                 <el-input v-model="form.count"></el-input>
161
             </el-form-item>
163
             </el-form-item>
162
             <el-form-item label="库存">
164
             <el-form-item label="库存">
163
-                <el-input v-model="form.total" :disabled="true"></el-input>
165
+                <el-input v-model="form.total" :disabled="true" ></el-input>
164
             </el-form-item>
166
             </el-form-item>
165
             <el-form-item label="产地">
167
             <el-form-item label="产地">
166
-                <el-input v-model="form.drug_origin_place"></el-input>
168
+                <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
167
             </el-form-item>
169
             </el-form-item>
168
             <el-form-item label="批准文号">
170
             <el-form-item label="批准文号">
169
-                <el-input v-model="form.number"></el-input>
171
+                <el-input v-model="form.number" :disabled="true"></el-input>
170
             </el-form-item>
172
             </el-form-item>
171
             <el-form-item label="生产厂商">
173
             <el-form-item label="生产厂商">
172
-                <el-input v-model="form.manufacturer"></el-input>
174
+                <el-input v-model="form.manufacturer" :disabled="true"></el-input>
173
             </el-form-item>
175
             </el-form-item>
174
             <el-form-item label="备注">
176
             <el-form-item label="备注">
175
                 <div style="display:flex;">
177
                 <div style="display:flex;">
214
                 {{scope.row.retail_price}}
216
                 {{scope.row.retail_price}}
215
               </template>
217
               </template>
216
             </el-table-column>
218
             </el-table-column>
217
-            <!-- <el-table-column prop="name" label="新零售价" width="100" align="center">
218
-                <template slot-scope="scope">
219
-                {{scope.row.new_price}}
220
-               </template>
221
-            </el-table-column> -->
219
+        
222
             <el-table-column  prop="name"  label="生产厂商"  width="100" align="center">
220
             <el-table-column  prop="name"  label="生产厂商"  width="100" align="center">
223
               <template slot-scope="scope">
221
               <template slot-scope="scope">
224
                 {{scope.row.manufacturer}}
222
                 {{scope.row.manufacturer}}
245
             label="操作">
243
             label="操作">
246
                 <template slot-scope="scope">
244
                 <template slot-scope="scope">
247
                     <el-button type="text" size="small" @click="toDel(scope.$index)">删除</el-button>
245
                     <el-button type="text" size="small" @click="toDel(scope.$index)">删除</el-button>
248
-                    <el-button type="text" size="small" @click="toEdit(scope.row)">编辑</el-button>
246
+                    <el-button type="text" size="small" @click="toEdit(scope.row,scope.$index)">编辑</el-button>
249
                 </template>
247
                 </template>
250
             </el-table-column>
248
             </el-table-column>
251
         </el-table>
249
         </el-table>
257
    
255
    
258
 
256
 
259
     <el-dialog
257
     <el-dialog
260
-        title="耗材盘点核对"
258
+        title="药品盘点核对"
261
         :visible.sync="checkDialogVisible"
259
         :visible.sync="checkDialogVisible"
262
         width="30%"
260
         width="30%"
263
         >
261
         >
305
         width="1200px">
303
         width="1200px">
306
         <el-form :model="form" class="modifyDialog" label-width="120px">
304
         <el-form :model="form" class="modifyDialog" label-width="120px">
307
             <el-form-item label="药品ID">
305
             <el-form-item label="药品ID">
308
-                <el-input v-model="form.drug_id"></el-input>
306
+                <el-input v-model="form.drug_id" :disabled="true"></el-input>
309
             </el-form-item>
307
             </el-form-item>
310
             <el-form-item label="药品名称">
308
             <el-form-item label="药品名称">
311
             <el-autocomplete
309
             <el-autocomplete
325
                 </template>
323
                 </template>
326
                 </el-autocomplete>  
324
                 </el-autocomplete>  
327
             </el-form-item>
325
             </el-form-item>
328
-            <!-- <el-form-item label="规格">
329
-                <el-input v-model="form.name"></el-input>
330
-            </el-form-item> -->
326
+            <el-form-item label="批次">
327
+               <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
328
+                  <el-option
329
+                    v-for="(item,index) in numberList"
330
+                    :key="index"
331
+                    :label="item.batch_number"
332
+                    :value="item.id">
333
+                  </el-option>
334
+               </el-select>
335
+            </el-form-item>
336
+            <el-form-item label="规格">
337
+                <el-input v-model="form.specification_name" :disabled="true"></el-input>
338
+            </el-form-item>
331
             <el-form-item label="单位">
339
             <el-form-item label="单位">
332
-                <el-input v-model="form.warehousing_unit"></el-input>
340
+                <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
333
             </el-form-item>
341
             </el-form-item>
334
             <el-form-item label="进货价">
342
             <el-form-item label="进货价">
335
-                <el-input v-model="form.last_price"></el-input>
343
+                <el-input v-model="form.last_price" :disabled="true"></el-input>
336
             </el-form-item>
344
             </el-form-item>
337
             <el-form-item label="零售价">
345
             <el-form-item label="零售价">
338
-                <el-input v-model="form.retail_price"></el-input>
346
+                <el-input v-model="form.retail_price" :disabled="true"></el-input>
339
             </el-form-item>
347
             </el-form-item>
340
             <el-form-item label="报损数量">
348
             <el-form-item label="报损数量">
341
                 <el-input v-model="form.count"></el-input>
349
                 <el-input v-model="form.count"></el-input>
342
             </el-form-item>
350
             </el-form-item>
343
             <el-form-item label="库存">
351
             <el-form-item label="库存">
344
-                <el-input v-model="form.total"></el-input>
352
+                <el-input v-model="form.total" :disabled="true"></el-input>
345
             </el-form-item>
353
             </el-form-item>
346
             <el-form-item label="产地">
354
             <el-form-item label="产地">
347
-                <el-input v-model="form.drug_origin_place"></el-input>
355
+                <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
348
             </el-form-item>
356
             </el-form-item>
349
             <el-form-item label="批准文号">
357
             <el-form-item label="批准文号">
350
-                <el-input v-model="form.number"></el-input>
358
+                <el-input v-model="form.number" :disabled="true"></el-input>
351
             </el-form-item>
359
             </el-form-item>
352
             <el-form-item label="生产厂商">
360
             <el-form-item label="生产厂商">
353
-                <el-input v-model="form.manufacturer"></el-input>
361
+                <el-input v-model="form.manufacturer" :disabled="true"></el-input>
354
             </el-form-item>
362
             </el-form-item>
355
             <el-form-item label="备注">
363
             <el-form-item label="备注">
356
                 <div style="display:flex;">
364
                 <div style="display:flex;">
357
                     <el-input v-model="form.remark"></el-input>
365
                     <el-input v-model="form.remark"></el-input>
358
-                    <el-button style="margin-left:5px;" type="primary" @click="addPrice">添加</el-button>
359
                 </div>
366
                 </div>
360
             </el-form-item>
367
             </el-form-item>
361
         </el-form>
368
         </el-form>
373
         width="1200px">
380
         width="1200px">
374
         <el-form :model="form" class="modifyDialog" label-width="120px">
381
         <el-form :model="form" class="modifyDialog" label-width="120px">
375
             <el-form-item label="药品ID">
382
             <el-form-item label="药品ID">
376
-                <el-input v-model="form.drug_id"></el-input>
383
+                <el-input v-model="form.drug_id" :disabled="true"></el-input>
377
             </el-form-item>
384
             </el-form-item>
378
             <el-form-item label="药品名称">
385
             <el-form-item label="药品名称">
379
             <el-autocomplete
386
             <el-autocomplete
397
                 <el-input v-model="form.name"></el-input>
404
                 <el-input v-model="form.name"></el-input>
398
             </el-form-item> -->
405
             </el-form-item> -->
399
             <el-form-item label="单位">
406
             <el-form-item label="单位">
400
-                <el-input v-model="form.warehousing_unit"></el-input>
407
+                <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
401
             </el-form-item>
408
             </el-form-item>
402
             <el-form-item label="进货价">
409
             <el-form-item label="进货价">
403
-                <el-input v-model="form.last_price"></el-input>
410
+                <el-input v-model="form.last_price" :disabled="true"></el-input>
404
             </el-form-item>
411
             </el-form-item>
405
             <el-form-item label="零售价">
412
             <el-form-item label="零售价">
406
-                <el-input v-model="form.retail_price"></el-input>
413
+                <el-input v-model="form.retail_price" :disabled="true"></el-input>
407
             </el-form-item>
414
             </el-form-item>
408
             <el-form-item label="报损数量">
415
             <el-form-item label="报损数量">
409
                 <el-input v-model="form.count"></el-input>
416
                 <el-input v-model="form.count"></el-input>
410
             </el-form-item>
417
             </el-form-item>
411
             <el-form-item label="库存">
418
             <el-form-item label="库存">
412
-                <el-input v-model="form.total"></el-input>
419
+                <el-input v-model="form.total" :disabled="true"></el-input>
413
             </el-form-item>
420
             </el-form-item>
414
             <el-form-item label="产地">
421
             <el-form-item label="产地">
415
-                <el-input v-model="form.drug_origin_place"></el-input>
422
+                <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
416
             </el-form-item>
423
             </el-form-item>
417
             <el-form-item label="批准文号">
424
             <el-form-item label="批准文号">
418
-                <el-input v-model="form.number"></el-input>
425
+                <el-input v-model="form.number" :disabled="true"></el-input>
419
             </el-form-item>
426
             </el-form-item>
420
             <el-form-item label="生产厂商">
427
             <el-form-item label="生产厂商">
421
-                <el-input v-model="form.manufacturer"></el-input>
428
+                <el-input v-model="form.manufacturer" :disabled="true"></el-input>
422
             </el-form-item>
429
             </el-form-item>
423
             <el-form-item label="备注">
430
             <el-form-item label="备注">
424
                 <div style="display:flex;">
431
                 <div style="display:flex;">
425
                     <el-input v-model="form.remark"></el-input>
432
                     <el-input v-model="form.remark"></el-input>
426
-                    <el-button style="margin-left:5px;" type="primary" @click="addPrice">添加</el-button>
427
                 </div>
433
                 </div>
428
             </el-form-item>
434
             </el-form-item>
429
         </el-form>
435
         </el-form>
439
 
445
 
440
 <script>
446
 <script>
441
 import BreadCrumb from "../../components/bread-crumb";
447
 import BreadCrumb from "../../components/bread-crumb";
442
-import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage,getDrugWarehouseInfoList } from "@/api/drug/drug"
448
+import { postSearchDrugWarehouseList,saveDrugDamage,getDrugDamageList,SaveDrugDamagePrice,getDrugDamageDetail,modifyDrugDamage,deleteDrugDamage,getDrugWarehouseInfoList,getDrugWarehouseInfoTotal } from "@/api/drug/drug"
443
 import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
449
 import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
444
 import { uParseTime } from '@/utils/tools'
450
 import { uParseTime } from '@/utils/tools'
451
+import { getDataConfig } from '@/utils/data'
445
 export default {
452
 export default {
446
     name: "stockModifyPrice",
453
     name: "stockModifyPrice",
447
     components:{
454
     components:{
488
                 warehouse_info_id:"",
495
                 warehouse_info_id:"",
489
                 expiry_date:"",
496
                 expiry_date:"",
490
                 product_date:"",
497
                 product_date:"",
498
+                stock_max_number:"",
499
+                stock_min_number:"",
491
             },
500
             },
492
             drugList:[],
501
             drugList:[],
493
             manufacturerList:[],
502
             manufacturerList:[],
508
             modifyDialogVisible:false,
517
             modifyDialogVisible:false,
509
             id:"",
518
             id:"",
510
             numberList:[],
519
             numberList:[],
520
+            index:0,
521
+            unitList:[],
511
         }
522
         }
512
     },
523
     },
513
     methods:{
524
     methods:{
525
+      
514
         search(){
526
         search(){
515
-
527
+          this.getlist()
516
         },
528
         },
517
         print(){
529
         print(){
518
           if(this.ids == ""){
530
           if(this.ids == ""){
596
                 this.form.dealer = val.dealer
608
                 this.form.dealer = val.dealer
597
                 this.form.manufacturer = val.manufacturer
609
                 this.form.manufacturer = val.manufacturer
598
                 this.form.remark = val.remark
610
                 this.form.remark = val.remark
599
-                this.form.warehousing_unit = val.max_unit  
600
-                this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
601
-                this.form.batch_number = val.batch_number
611
+                this.form.warehousing_unit = val.max_unit 
612
+                this.form.total = "" 
613
+                // this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
614
+                // this.form.batch_number = val.batch_number
602
                 this.form.last_price = val.last_price
615
                 this.form.last_price = val.last_price
603
                 this.form.expiry_date = val.expiry_date
616
                 this.form.expiry_date = val.expiry_date
604
                 this.form.product_date = val.product_date
617
                 this.form.product_date = val.product_date
605
                 this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
618
                 this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
606
                 this.form.drug_origin_place = val.drug_origin_place
619
                 this.form.drug_origin_place = val.drug_origin_place
620
+                this.form.batch_number = ""
621
+                this.form.total = ""
607
              }
622
              }
608
            }) 
623
            }) 
609
         },
624
         },
629
         changeNumber(val){
644
         changeNumber(val){
630
           console.log("val",val)
645
           console.log("val",val)
631
           this.form.warehousing_info_id = val
646
           this.form.warehousing_info_id = val
647
+          this.getDrugWarehouseInfoTotal(val)
632
         },
648
         },
633
         getDrugBatchNumber(id){
649
         getDrugBatchNumber(id){
634
             var params = {
650
             var params = {
653
          }
669
          }
654
         },
670
         },
655
         addPrice(){
671
         addPrice(){
672
+          console.log("批次号",this.form.batch_number)
673
+          if(this.form.drug_name == ""){
674
+             this.$message.error("请输入药品名称")
675
+             return
676
+          }
677
+          if(this.form.batch_number == ""){
678
+            this.$message.error("请选择批次号")
679
+            return false
680
+          }
681
+          if(this.form.count == ""){
682
+             this.$message.error("请输入报损数量")
683
+             return false
684
+          }
656
           var obj = {
685
           var obj = {
657
             drug_id:this.form.drug_id,
686
             drug_id:this.form.drug_id,
658
             drug_name:this.form.drug_name,
687
             drug_name:this.form.drug_name,
674
             specification_name:this.form.specification_name,
703
             specification_name:this.form.specification_name,
675
             drug_origin_place:this.form.drug_origin_place,
704
             drug_origin_place:this.form.drug_origin_place,
676
             warehousing_info_id:this.form.warehousing_info_id,
705
             warehousing_info_id:this.form.warehousing_info_id,
677
-            batch_number:this.form.batch_number
706
+            batch_number:this.form.batch_number,
707
+            stock_max_number:this.form.stock_max_number,
708
+            stock_min_number:this.form.stock_min_number,
709
+            total:this.form.total,
678
           } 
710
           } 
679
           this.tableData.push(obj)   
711
           this.tableData.push(obj)   
680
           this.form.drug_name = ""
712
           this.form.drug_name = ""
694
           this.form.product_date = ""
726
           this.form.product_date = ""
695
           this.form.specification_name = ""
727
           this.form.specification_name = ""
696
           this.form.drug_origin_place = "" 
728
           this.form.drug_origin_place = "" 
729
+          this.form.total = ""
697
         },
730
         },
698
         saveDrugDamage(){
731
         saveDrugDamage(){
699
-          console.log("hhhh",this.tableData)
700
-          console.log("oooo",this.numberList)
732
+        
701
           for(let i=0;i<this.tableData.length;i++){
733
           for(let i=0;i<this.tableData.length;i++){
702
               this.tableData[i].retail_price = this.tableData[i].retail_price.toString()
734
               this.tableData[i].retail_price = this.tableData[i].retail_price.toString()
703
               this.tableData[i].last_price = this.tableData[i].last_price.toString()
735
               this.tableData[i].last_price = this.tableData[i].last_price.toString()
704
               this.tableData[i].new_price = this.tableData[i].new_price.toString()
736
               this.tableData[i].new_price = this.tableData[i].new_price.toString()
705
               this.tableData[i].count =  parseInt(this.tableData[i].count)
737
               this.tableData[i].count =  parseInt(this.tableData[i].count)
738
+              if(this.tableData[i].stock_max_number == ""){
739
+                this.tableData[i].stock_max_number = 0
740
+              }else{
741
+                this.tableData[i].stock_max_number = parseInt(this.tableData[i].stock_max_number)
742
+              }
743
+              if(this.tableData[i].stock_min_number == ""){
744
+                this.tableData[i].stock_min_number = 0
745
+              }else{
746
+                this.tableData[i].stock_min_number = parseInt(this.tableData[i].stock_min_number)
747
+              }
706
               if(this.tableData[i].expiry_date == undefined){
748
               if(this.tableData[i].expiry_date == undefined){
707
                 this.tableData[i].expiry_date  = 0
749
                 this.tableData[i].expiry_date  = 0
708
               }else{
750
               }else{
723
             tableData:this.tableData,
765
             tableData:this.tableData,
724
           }
766
           }
725
           console.log("parasm222",params)
767
           console.log("parasm222",params)
726
- 
768
+   
727
         saveDrugDamage(params).then(response=>{
769
         saveDrugDamage(params).then(response=>{
728
             if(response.data.state == 1){
770
             if(response.data.state == 1){
729
             var msg =  response.data.data.msg
771
             var msg =  response.data.data.msg
741
           page:this.page, 
783
           page:this.page, 
742
           start_time:this.start_time,
784
           start_time:this.start_time,
743
           end_time:this.end_time,
785
           end_time:this.end_time,
786
+          keyword:this.searchKey,
744
         }
787
         }
745
         getDrugDamageList(params).then(response=>{
788
         getDrugDamageList(params).then(response=>{
746
            if(response.data.state == 1){
789
            if(response.data.state == 1){
798
      toDel(index){
841
      toDel(index){
799
        this.tableList.splice(index,1)
842
        this.tableList.splice(index,1)
800
      },
843
      },
801
-     toEdit(val){
844
+     toEdit(val,index){
845
+       this.index = index
802
        this.form.drug_name = val.drug_name
846
        this.form.drug_name = val.drug_name
803
        this.form.drug_origin_place = val.drug_origin_place
847
        this.form.drug_origin_place = val.drug_origin_place
804
        this.form.last_price = val.last_price
848
        this.form.last_price = val.last_price
810
        this.form.remark = val.remark
854
        this.form.remark = val.remark
811
        this.form.id = val.id
855
        this.form.id = val.id
812
        this.form.count = val.count
856
        this.form.count = val.count
857
+       this.form.specification_name = val.specification_name
858
+       this.form.warehousing_unit = val.warehousing_unit
859
+       this.form.stock_max_number = val.stock_max_number
860
+       this.form.stock_min_number = val.stock_min_number,
813
        this.editDialogVisible = true
861
        this.editDialogVisible = true
814
      },
862
      },
815
      EditDrugDamage(){
863
      EditDrugDamage(){
823
             this.tableData[i].retail_price = this.form.retail_price
871
             this.tableData[i].retail_price = this.form.retail_price
824
             this.tableData[i].remark = this.form.remark
872
             this.tableData[i].remark = this.form.remark
825
             this.tableData[i].count = this.form.count
873
             this.tableData[i].count = this.form.count
874
+            this.tableData[i].stock_max_number = this.form.stock_max_number
875
+            this.tableData[i].stock_min_number = this.form.stock_min_number
876
+            this.tableData[i].manufacturer = this.form.manufacturer
877
+            this.tableData[i].dealer = this.form.dealer
878
+          }
879
+          if(this.index == i){
880
+            this.tableData[i].drug_name = this.form.drug_name
881
+            this.tableData[i].drug_origin_place = this.form.drug_origin_place
882
+            this.tableData[i].last_price = this.form.last_price
883
+            this.tableData[i].new_price = this.form.new_price
884
+            this.tableData[i].number = this.form.number
885
+            this.tableData[i].retail_price = this.form.retail_price
886
+            this.tableData[i].remark = this.form.remark
887
+            this.tableData[i].count = this.form.count
888
+            this.tableData[i].stock_max_number = this.form.stock_max_number
889
+            this.tableData[i].stock_min_number = this.form.stock_min_number
890
+            this.tableData[i].manufacturer = this.form.manufacturer
891
+            this.tableData[i].dealer = this.form.dealer
826
           }
892
           }
827
        }
893
        }
828
        this.editDialogVisible = false
894
        this.editDialogVisible = false
844
        getDrugDamageDetail(id).then(response=>{
910
        getDrugDamageDetail(id).then(response=>{
845
          if(response.data.state ==1){
911
          if(response.data.state ==1){
846
            var detail = response.data.data.detail
912
            var detail = response.data.data.detail
913
+           console.log("系准给",detail)
847
            this.form.drug_id = detail.drug_id
914
            this.form.drug_id = detail.drug_id
848
            this.form.drug_name = detail.drug_name
915
            this.form.drug_name = detail.drug_name
849
            this.form.drug_origin_place = detail.drug_origin_place
916
            this.form.drug_origin_place = detail.drug_origin_place
855
            this.form.remark = detail.remark
922
            this.form.remark = detail.remark
856
            this.form.count = detail.count
923
            this.form.count = detail.count
857
            this.id = detail.id
924
            this.id = detail.id
858
-           this.form.warehousing_unit = detail.warehouseing_unit
925
+           this.form.warehousing_unit = detail.warehousing_unit
926
+           this.form.stock_max_number = detail.stock_max_number
927
+           this.form.stock_min_number = detail.stock_min_number
928
+           this.form.total = detail.total
929
+           this.form.warehousing_info_id = detail.warehousing_info_id
859
            this.modifyDialogVisible = true
930
            this.modifyDialogVisible = true
860
          }
931
          }
861
        })
932
        })
862
      },
933
      },
863
      modifyDrugDamage(){
934
      modifyDrugDamage(){
935
+       if(this.form.stock_max_number == ""){
936
+         this.form.stock_max_number = 0
937
+       }else{
938
+         this.form.stock_max_number = parseInt(this.form.stock_max_number)
939
+       }
940
+       if(this.form.stock_min_number == ""){
941
+         this.form.stock_min_number = 0
942
+       }else{
943
+         this.form.stock_min_number = parseInt(this.form.stock_min_number)
944
+       }
864
          var params = {
945
          var params = {
865
            drug_id:this.form.drug_id,
946
            drug_id:this.form.drug_id,
866
            drug_name:this.form.drug_name,
947
            drug_name:this.form.drug_name,
874
            count:parseInt(this.form.count),
955
            count:parseInt(this.form.count),
875
            warehousing_unit:this.form.warehousing_unit,
956
            warehousing_unit:this.form.warehousing_unit,
876
            id:this.id,
957
            id:this.id,
958
+           total:this.form.total,
959
+           stock_max_number:this.form.stock_max_number,
960
+           stock_min_number:this.form.stock_min_number,
877
          }
961
          }
878
        modifyDrugDamage(params).then(response=>{
962
        modifyDrugDamage(params).then(response=>{
879
           if(response.data.state == 1){
963
           if(response.data.state == 1){
916
      changeEndTime(val){
1000
      changeEndTime(val){
917
        this.end_time = this.getTime(val)
1001
        this.end_time = this.getTime(val)
918
        this.getlist()
1002
        this.getlist()
1003
+     },
1004
+     getDrugWarehouseInfoTotal(val){
1005
+        var params = {
1006
+          id:val,
1007
+        }
1008
+      getDrugWarehouseInfoTotal(params).then(response=>{
1009
+         if(response.data.state == 1){
1010
+           var list = response.data.data.list
1011
+           console.log("list",list)
1012
+          //  this.form.total = list.stock_max_number + list.XtBaseDrug.max_unit + list.stock_min_number + list.XtBaseDrug.min_unit
1013
+          if(list.stock_max_number > 0){
1014
+            this.form.total = list.stock_max_number + list.XtBaseDrug.max_unit
1015
+            this.form.stock_max_number = list.stock_max_number
1016
+          }
1017
+          if(list.stock_min_number >0 ){
1018
+            this.form.total = list.stock_min_number + list.XtBaseDrug.min_unit
1019
+            this.form.stock_min_number = list.stock_min_number
1020
+          }
1021
+          
1022
+         }
1023
+      })
1024
+     },
1025
+     changeMaxUnit(){
1026
+
919
      }
1027
      }
920
     },
1028
     },
921
     created(){
1029
     created(){
1030
+     
922
       this.getlist()
1031
       this.getlist()
923
     },
1032
     },
924
     mounted() {
1033
     mounted() {

+ 3 - 1
src/xt_pages/stock/drugs/drugStockFlow.vue 查看文件

68
              <span v-if="scope.row.consumable_type == 2">手动出库</span>
68
              <span v-if="scope.row.consumable_type == 2">手动出库</span>
69
              <span v-if="scope.row.consumable_type == 3">自动出库</span>
69
              <span v-if="scope.row.consumable_type == 3">自动出库</span>
70
              <span v-if="scope.row.consumable_type == 4">手动退库</span>
70
              <span v-if="scope.row.consumable_type == 4">手动退库</span>
71
+             <span v-if="scope.row.consumable_type == 5">报损数量</span>
71
            </template>
72
            </template>
72
         </el-table-column>
73
         </el-table-column>
73
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
74
         <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
75
              <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
76
              <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
76
               <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>
77
               <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3">{{scope.row.warehouse_out_order_number}}</span>
77
               <span v-if="scope.row.consumable_type == 4">{{scope.row.cancel_order_number}}</span>
78
               <span v-if="scope.row.consumable_type == 4">{{scope.row.cancel_order_number}}</span>
79
+              <span v-if="scope.row.consumable_type == 5">{{scope.row.cancel_order_number}}</span>
78
            </template>
80
            </template>
79
         </el-table-column>
81
         </el-table-column>
80
         <el-table-column prop="drug_name" label="操作日期" align="center">
82
         <el-table-column prop="drug_name" label="操作日期" align="center">
88
              <span v-if="scope.row.consumable_type == 2">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
90
              <span v-if="scope.row.consumable_type == 2">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
89
              <span v-if="scope.row.consumable_type == 3">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
91
              <span v-if="scope.row.consumable_type == 3">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
90
              <span v-if="scope.row.consumable_type == 4">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
92
              <span v-if="scope.row.consumable_type == 4">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
91
-            
93
+             <span v-if="scope.row.consumable_type == 5">{{scope.row.count}}{{scope.row.max_unit}}{{scope.row.min_unit}}</span>
92
            </template>
94
            </template>
93
         </el-table-column>
95
         </el-table-column>
94
        
96
        

+ 150 - 30
src/xt_pages/stock/drugs/inventory.vue 查看文件

53
                   {{getTime(scope.row.start_time)}}
53
                   {{getTime(scope.row.start_time)}}
54
                 </template>
54
                 </template>
55
             </el-table-column>
55
             </el-table-column>
56
+            <el-table-column prop="date" label="药品名称" align="center">
57
+                <template slot-scope="scope">
58
+                  {{scope.row.drug_name}}
59
+                </template>
60
+            </el-table-column>
61
+            <el-table-column prop="date" label="药品规格" align="center">
62
+                <template slot-scope="scope">
63
+                  {{scope.row.specification_name}}
64
+                </template>
65
+            </el-table-column>
56
             <el-table-column prop="name" label="盘点数量" align="center">
66
             <el-table-column prop="name" label="盘点数量" align="center">
57
                 <template slot-scope="scope">
67
                 <template slot-scope="scope">
58
                   {{scope.row.count}}
68
                   {{scope.row.count}}
82
             <el-table-column label="操作" align="center" width="260">
92
             <el-table-column label="操作" align="center" width="260">
83
                 <template slot-scope="scope">
93
                 <template slot-scope="scope">
84
                   <el-button type="primary" size="small" @click="editInventory(scope.row.id,scope.row.checker_status,scope.$index)">编辑</el-button>
94
                   <el-button type="primary" size="small" @click="editInventory(scope.row.id,scope.row.checker_status,scope.$index)">编辑</el-button>
85
-                  <el-button type="primary" size="small" @click="toProof(scope.row.id)">校正</el-button>
86
                   <el-button type="danger" size="small" @click="deleteDrugInventory(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
95
                   <el-button type="danger" size="small" @click="deleteDrugInventory(scope.row.id,scope.row.checker_status,scope.$index)">删除</el-button>
87
                  
96
                  
88
                 </template>
97
                 </template>
100
         >
109
         >
101
         </el-pagination>
110
         </el-pagination>
102
         <el-dialog
111
         <el-dialog
103
-        title="库房调价"
112
+        title="药品盘点"
104
         :visible.sync="dialogVisible"
113
         :visible.sync="dialogVisible"
105
         width="1200px">
114
         width="1200px">
106
             <el-form :model="form" class="modifyDialog" label-width="120px">
115
             <el-form :model="form" class="modifyDialog" label-width="120px">
107
-                <el-form-item label="耗材ID">
108
-                    <el-input v-model="form.drug_id"></el-input>
116
+                <el-form-item label="药品ID">
117
+                    <el-input v-model="form.drug_id" :disabled="true"></el-input>
109
                 </el-form-item>
118
                 </el-form-item>
110
                 <el-form-item label="药品名称">
119
                 <el-form-item label="药品名称">
111
                   <el-autocomplete
120
                   <el-autocomplete
138
                 <el-form-item label="规格">
147
                 <el-form-item label="规格">
139
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
148
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
140
                 </el-form-item>
149
                 </el-form-item>
141
-                <el-form-item label="单位">
142
-                    <el-input v-model="form.warehousing_unit"></el-input>
150
+                <!-- <el-form-item label="单位">
151
+                    <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
152
+                </el-form-item> -->
153
+                 <el-form-item prop="max_unit" label="单位">
154
+                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
155
+                      <el-option
156
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
157
+                        :key="index"
158
+                        :label="item.name"
159
+                        :value="item.name">
160
+                      </el-option>
161
+                    </el-select>
143
                 </el-form-item>
162
                 </el-form-item>
144
                 <el-form-item label="进货价">
163
                 <el-form-item label="进货价">
145
-                    <el-input v-model="form.last_price"></el-input>
164
+                    <el-input v-model="form.last_price" :disabled="true"></el-input>
146
                 </el-form-item>
165
                 </el-form-item>
147
                 <el-form-item label="零售价">
166
                 <el-form-item label="零售价">
148
-                    <el-input v-model="form.retail_price"></el-input>
167
+                    <el-input v-model="form.retail_price" :disabled="true"></el-input>
149
                 </el-form-item>
168
                 </el-form-item>
150
                 <el-form-item label="盘点数量">
169
                 <el-form-item label="盘点数量">
151
                     <el-input v-model="form.count"></el-input>
170
                     <el-input v-model="form.count"></el-input>
154
                     <el-input v-model="form.total" :disabled="true"></el-input>
173
                     <el-input v-model="form.total" :disabled="true"></el-input>
155
                 </el-form-item>
174
                 </el-form-item>
156
                 <el-form-item label="产地">
175
                 <el-form-item label="产地">
157
-                    <el-input v-model="form.drug_origin_place"></el-input>
176
+                    <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
158
                 </el-form-item>
177
                 </el-form-item>
159
                 <el-form-item label="批准文号">
178
                 <el-form-item label="批准文号">
160
-                    <el-input v-model="form.number"></el-input>
179
+                    <el-input v-model="form.number" :disabled="true"></el-input>
161
                 </el-form-item>
180
                 </el-form-item>
162
                 <el-form-item label="生产厂商">
181
                 <el-form-item label="生产厂商">
163
-                    <el-input v-model="form.manufacturer"></el-input>
182
+                    <el-input v-model="form.manufacturer" :disabled="true"></el-input>
164
                 </el-form-item>
183
                 </el-form-item>
165
                 <el-form-item label="备注">
184
                 <el-form-item label="备注">
166
                     <div style="display:flex;">
185
                     <div style="display:flex;">
231
                 width="100"
250
                 width="100"
232
                 label="操作">
251
                 label="操作">
233
                     <template slot-scope="scope">
252
                     <template slot-scope="scope">
234
-                        <el-button type="text" size="small" @click="toEdit(scope.row)">编辑</el-button>
253
+                        <el-button type="text" size="small" @click="toEdit(scope.row,scope.$index)">编辑</el-button>
235
                         <el-button type="text" size="small" @click="toDelete(scope.$index)">删除</el-button>
254
                         <el-button type="text" size="small" @click="toDelete(scope.$index)">删除</el-button>
236
                        
255
                        
237
                     </template>
256
                     </template>
273
                 <el-form-item label="规格">
292
                 <el-form-item label="规格">
274
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
293
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
275
                 </el-form-item>
294
                 </el-form-item>
276
-                <el-form-item label="单位">
295
+               <el-form-item label="批次">
296
+                  <el-select v-model="form.batch_number" filterable placeholder="请选择" @change="changeNumber">
297
+                      <el-option
298
+                        v-for="(item,index) in numberList"
299
+                        :key="index"
300
+                        :label="item.batch_number"
301
+                        :value="item.id">
302
+                      </el-option>
303
+                  </el-select>
304
+                </el-form-item>
305
+                <!-- <el-form-item label="单位">
277
                     <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
306
                     <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
307
+                </el-form-item> -->
308
+               <el-form-item prop="warehousing_unit" label="单位">
309
+                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
310
+                      <el-option
311
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
312
+                        :key="index"
313
+                        :label="item.name"
314
+                        :value="item.name">
315
+                      </el-option>
316
+                    </el-select>
278
                 </el-form-item>
317
                 </el-form-item>
279
                 <el-form-item label="进货价">
318
                 <el-form-item label="进货价">
280
                     <el-input v-model="form.last_price" :disabled="true"></el-input>
319
                     <el-input v-model="form.last_price" :disabled="true"></el-input>
381
                 <el-form-item label="规格">
420
                 <el-form-item label="规格">
382
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
421
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
383
                 </el-form-item>
422
                 </el-form-item>
384
-                <el-form-item label="单位">
385
-                    <el-input v-model="form.warehousing_unit"></el-input>
423
+                <!-- <el-form-item label="单位">
424
+                    <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
425
+                </el-form-item> -->
426
+                <el-form-item prop="warehousing_unit" label="单位">
427
+                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
428
+                      <el-option
429
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
430
+                        :key="index"
431
+                        :label="item.name"
432
+                        :value="item.name">
433
+                      </el-option>
434
+                    </el-select>
386
                 </el-form-item>
435
                 </el-form-item>
387
                 <el-form-item label="进货价">
436
                 <el-form-item label="进货价">
388
-                    <el-input v-model="form.last_price"></el-input>
437
+                    <el-input v-model="form.last_price" :disabled="true"></el-input>
389
                 </el-form-item>
438
                 </el-form-item>
390
                 <el-form-item label="零售价">
439
                 <el-form-item label="零售价">
391
-                    <el-input v-model="form.retail_price"></el-input>
440
+                    <el-input v-model="form.retail_price" :disabled="true"></el-input>
392
                 </el-form-item>
441
                 </el-form-item>
393
                 <el-form-item label="盘点数量">
442
                 <el-form-item label="盘点数量">
394
                     <el-input v-model="form.count"></el-input>
443
                     <el-input v-model="form.count"></el-input>
397
                     <el-input v-model="form.total" :disabled="true"></el-input>
446
                     <el-input v-model="form.total" :disabled="true"></el-input>
398
                 </el-form-item>
447
                 </el-form-item>
399
                 <el-form-item label="产地">
448
                 <el-form-item label="产地">
400
-                    <el-input v-model="form.drug_origin_place"></el-input>
449
+                    <el-input v-model="form.drug_origin_place" :disabled="true"></el-input>
401
                 </el-form-item>
450
                 </el-form-item>
402
                 <el-form-item label="批准文号">
451
                 <el-form-item label="批准文号">
403
-                    <el-input v-model="form.number"></el-input>
452
+                    <el-input v-model="form.number" :disabled="true"></el-input>
404
                 </el-form-item>
453
                 </el-form-item>
405
                 <el-form-item label="生产厂商">
454
                 <el-form-item label="生产厂商">
406
-                    <el-input v-model="form.manufacturer"></el-input>
455
+                    <el-input v-model="form.manufacturer" :disabled="true"></el-input>
407
                 </el-form-item>
456
                 </el-form-item>
408
                 <el-form-item label="备注">
457
                 <el-form-item label="备注">
409
                     <div style="display:flex;">
458
                     <div style="display:flex;">
441
                   </template>
490
                   </template>
442
                  </el-autocomplete>  
491
                  </el-autocomplete>  
443
                 </el-form-item>
492
                 </el-form-item>
444
-                <el-form-item label="单位">
493
+                <!-- <el-form-item label="单位">
445
                     <el-input v-model="form.warehousing_unit"></el-input>
494
                     <el-input v-model="form.warehousing_unit"></el-input>
495
+                </el-form-item> -->
496
+                <el-form-item prop="warehousing_unit" label="单位">
497
+                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
498
+                      <el-option
499
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
500
+                        :key="index"
501
+                        :label="item.name"
502
+                        :value="item.name">
503
+                      </el-option>
504
+                    </el-select>
446
                 </el-form-item>
505
                 </el-form-item>
447
                 <el-form-item label="盘点数量">
506
                 <el-form-item label="盘点数量">
448
                     <el-input v-model="form.count"></el-input>
507
                     <el-input v-model="form.count"></el-input>
471
 
530
 
472
 <script>
531
 <script>
473
 import { uParseTime } from '@/utils/tools'
532
 import { uParseTime } from '@/utils/tools'
474
-import { postSearchDrugWarehouseList,getDrugWarehouseInfoList,saveDrugInventory,getDrugInventoryList,SaveDrugCheckedInventory,getDrugInventoryDetail,modifyInventory,SaveDrugProofInventory} from "@/api/drug/drug"
533
+import { postSearchDrugWarehouseList,getDrugWarehouseInfoList,saveDrugInventory,getDrugInventoryList,SaveDrugCheckedInventory,getDrugInventoryDetail,modifyInventory,SaveDrugProofInventory,getDrugWarehouseInfoTotal} from "@/api/drug/drug"
475
 import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
534
 import { getDrugBatchNumber } from  "@/api/drug/drug_stock"
535
+import { getDataConfig } from '@/utils/data'
476
 export default {
536
 export default {
477
     name: "drugInventory",
537
     name: "drugInventory",
478
     data() {
538
     data() {
529
             modifydialogVisible:false,
589
             modifydialogVisible:false,
530
             numberList:[],
590
             numberList:[],
531
             profdialogVisible:false,
591
             profdialogVisible:false,
592
+            index:"",
593
+            unitList:[],
532
         }
594
         }
533
     },
595
     },
534
     methods:{
596
     methods:{
535
         changeNumber(val){
597
         changeNumber(val){
536
           this.form.warehouse_info_id = val
598
           this.form.warehouse_info_id = val
599
+          this.getDrugWarehouseInfoTotal(val)
537
         },
600
         },
538
         search(){
601
         search(){
539
           this.getlist()
602
           this.getlist()
620
                 this.form.manufacturer = val.manufacturer
683
                 this.form.manufacturer = val.manufacturer
621
                 this.form.remark = val.remark
684
                 this.form.remark = val.remark
622
                 this.form.warehousing_unit = val.max_unit  
685
                 this.form.warehousing_unit = val.max_unit  
623
-                this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
686
+                this.form.total = ""
687
+                // this.form.total = this.getTotal(total,val.max_unit,val.min_unit,val.min_number)
624
                 this.form.batch_number = val.batch_number
688
                 this.form.batch_number = val.batch_number
625
                 this.form.last_price = val.last_price
689
                 this.form.last_price = val.last_price
626
                 this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
690
                 this.form.specification_name =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
705
         toDelete(index){
769
         toDelete(index){
706
           this.tableData.splice(index,1)
770
           this.tableData.splice(index,1)
707
         },
771
         },
708
-        toEdit(val){
709
-            console.log("val2323223",val)
772
+        toEdit(val,index){
710
            this.form.id= val.id
773
            this.form.id= val.id
711
            this.form.drug_id = val.drug_id,
774
            this.form.drug_id = val.drug_id,
712
            this.form.drug_name = val.drug_name
775
            this.form.drug_name = val.drug_name
724
            this.form.expiry_date = val.expiry_date
787
            this.form.expiry_date = val.expiry_date
725
            this.form.product_date =val.product_date  
788
            this.form.product_date =val.product_date  
726
            this.form.count = val.count
789
            this.form.count = val.count
727
-          
790
+           this.index = index
728
            this.editdialogVisible = true
791
            this.editdialogVisible = true
729
         },
792
         },
730
         saveInventory(){
793
         saveInventory(){
747
                this.tableData[i].product_date = this.form.product_date
810
                this.tableData[i].product_date = this.form.product_date
748
                this.tableData[i].count =this.form.count
811
                this.tableData[i].count =this.form.count
749
              }
812
              }
813
+            if(this.index == i){
814
+               this.tableData[i].drug_id = this.form.drug_id
815
+               this.tableData[i].drug_name = this.form.drug_name
816
+               this.tableData[i].retail_price = this.form.retail_price
817
+               this.tableData[i].warehousing_order = this.form.warehousing_order
818
+               this.tableData[i].number = this.form.number
819
+               this.tableData[i].dealer = this.form.dealer
820
+               this.tableData[i].manufacturer = this.form.manufacturer
821
+               this.tableData[i].remark = this.form.remark
822
+               this.tableData[i].warehouseing_unit = this.form.warehousing_unit
823
+               this.tableData[i].total = this.form.total
824
+               this.tableData[i].batch_number = this.form.batch_number
825
+               this.tableData[i].last_price = this.form.last_price
826
+               this.tableData[i].specification_name = this.form.specification_name
827
+               this.tableData[i].expiry_date = this.form.expiry_date
828
+               this.tableData[i].product_date = this.form.product_date
829
+               this.tableData[i].count =this.form.count
830
+             }
750
           }   
831
           }   
751
           this.editdialogVisible = false
832
           this.editdialogVisible = false
752
         },
833
         },
864
        getDrugInventoryDetail(id).then(response=>{
945
        getDrugInventoryDetail(id).then(response=>{
865
          if(response.data.state == 1){
946
          if(response.data.state == 1){
866
             var detail = response.data.data.detail
947
             var detail = response.data.data.detail
948
+            console.log("detial2323223",detail)
867
             this.id = detail.id
949
             this.id = detail.id
868
             this.form.drug_id = detail.drug_id
950
             this.form.drug_id = detail.drug_id
869
             this.form.drug_name = detail.drug_name
951
             this.form.drug_name = detail.drug_name
878
             this.form.total = detail.total
960
             this.form.total = detail.total
879
         
961
         
880
             this.form.last_price = detail.last_price
962
             this.form.last_price = detail.last_price
881
-          
963
+           
882
             this.form.count =  parseInt(detail.count)
964
             this.form.count =  parseInt(detail.count)
883
             this.form.drug_origin_place = detail.drug_origin_place
965
             this.form.drug_origin_place = detail.drug_origin_place
966
+            this.form.stock_max_number = detail.stock_max_number
967
+            this.form.stock_min_number = detail.stock_min_number
968
+            this.form.warehouse_info_id = detail.warehouse_info_id
884
             this.modifydialogVisible = true
969
             this.modifydialogVisible = true
885
          }
970
          }
886
        })
971
        })
891
           drug_id:this.form.drug_id,
976
           drug_id:this.form.drug_id,
892
           drug_name:this.form.drug_name,
977
           drug_name:this.form.drug_name,
893
           specification_name:this.form.specification_name,
978
           specification_name:this.form.specification_name,
894
-          warehousing_unit:this.form.warehouseing_unit,
979
+          warehousing_unit:this.form.warehousing_unit,
895
           last_price:this.form.last_price,
980
           last_price:this.form.last_price,
896
           retail_price:this.form.retail_price,
981
           retail_price:this.form.retail_price,
897
           count:this.form.count,
982
           count:this.form.count,
900
           batch_number:this.form.batch_number,
985
           batch_number:this.form.batch_number,
901
           manufacturer:this.form.manufacturer,
986
           manufacturer:this.form.manufacturer,
902
           remark:this.form.remark,
987
           remark:this.form.remark,
988
+          stock_max_number:this.form.stock_max_number,
989
+          stock_min_number:this.form.stock_min_number,
990
+          warehouse_info_id:this.form.warehouse_info_id,
903
        }
991
        }
992
+       console.log("params2222",params)
993
+      
904
       modifyInventory(params).then(response=>{
994
       modifyInventory(params).then(response=>{
905
          if(response.data.state == 1){
995
          if(response.data.state == 1){
906
            var inventory =  response.data.data.inventory
996
            var inventory =  response.data.data.inventory
933
           this.loading = false
1023
           this.loading = false
934
         });   
1024
         });   
935
      },
1025
      },
936
-       exportList(){
1026
+    exportList(){
937
        
1027
        
938
          import('@/vendor/Export2Excel').then(excel => {
1028
          import('@/vendor/Export2Excel').then(excel => {
939
          const tHeader = ['药品名称', '规格', '单位','零售价','当前库存','盘点数','亏损金额']
1029
          const tHeader = ['药品名称', '规格', '单位','零售价','当前库存','盘点数','亏损金额']
1013
        changeEndTime(val){
1103
        changeEndTime(val){
1014
          this.end_time = this.getTime(val)
1104
          this.end_time = this.getTime(val)
1015
          this.getlist()
1105
          this.getlist()
1016
-       }
1106
+       },
1107
+      getDrugWarehouseInfoTotal(val){
1108
+        var params = {
1109
+          id:val,
1110
+        }
1111
+      getDrugWarehouseInfoTotal(params).then(response=>{
1112
+         if(response.data.state == 1){
1113
+           var list = response.data.data.list
1114
+           console.log("list",list)
1115
+        
1116
+          if(list.stock_max_number > 0){
1117
+            this.form.total = list.stock_max_number + list.XtBaseDrug.max_unit
1118
+            this.form.stock_max_number = list.stock_max_number
1119
+          }
1120
+          if(list.stock_min_number >0 ){
1121
+            this.form.total = list.stock_min_number + list.XtBaseDrug.min_unit
1122
+            this.form.stock_min_number = list.stock_min_number
1123
+          }
1124
+          
1125
+         }
1126
+      })
1127
+     },
1128
+     getDataConfig(module, filed_name) {
1129
+       return getDataConfig(module, filed_name)
1130
+      },  
1131
+    changeMaxUnit(val){
1132
+      console.log("val23232",val)
1133
+      this.form.warehousing_unit = val
1134
+    }
1017
     },
1135
     },
1018
     created(){
1136
     created(){
1137
+      this.unitList =  this.getDataConfig('hemodialysis','units')
1138
+      console.log("单位",this.unitList)
1019
       this.getlist()
1139
       this.getlist()
1020
     },
1140
     },
1021
     mounted() {
1141
     mounted() {

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

727
     
727
     
728
      },
728
      },
729
      SaveCheckedPrice(){
729
      SaveCheckedPrice(){
730
-       
731
          var params = {
730
          var params = {
732
             ids:this.ids,
731
             ids:this.ids,
733
             check_time:this.getTime(this.check_time),
732
             check_time:this.getTime(this.check_time),

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

109
        </el-table-column>
109
        </el-table-column>
110
        <el-table-column label="出库数量" align="center">
110
        <el-table-column label="出库数量" align="center">
111
          <template slot-scope="scope">
111
          <template slot-scope="scope">
112
-            <span v-if="getWareInfo(scope.row.xt_warehouse_info)>0">{{getWareInfo(scope.row.xt_warehouse_info) - getOverplus(scope.row.xt_warehouse_info) - getCancelInfo(scope.row.cancel_stock_info)}}{{scope.row.packing_unit}}</span>
112
+            {{getAutoCount(scope.row.id) + getOutCount(scope.row.id)}}
113
+            <!-- <span v-if="getWareInfo(scope.row.xt_warehouse_info)>0">{{getWareInfo(scope.row.xt_warehouse_info) - getOverplus(scope.row.xt_warehouse_info) - getCancelInfo(scope.row.cancel_stock_info)}}{{scope.row.packing_unit}}</span> -->
113
          </template>
114
          </template>
114
        </el-table-column>
115
        </el-table-column>
115
 
116
 
116
        <el-table-column label="剩余库存量" align="center">
117
        <el-table-column label="剩余库存量" align="center">
117
          <template slot-scope="scope">
118
          <template slot-scope="scope">
118
-           <span v-if="getOverplus(scope.row.xt_warehouse_info)>0">{{getOverplus(scope.row.xt_warehouse_info)}}{{scope.row.packing_unit}}</span>
119
+          <span v-if="getWareInfo(scope.row.xt_warehouse_info) > 0">{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span> 
120
+           <!-- <span v-if="getOverplus(scope.row.xt_warehouse_info)>0">{{getOverplus(scope.row.xt_warehouse_info)}}{{scope.row.packing_unit}}</span> -->
119
          </template>
121
          </template>
120
        </el-table-column>
122
        </el-table-column>
121
        <el-table-column label="操作" align="center" width="260px">
123
        <el-table-column label="操作" align="center" width="260px">
179
     nowYear = nowDate.getFullYear();
181
     nowYear = nowDate.getFullYear();
180
     nowMonth = nowDate.getMonth() + 1;
182
     nowMonth = nowDate.getMonth() + 1;
181
     nowDay = nowDate.getDate();
183
     nowDay = nowDate.getDate();
182
-    this.start_time =
183
-      nowYear +
184
-      "-" +
185
-      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
186
-      "-" +
187
-      (nowDay < 10 ? "0" + nowDay : nowDay);
184
+    this.start_time = nowYear +"-" +(nowMonth < 10 ? "0" + nowMonth : nowMonth) +"-" +(nowDay < 10 ? "0" + nowDay : nowDay);
188
     this.GetAllGoodInfo();
185
     this.GetAllGoodInfo();
189
     this.GetAllGoodType();
186
     this.GetAllGoodType();
190
     this.getlist()
187
     this.getlist()
191
-    // this.getStockDrugCount()
188
+    this.getStockDrugCount()
192
   },
189
   },
193
   components: {
190
   components: {
194
     BreadCrumb
191
     BreadCrumb
324
       this.limit = val;
321
       this.limit = val;
325
 
322
 
326
       this.getlist()
323
       this.getlist()
324
+      
327
     },
325
     },
328
     handleCurrentChange(val) {
326
     handleCurrentChange(val) {
329
       this.page = val;
327
       this.page = val;
341
       } else {
339
       } else {
342
         this.start_time = val
340
         this.start_time = val
343
          this.getlist()
341
          this.getlist()
342
+         this.getStockDrugCount()
343
+
344
       }
344
       }
345
     },
345
     },
346
     endTimeChange: function(val) {
346
     endTimeChange: function(val) {
351
       } else {
351
       } else {
352
         this.end_time = val
352
         this.end_time = val
353
          this.getlist()
353
          this.getlist()
354
+         this.getStockDrugCount()
354
       }
355
       }
355
 
356
 
356
     },
357
     },
403
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
404
            this.tableList[i].unit = this.tableList[i].specification_name + "/" + this.tableList[i].packing_unit
404
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
405
            this.tableList[i].prodect_name = this.getManufacture(this.tableList[i].manufacturer)
405
            this.tableList[i].inCount =  this.getWareInfo(this.tableList[i].xt_warehouse_info)
406
            this.tableList[i].inCount =  this.getWareInfo(this.tableList[i].xt_warehouse_info)
406
-        
407
-          this.tableList[i].outCount = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getOverplus(this.tableList[i].xt_warehouse_info) - this.getCancelInfo(this.tableList[i].cancel_stock_info)
408
-          this.tableList[i].overplus = this.getOverplus(this.tableList[i].xt_warehouse_info)
407
+          this.tableList[i].outCount =  this.getAutoCount(this.tableList[i].id) + this.getOutCount(this.tableList[i].id)
408
+          // this.tableList[i].outCount = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getOverplus(this.tableList[i].xt_warehouse_info) - this.getCancelInfo(this.tableList[i].cancel_stock_info)
409
+          // this.tableList[i].overplus = this.getOverplus(this.tableList[i].xt_warehouse_info)
410
+          if(this.getWareInfo(this.tableList[i].xt_warehouse_info) > 0){
411
+            this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
412
+          }else{
413
+             this.tableList[i].overplus = 0
414
+          }
415
+          
409
          }
416
          }
410
          console.log("table",this.tableList)
417
          console.log("table",this.tableList)
411
          const data = this.formatJson(filterVal, this.tableList)
418
          const data = this.formatJson(filterVal, this.tableList)
510
     },
517
     },
511
     getStockDrugCount(){
518
     getStockDrugCount(){
512
         var params ={
519
         var params ={
513
-          keywords: this.$route.query.keywords,
514
-          start_time:this.$route.query.start_time,
515
-          end_time:this.$route.query.end_time,
520
+           keywords: this.$route.query.keywords,
521
+           start_time:this.start_time,
522
+           end_time:this.end_time,
516
         }
523
         }
517
       getStockDrugCount(params).then(response=>{
524
       getStockDrugCount(params).then(response=>{
518
          if(response.data.state == 1){
525
          if(response.data.state == 1){
519
-           var count = response.data.data.count
520
-           console.log("入库统计",count)
521
-           this.countList = count
526
+          //  var count = response.data.data.count
527
+          //  console.log("入库统计",count)
528
+          //  this.countList = count
522
            var outlist = response.data.data.outList
529
            var outlist = response.data.data.outList
523
            console.log("出库数量",outlist)
530
            console.log("出库数量",outlist)
524
            this.outCountList = outlist
531
            this.outCountList = outlist
525
            var autoCount = response.data.data.autoCount
532
            var autoCount = response.data.data.autoCount
526
            console.log("autoCount",autoCount)
533
            console.log("autoCount",autoCount)
527
            this.autoCountList = autoCount
534
            this.autoCountList = autoCount
528
-           var totalCount = response.data.data.totalCount
529
-           console.log("totalcount",totalCount)
530
-           this.cancelCountList = totalCount
535
+          //  var totalCount = response.data.data.totalCount
536
+          //  console.log("totalcount",totalCount)
537
+          //  this.cancelCountList = totalCount
531
          }
538
          }
532
       })
539
       })
533
     },
540
     },

+ 49 - 9
src/xt_pages/user/templateSummary.vue 查看文件

126
                 <el-row :gutter="24">
126
                 <el-row :gutter="24">
127
                   <el-col :span="20">
127
                   <el-col :span="20">
128
                     <el-form-item label="阶段小结名称:">
128
                     <el-form-item label="阶段小结名称:">
129
-                      <el-input v-model="form.title"></el-input>
129
+                      <el-input v-model="form.title" style="width:200px"></el-input>
130
                     </el-form-item>
130
                     </el-form-item>
131
                   </el-col>
131
                   </el-col>
132
                 </el-row>
132
                 </el-row>
308
                      <keep-alive>
308
                      <keep-alive>
309
                         <editor ref="edit_neditor"
309
                         <editor ref="edit_neditor"
310
                                 id="edit_editor1"
310
                                 id="edit_editor1"
311
-                                style="width: 800px"
311
+                                style="width: 1200px"
312
                                 v-bind:r_content="form.template_summary_content">
312
                                 v-bind:r_content="form.template_summary_content">
313
                         </editor>
313
                         </editor>
314
                     </keep-alive>
314
                     </keep-alive>
400
                 <el-row :gutter="24">
400
                 <el-row :gutter="24">
401
                   <el-col :span="20">
401
                   <el-col :span="20">
402
                     <el-form-item label="阶段小结名称:">
402
                     <el-form-item label="阶段小结名称:">
403
-                      <el-input v-model="form.title"></el-input>
403
+                      <el-input v-model="form.title" style="width:200px"></el-input>
404
                     </el-form-item>
404
                     </el-form-item>
405
                   </el-col>
405
                   </el-col>
406
                 </el-row>
406
                 </el-row>
580
                        <keep-alive>
580
                        <keep-alive>
581
                         <editor ref="edit_neditor"
581
                         <editor ref="edit_neditor"
582
                                 id="edit_editor2"
582
                                 id="edit_editor2"
583
-                                style="width: 800px"
583
+                                style="width: 1200px"
584
                                 v-bind:r_content="form.template_summary_content">
584
                                 v-bind:r_content="form.template_summary_content">
585
                         </editor>
585
                         </editor>
586
                       </keep-alive>
586
                       </keep-alive>
672
               <el-form-item>
672
               <el-form-item>
673
                 <span>选择检验检查时间:</span>
673
                 <span>选择检验检查时间:</span>
674
                 <div>
674
                 <div>
675
-                  <el-form-item
675
+                  <!-- <el-form-item
676
                    label="时间:"
676
                    label="时间:"
677
                    prop="startYear"
677
                    prop="startYear"
678
                    style="width:100%;"
678
                    style="width:100%;"
686
                     format="yyyy-MM"
686
                     format="yyyy-MM"
687
                     value-format="yyyy-MM">
687
                     value-format="yyyy-MM">
688
 	               </el-date-picker>
688
 	               </el-date-picker>
689
+                 </el-form-item> -->
690
+                 <el-form-item>
691
+                    <el-select v-model="quartype" placeholder="请选择" @change="changetype">
692
+                      <el-option
693
+                        v-for="item in quarterType"
694
+                        :key="item.id"
695
+                        :label="item.name"
696
+                        :value="item.id">
697
+                      </el-option>
698
+                    </el-select>
689
                  </el-form-item>
699
                  </el-form-item>
690
                  <!-- <el-form-item  label="月份:"
700
                  <!-- <el-form-item  label="月份:"
691
                    prop="startYear"
701
                    prop="startYear"
939
         end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
949
         end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
940
         ids:"",
950
         ids:"",
941
         lastYear:new moment().subtract(1,'months').date(1).format("YYYY-MM-DD"),
951
         lastYear:new moment().subtract(1,'months').date(1).format("YYYY-MM-DD"),
952
+       quarterType: [
953
+        { id: 1, name: "第一季度"},
954
+        { id: 2,  name: "第二季度"},
955
+        { id: 3, name: "第三季度"},
956
+        { id: 4, name: "第四季度"}
957
+       ],
958
+       quartype:1,
942
       }
959
       }
943
     },
960
     },
944
     created() {
961
     created() {
962
+     
945
       console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
963
       console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
946
       this.patient_id = this.$route.params && this.$route.params.id
964
       this.patient_id = this.$route.params && this.$route.params.id
947
       var now = new Date()
965
       var now = new Date()
1162
 
1180
 
1163
         this.dialogVisibleInspection = true
1181
         this.dialogVisibleInspection = true
1164
       },
1182
       },
1165
-
1183
+      changetype(){
1184
+        this.getInspectionMajor()
1185
+      },
1166
       //获取大项数据来源
1186
       //获取大项数据来源
1167
       getInspectionMajor(){
1187
       getInspectionMajor(){
1168
-          console.log("start_year",this.startYear)
1188
+          console.log("type23232232",this.quartype)
1189
+          var start_time = ""
1190
+          var end_time = ""
1191
+          if(this.quartype == 1){
1192
+             start_time =  moment().startOf('year').format('YYYY-MM-DD')
1193
+             end_time = moment().month(2).endOf('month').format("YYYY-MM-DD")
1194
+          }
1195
+          if(this.quartype == 2){
1196
+            start_time = moment().month(3).startOf('month').format("YYYY-MM-DD")   
1197
+            end_time = moment().month(5).endOf('month').format("YYYY-MM-DD")
1198
+          }
1199
+          if(this.quartype == 3){
1200
+            start_time = moment().month(6).startOf('month').format("YYYY-MM-DD")
1201
+            end_time = moment().month(8).endOf('month').format("YYYY-MM-DD")
1202
+          }
1203
+          if(this.quartype == 4){
1204
+             start_time = moment().month(8).startOf('month').format("YYYY-MM-DD")
1205
+             end_time = moment().month(11).endOf('month').format("YYYY-MM-DD")
1206
+          }
1207
+          console.log("start_time",start_time)
1208
+          console.log("end_time",end_time)
1169
           var params = {
1209
           var params = {
1170
-            other_start_time:this.startYear,
1210
+            other_start_time:end_time,
1171
             patient_id:this.patient_id,
1211
             patient_id:this.patient_id,
1172
-            last_time:this.lastYear,
1212
+            last_time:start_time,
1173
           }
1213
           }
1174
          console.log("开始数据",params)
1214
          console.log("开始数据",params)
1175
         getInspectionMajorItem(params).then(response=>{
1215
         getInspectionMajorItem(params).then(response=>{