Ver código fonte

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 anos atrás
pai
commit
7f1f98e8d1

+ 3 - 1
src/xt_pages/data/components/consumables.vue Ver arquivo

78
       </el-table-column>
78
       </el-table-column>
79
       <el-table-column label="状态" width="60" align="center">
79
       <el-table-column label="状态" width="60" align="center">
80
         <template slot-scope="scope">
80
         <template slot-scope="scope">
81
-        {{ scope.row.good_status}}
81
+        <!--{{ scope.row.good_status}}-->
82
+          <div>{{scope.row.good_status.indexOf('停用') == -1 ? '启用':'停用' }}</div>
83
+
82
         </template>
84
         </template>
83
 
85
 
84
       </el-table-column>
86
       </el-table-column>

+ 126 - 66
src/xt_pages/data/components/drugs.vue Ver arquivo

64
         </template>
64
         </template>
65
 
65
 
66
       </el-table-column>
66
       </el-table-column>
67
-      <el-table-column label="价" width="60" align="center">
67
+      <el-table-column label="零售价" width="60" align="center">
68
         <template slot-scope="scope">
68
         <template slot-scope="scope">
69
-          <!--<div>{{scope.row.drug_spec}}</div>-->
69
+          <div>{{scope.row.retail_price}}</div>
70
         </template>
70
         </template>
71
       </el-table-column>
71
       </el-table-column>
72
       <el-table-column label="状态" width="60" align="center">
72
       <el-table-column label="状态" width="60" align="center">
114
   import selfPayment from './selfPayment'
114
   import selfPayment from './selfPayment'
115
   import maintain from './maintain'
115
   import maintain from './maintain'
116
   import addDrugs from './addDrugs'
116
   import addDrugs from './addDrugs'
117
-  import {
118
-    GetAllManufacturer,
119
-  } from '@/api/stock'
117
+  import { GetAllManufacturer } from '@/api/stock'
120
 
118
 
121
   import {
119
   import {
122
     createBaseDrugLib,
120
     createBaseDrugLib,
123
-    getBaseDrugLib,
124
-    getBaseDrugLibList,
125
-    createMedicineInsurancePercent,
126
     createDrugUnitSafeguard,
121
     createDrugUnitSafeguard,
127
-    editBaseDrugLib
122
+    createMedicineInsurancePercent,
123
+    editBaseDrugLib,
124
+    getBaseDrugLib,
125
+    getBaseDrugLibList
128
   } from '@/api/data'
126
   } from '@/api/data'
129
 
127
 
