Browse Source

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

csx 3 years ago
parent
commit
8678c39f85
1 changed files with 61 additions and 73 deletions
  1. 61 73
      src/xt_pages/hospitalStation/components/deskPrescription.vue

+ 61 - 73
src/xt_pages/hospitalStation/components/deskPrescription.vue View File

2186
               return
2186
               return
2187
             }
2187
             }
2188
 
2188
 
2189
-<<<<<<< HEAD
2190
-=======
2191
-        if (this.dayorMonth == 'day') {
2192
-          if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 4) {
2193
-            this.$message.error('当前处方已经结算或者已经上传医保系统,无法保存')
2194
-            return
2195
-          }
2196
-          if (this.doctorValue.length <= 0) {
2197
-            this.$message.error('医生不能为空')
2198
-            return
2199
->>>>>>> fd0a04e2b50dc8a2d5c0ca448691e936f6b6198f
2200
-          }
2201
 
2189
 
2202
           if (this.dayorMonth == 'day') {
2190
           if (this.dayorMonth == 'day') {
2203
             if (this.curPrescriptions.order_status == 2 ||this.curPrescriptions.order_status == 4 ) {
2191
             if (this.curPrescriptions.order_status == 2 ||this.curPrescriptions.order_status == 4 ) {
2355
             this.$refs.saveTemplate.show()
2343
             this.$refs.saveTemplate.show()
2356
           }
2344
           }
2357
         } else if (this.dayorMonth == 'month') {
2345
         } else if (this.dayorMonth == 'month') {
2358
-          if (this.isShowDayPrescription) {
2359
-            // if (this.curDayPrescriptions.order_status == 2) {
2360
-            //   this.$message.error('当前处方已经结算,无法保存')
2361
-            //   return
2362
-            // }
2363
-            if (this.doctorValue.length <= 0) {
2364
-              this.$message.error('医生不能为空')
2365
-              return
2366
-            }
2367
-
2368
-            if (this.departmentValue.length <= 0) {
2369
-              this.$message.error('科室不能为空')
2370
-              return
2371
-            }
2372
-
2373
-            if (index == 1) {
2374
-              let params = {
2375
-                patient_id: this.patientInfo.id,
2376
-                diagnose: this.diagnose.join(','),
2377
-                sick_type: this.state1,
2378
-                sick_history: this.state2,
2379
-                doctor: this.doctorValue,
2380
-                department: this.departmentValue,
2381
-                record_date: this.end_time,
2382
-                his_patient_id: this.hisPatientInfo.id,
2383
-                reg_type: this.register_type,
2384
-                p_type: 1
2346
+            if (this.isShowDayPrescription) {
2347
+              // if (this.curDayPrescriptions.order_status == 2) {
2348
+              //   this.$message.error('当前处方已经结算,无法保存')
2349
+              //   return
2350
+              // }
2351
+              if (this.doctorValue.length <= 0) {
2352
+                this.$message.error('医生不能为空')
2353
+                return
2385
               }
2354
               }
2386
 
2355
 
2387
-              var month_prescriptions = this.deepClone(this.month_prescriptions)
2356
+              if (this.departmentValue.length <= 0) {
2357
+                this.$message.error('科室不能为空')
2358
+                return
2359
+              }
2388
 
2360
 
2389
-              for (let i = 0; i < month_prescriptions.length; i++) {
2390
-                if (month_prescriptions[i].advices.length > 0 && month_prescriptions[i].project.length == 0) {
2391
-                  month_prescriptions[i]['type'] = 1
2392
-                }
2393
-                if (month_prescriptions[i].advices.length == 0 && month_prescriptions[i].project.length > 0) {
2394
-                  month_prescriptions[i]['type'] = 2
2361
+              if (index == 1) {
2362
+                let params = {
2363
+                  patient_id: this.patientInfo.id,
2364
+                  diagnose: this.diagnose.join(','),
2365
+                  sick_type: this.state1,
2366
+                  sick_history: this.state2,
2367
+                  doctor: this.doctorValue,
2368
+                  department: this.departmentValue,
2369
+                  record_date: this.end_time,
2370
+                  his_patient_id: this.hisPatientInfo.id,
2371
+                  reg_type: this.register_type,
2372
+                  p_type: 1
2395
                 }
2373
                 }
2396
 
2374
 
2397
-                for (let b = 0; b < month_prescriptions[i].advices.length; b++) {
2398
-                  month_prescriptions[i].advices[b].single_dose = month_prescriptions[i].advices[b].single_dose.toString()
2399
-                  month_prescriptions[i].advices[b].prescribing_number = month_prescriptions[i].advices[b].prescribing_number.toString()
2400
-                  month_prescriptions[i].advices[b].retail_price = month_prescriptions[i].advices[b].retail_price.toString()
2401
-                  month_prescriptions[i].advices[b].day = parseInt(month_prescriptions[i].advices[b].day)
2375
+                var month_prescriptions = this.deepClone(this.month_prescriptions)
2402
 
2376
 
2403
-                }
2377
+                for (let i = 0; i < month_prescriptions.length; i++) {
2378
+                  if (month_prescriptions[i].advices.length > 0 && month_prescriptions[i].project.length == 0) {
2379
+                    month_prescriptions[i]['type'] = 1
2380
+                  }
2381
+                  if (month_prescriptions[i].advices.length == 0 && month_prescriptions[i].project.length > 0) {
2382
+                    month_prescriptions[i]['type'] = 2
2383
+                  }
2404
 
2384
 
2405
-                for (let b = 0; b < month_prescriptions[i].project.length; b++) {
2406
-                  month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
2407
-                  month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
2408
-                  month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
2385
+                  for (let b = 0; b < month_prescriptions[i].advices.length; b++) {
2386
+                    month_prescriptions[i].advices[b].single_dose = month_prescriptions[i].advices[b].single_dose.toString()
2387
+                    month_prescriptions[i].advices[b].prescribing_number = month_prescriptions[i].advices[b].prescribing_number.toString()
2388
+                    month_prescriptions[i].advices[b].retail_price = month_prescriptions[i].advices[b].retail_price.toString()
2389
+                    month_prescriptions[i].advices[b].day = parseInt(month_prescriptions[i].advices[b].day)
2409
 
2390
 
2410
-                }
2391
+                  }
2392
+
2393
+                  for (let b = 0; b < month_prescriptions[i].project.length; b++) {
2394
+                    month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
2395
+                    month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
2396
+                    month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
2397
+
2398
+                  }
2411
 
2399
 
2412
-                for (let b = 0; b < month_prescriptions[i].addition.length; b++) {
2413
-                  month_prescriptions[i].addition[b].id = parseInt(month_prescriptions[i].addition[b].id)
2414
-                  month_prescriptions[i].addition[b].item_id = parseInt(month_prescriptions[i].addition[b].item_id)
2415
-                  month_prescriptions[i].addition[b].price = month_prescriptions[i].addition[b].price.toString()
2416
-                  month_prescriptions[i].addition[b].count = month_prescriptions[i].addition[b].count.toString()
2400
+                  for (let b = 0; b < month_prescriptions[i].addition.length; b++) {
2401
+                    month_prescriptions[i].addition[b].id = parseInt(month_prescriptions[i].addition[b].id)
2402
+                    month_prescriptions[i].addition[b].item_id = parseInt(month_prescriptions[i].addition[b].item_id)
2403
+                    month_prescriptions[i].addition[b].price = month_prescriptions[i].addition[b].price.toString()
2404
+                    month_prescriptions[i].addition[b].count = month_prescriptions[i].addition[b].count.toString()
2405
+                  }
2417
                 }
2406
                 }
2418
-              }
2419
 
2407
 
2420
-              let data = {
2421
-                'prescriptions': month_prescriptions
2422
-              }
2423
-              editHisPrescription(data, params).then(response => {
2424
-                if (response.data.state == 1) {
2425
-                  this.month_prescriptions = month_prescriptions
2426
-                  this.$message.success('编辑成功')
2408
+                let data = {
2409
+                  'prescriptions': month_prescriptions
2427
                 }
2410
                 }
2428
-              })
2411
+                editHisPrescription(data, params).then(response => {
2412
+                  if (response.data.state == 1) {
2413
+                    this.month_prescriptions = month_prescriptions
2414
+                    this.$message.success('编辑成功')
2415
+                  }
2416
+                })
2429
 
2417
 
2418
+              }
2430
             }
2419
             }
2431
-          }
2432
-        }
2420
+          }}
2433
       },
2421
       },
2434
       addTab(targetName) {
2422
       addTab(targetName) {
2435
         // if (this.curPrescriptions.order_status == 2) {
2423
         // if (this.curPrescriptions.order_status == 2) {