130
-
131
   export default {
128
   export default {
132
     components: {
129
     components: {
133
       selfPayment,
130
       selfPayment,
136
     },
133
     },
137
     data() {
134
     data() {
138
       return {
135
       return {
139
-        page:0,
140
-        limit:10,
141
-        keywords:"",
142
-        is_use:'',
143
-        is_charge:'',
144
-        is_inject:'',
145
-        list:[],
146
-
147
-        isCreated:1,
148
-        manufacturers:[],
136
+        page: 0,
137
+        limit: 10,
138
+        keywords: '',
139
+        is_use: '',
140
+        is_charge: '',
141
+        is_inject: '',
142
+        list: [],
143
+
144
+        isCreated: 1,
145
+        manufacturers: [],
149
         title: '',
146
         title: '',
150
         formValue: {
147
         formValue: {
151
           drug_name: '',//药品名称
148
           drug_name: '',//药品名称
170
           number: '',//批准文号
167
           number: '',//批准文号
171
           drug_classify: '',//药物分类
168
           drug_classify: '',//药物分类
172
           drug_dose: '',//药品剂量
169
           drug_dose: '',//药品剂量
173
-          drug_dose_unit:'',
170
+          drug_dose_unit: '',
174
           medical_insurance_number: '',//医保编号
171
           medical_insurance_number: '',//医保编号
175
-          manufacturer:'', //生产产商
172
+          manufacturer: '', //生产产商
176
           pharmacology_category: '',//药理分类
173
           pharmacology_category: '',//药理分类
177
           statistics_category: '',//统计分类
174
           statistics_category: '',//统计分类
178
           code: '',//本位码
175
           code: '',//本位码
192
           is_charge_predict: '',//是否收费预估项
189
           is_charge_predict: '',//是否收费预估项
193
           is_statistics_work: '',//是否统计工作量
190
           is_statistics_work: '',//是否统计工作量
194
           is_charge_use: '',//是否收费常用项
191
           is_charge_use: '',//是否收费常用项
195
-          drug_code:"",
192
+          drug_code: ''
196
 
193
 
197
         },
194
         },
198
         tempFormValue: {
195
         tempFormValue: {
218
           number: '',//批准文号
215
           number: '',//批准文号
219
           drug_classify: '',//药物分类
216
           drug_classify: '',//药物分类
220
           drug_dose: '',//药品剂量
217
           drug_dose: '',//药品剂量
221
-          drug_dose_unit:'',
218
+          drug_dose_unit: '',
222
           medical_insurance_number: '',//医保编号
219
           medical_insurance_number: '',//医保编号
223
-          manufacturer:'', //生产产商
220
+          manufacturer: '', //生产产商
224
           pharmacology_category: '',//药理分类
221
           pharmacology_category: '',//药理分类
225
           statistics_category: '',//统计分类
222
           statistics_category: '',//统计分类
226
           code: '',//本位码
223
           code: '',//本位码
240
           is_charge_predict: '',//是否收费预估项
237
           is_charge_predict: '',//是否收费预估项
241
           is_statistics_work: '',//是否统计工作量
238
           is_statistics_work: '',//是否统计工作量
242
           is_charge_use: '',//是否收费常用项
239
           is_charge_use: '',//是否收费常用项
243
-          drug_code:"",
240
+          drug_code: ''
244
 
241
 
245
         },
242
         },
246
 
243
 
247
-        current_id:0,
244
+        current_id: 0,
248
 
245
 
249
         search_input: '',
246
         search_input: '',
250
         options: [
247
         options: [
251
           {
248
           {
252
             value: '0',
249
             value: '0',
253
             label: '全部'
250
             label: '全部'
254
-          },{
255
-          value: '1',
256
-          label: '是'
257
-        }, {
258
-          value: '2',
259
-          label: '否'
260
-        }],
251
+          }, {
252
+            value: '1',
253
+            label: '是'
254
+          }, {
255
+            value: '2',
256
+            label: '否'
257
+          }],
261
         value: '',
258
         value: '',
262
         tableData: [{
259
         tableData: [{
263
           date: '2016-05-02',
260
           date: '2016-05-02',
288
         this.page = val
285
         this.page = val
289
         this.getList()
286
         this.getList()
290
       },
287
       },
291
-      changeInject(val){
288
+      changeInject(val) {
292
         this.getList()
289
         this.getList()
293
 
290
 
294
       },
291
       },
295
-      changeCharge(val){
292
+      changeCharge(val) {
296
         this.getList()
293
         this.getList()
297
 
294
 
298
       },
295
       },
299
-      changeUser(val){
296
+      changeUser(val) {
300
         this.getList()
297
         this.getList()
301
 
298
 
302
-
303
       },
299
       },
304
-      getName(id){
305
-
306
-      for (let i =0; i < this.manufacturers.length;i++){
307
-        if(this.manufacturers[i].id == id){
308
-          return this.manufacturers[i].manufacturer_name
300
+      getName(id) {
301
+        for (let i = 0; i < this.manufacturers.length; i++) {
302
+          if (this.manufacturers[i].id == id) {
303
+            return this.manufacturers[i].manufacturer_name
304
+          }
309
         }
305
         }
310
-        return ""
311
-      }
312
-
306
+        return ''
313
       },
307
       },
314
       goodInfoDialogComfirm: function(val) {
308
       goodInfoDialogComfirm: function(val) {
315
 
309
 
362
         this.getList()
356
         this.getList()
363
       },
357
       },
364
       clickSelfPayment(drug_id) {
358
       clickSelfPayment(drug_id) {
365
-        this.$refs.selfPayment.show(drug_id,1)
359
+        this.$refs.selfPayment.show(drug_id, 1)
366
       },
360
       },
367
       clickMainTain() {
361
       clickMainTain() {
368
         // this.$refs.maintain.show();
362
         // this.$refs.maintain.show();
369
       },
363
       },
370
       openForm(id) {
364
       openForm(id) {
371
         this.getAllManufacturer()
365
         this.getAllManufacturer()
372
-        if (id > 0){
366
+        if (id > 0) {
373
           this.current_id = id
367
           this.current_id = id
374
           let params = {
368
           let params = {
375
             id: this.current_id
369
             id: this.current_id
379
               this.$message.error(response.data.msg)
373
               this.$message.error(response.data.msg)
380
               return false
374
               return false
381
             } else {
375
             } else {
382
-              for(let key in response.data.data.drug){
376
+              for (let key in response.data.data.drug) {
383
                 this.formValue[key] = response.data.data.drug[key]
377
                 this.formValue[key] = response.data.data.drug[key]
384
               }
378
               }
385
-              this.formValue.is_special_diseases = this.formValue.is_special_diseases.toString()
386
-              this.formValue.is_record = this.formValue.is_record.toString()
387
-              this.formValue.is_use_doctor_advice = this.formValue.is_use_doctor_advice.toString()
388
-              this.formValue.is_default = this.formValue.is_default.toString()
389
-              this.formValue.is_charge_predict = this.formValue.is_charge_predict.toString()
390
-              this.formValue.is_statistics_work = this.formValue.is_statistics_work.toString()
391
-              this.formValue.is_charge_use = this.formValue.is_charge_use.toString()
392
-              this.$refs.addDrugs.show(id,this.formValue)
379
+
380
+              if(this.formValue.is_special_diseases <= 0){
381
+
382
+                this.formValue.is_special_diseases = ''
383
+              } else{
384
+
385
+                this.formValue.is_special_diseases = this.formValue.is_special_diseases.toString()
386
+
387
+
388
+              }
389
+
390
+              if(this.formValue.is_record <= 0){
391
+
392
+                this.formValue.is_record = ''
393
+              } else{
394
+
395
+                this.formValue.is_record = this.formValue.is_record.toString()
396
+
397
+
398
+              }
399
+
400
+
401
+              if(this.formValue.is_use_doctor_advice <= 0){
402
+
403
+                this.formValue.is_use_doctor_advice = ''
404
+              } else{
405
+
406
+                this.formValue.is_use_doctor_advice = this.formValue.is_use_doctor_advice.toString()
407
+
408
+
409
+              }
410
+
411
+
412
+              if(this.formValue.is_default <= 0){
413
+
414
+                this.formValue.is_default = ''
415
+              } else{
416
+
417
+                this.formValue.is_default = this.formValue.is_default.toString()
418
+
419
+
420
+              }
421
+
422
+              if(this.formValue.is_charge_predict <= 0){
423
+
424
+                this.formValue.is_charge_predict = ''
425
+              } else{
426
+
427
+                this.formValue.is_charge_predict = this.formValue.is_charge_predict.toString()
428
+
429
+
430
+              }
431
+
432
+              if(this.formValue.is_statistics_work <= 0){
433
+
434
+                this.formValue.is_statistics_work = ''
435
+              } else{
436
+
437
+                this.formValue.is_statistics_work = this.formValue.is_statistics_work.toString()
438
+
439
+
440
+              }
441
+
442
+              if(this.formValue.is_charge_use <= 0){
443
+
444
+                this.formValue.is_charge_use = ''
445
+              } else{
446
+
447
+                this.formValue.is_charge_use = this.formValue.is_charge_use.toString()
448
+
449
+
450
+              }
451
+
452
+              this.$refs.addDrugs.show(id, this.formValue)
393
 
453
 
394
             }
454
             }
395
           })
455
           })
396
-        }else{
397
-          for(let key in this.tempFormValue){
456
+        } else {
457
+          for (let key in this.tempFormValue) {
398
             this.formValue[key] = this.tempFormValue[key]
458
             this.formValue[key] = this.tempFormValue[key]
399
           }
459
           }
400
-          this.$refs.addDrugs.show(0,this.formValue)
460
+          this.$refs.addDrugs.show(0, this.formValue)
401
         }
461
         }
402
-      },  getList() {
462
+      }, getList() {
403
         let params = {
463
         let params = {
404
           page: this.page,
464
           page: this.page,
405
           limit: this.limit,
465
           limit: this.limit,
406
           keyword: this.keywords,
466
           keyword: this.keywords,
407
-          is_use:this.is_use,
408
-          is_charge:this.is_charge,
409
-          is_inject:this.is_inject
467
+          is_use: this.is_use,
468
+          is_charge: this.is_charge,
469
+          is_inject: this.is_inject
410
         }
470
         }
411
         getBaseDrugLibList(params).then(response => {
471
         getBaseDrugLibList(params).then(response => {
412
           if (response.data.state == 0) {
472
           if (response.data.state == 0) {
420
             }
480
             }
421
           }
481
           }
422
         })
482
         })
423
-      },
483
+      }
424
 
484
 
425
-    },created() {
485
+    }, created() {
426
       this.getList()
486
       this.getList()
427
       this.getAllManufacturer()
487
       this.getAllManufacturer()
428
     }
488
     }

+ 9 - 9
src/xt_pages/stock/index.vue Ver arquivo

7
     <div class="app-container" >
7
     <div class="app-container" >
8
       <div class="service-box">
8
       <div class="service-box">
9
         <el-tabs v-model="activeName">
9
         <el-tabs v-model="activeName">
10
-          <el-tab-pane label="厂家" name="first">
11
-            <manufacturer></manufacturer>
12
-          </el-tab-pane>
13
-          <el-tab-pane label="经销商">
14
-            <dealer></dealer>
15
-          </el-tab-pane>
10
+          <!--<el-tab-pane label="厂家" name="first">-->
11
+            <!--<manufacturer></manufacturer>-->
12
+          <!--</el-tab-pane>-->
13
+          <!--<el-tab-pane label="经销商">-->
14
+            <!--<dealer></dealer>-->
15
+          <!--</el-tab-pane>-->
16
           <el-tab-pane label="商品类型">
16
           <el-tab-pane label="商品类型">
17
             <good-type></good-type>
17
             <good-type></good-type>
18
           </el-tab-pane>
18
           </el-tab-pane>
19
-          <el-tab-pane label="商品信息">
20
-            <good-info></good-info>
21
-          </el-tab-pane>
19
+          <!--<el-tab-pane label="商品信息">-->
20
+            <!--<good-info></good-info>-->
21
+          <!--</el-tab-pane>-->
22
           <el-tab-pane label="自动扣减">
22
           <el-tab-pane label="自动扣减">
23
             <automatic-reduce></automatic-reduce>
23
             <automatic-reduce></automatic-reduce>
24
           </el-tab-pane>
24
           </el-tab-pane>