ソースを参照

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

柳香萍 6 年 前
コミット
15fafe9628

+ 10 - 0
src/api/signandweigh.js ファイルの表示

@@ -72,3 +72,13 @@ export function sighdata(params){
72 72
      method: 'Post'
73 73
    })
74 74
 }
75
+
76
+export function updateSignweight(params){
77
+  console.log("好好玩")
78
+  console.log(params)
79
+  return request({
80
+     url:'/api/sign/updateSignweight',
81
+     params:params,
82
+     method:'Post'
83
+  })
84
+}

+ 8 - 8
src/api/stock.js ファイルの表示

@@ -385,9 +385,9 @@ export function DeleteWarehouseInfoItem(params) {
385 385
   })
386 386
 }
387 387
 
388
-export function EditWarehouse(params, warehousing_time, id,type) {
388
+export function EditWarehouse(params, warehousing_time, id,type,manufacturer_id) {
389 389
   return request({
390
-    url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id+"&type="+type,
390
+    url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id,
391 391
     method: 'post',
392 392
     data: params
393 393
   })
@@ -433,9 +433,9 @@ export function deleteSalesReturnInfo(params) {
433 433
   })
434 434
 }
435 435
 
436
-export function editSalesReturnInfo(params, return_time, id,type) {
436
+export function editSalesReturnInfo(params, return_time, id,type,manufacturer_id) {
437 437
   return request({
438
-    url: '/api/salesreturn/edit?return_time=' + return_time + '&id=' + id+"&type="+type,
438
+    url: '/api/salesreturn/edit?return_time=' + return_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id,
439 439
     method: 'post',
440 440
     data: params
441 441
   })
@@ -473,9 +473,9 @@ export function getWarehouseOutInfo(params) {
473 473
   })
474 474
 }
475 475
 
476
-export function editWarehouseoutInfo(params, warehouse_out_time, id,type) {
476
+export function editWarehouseoutInfo(params, warehouse_out_time, id,type,manufacturer_id) {
477 477
   return request({
478
-    url: '/api/warehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id+"&type="+type,
478
+    url: '/api/warehouseout/edit?warehouse_out_time=' + warehouse_out_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id,
479 479
     method: 'post',
480 480
     data: params
481 481
   })
@@ -489,9 +489,9 @@ export function getCancelStockList(params) {
489 489
   })
490 490
 }
491 491
 
492
-export function editCancelStockInfo(params, cancel_stock_time, id,type) {
492
+export function editCancelStockInfo(params, cancel_stock_time, id,type,manufacturer_id) {
493 493
   return request({
494
-    url: '/api/cancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id+"&type="+type,
494
+    url: '/api/cancelstockinfo/edit?cancel_time=' + cancel_stock_time + '&id=' + id+"&type="+type+"&manufacturer_id="+manufacturer_id,
495 495
     method: 'post',
496 496
     data: params
497 497
   })

+ 22 - 74
src/xt_pages/sign/index.vue ファイルの表示

@@ -81,7 +81,7 @@
81 81
                     <el-row :gutter="20">
82 82
                         <el-col :span="23" align="right" class="button">
83 83
                             <el-button  @click="hide()">取消</el-button>
84
-                            <el-button @click="savedata();updatedata();sighdata();" type="primary">保存</el-button>
84
+                            <el-button @click="updateSignweight();sighdata();" type="primary">保存</el-button>
85 85
                         </el-col>
86 86
                     </el-row>
87 87
                    </div>
@@ -93,7 +93,7 @@
93 93
 </template>
94 94
 
95 95
 <script>
96
-import { fetchSignPatients, getPatientSign, SignWeigh, getDialysisInforInfomation, getDialysisAfterInfomation, createdata, editdata, sighdata } from '@/api/signandweigh'
96
+import { fetchSignPatients, getPatientSign, SignWeigh, getDialysisInforInfomation, getDialysisAfterInfomation, createdata, updateSignweight,sighdata} from '@/api/signandweigh'
97 97
 import BreadCrumb from '../components/bread-crumb'
98 98
 export default {
99 99
   name: 'sign',
@@ -279,48 +279,6 @@ export default {
279 279
       //console.log("是否有数据",this.weigh_list.id)
280 280
       // this.getsignweigh(row.id)
281 281
     },
282
-    // submitSign() {
283
-    //   SignWeigh(this.querySignParams, this.weigh_form).then(response => {
284
-    //     if (response.data.state === 1) {
285
-    //       this.$message({
286
-    //         type: 'success',
287
-    //         message: '成功!'
288
-    //       })
289
-
290
-    //       var tlen = this.patients.length
291
-    //       for (let index = 0; index < tlen; index++) {
292
-    //         if (this.patients[index].id === this.querySignParams.patient_id) {
293
-    //           var signin = this.patients[index].signin
294
-    //           this.patients[index].signin = response.data.data.sign
295
-
296
-    //           if (this.patients[index].schedule.id > 0 && (this.patients[index].schedule.schedule_type >= 1 || this.patients[index].schedule.schedule_type <= 3)) {
297
-    //             var sl = this.schedules.length
298
-    //             for (let j = 0; j < sl; j++) {
299
-    //               if (this.schedules[j].type === this.patients[index].schedule.schedule_type) {
300
-    //                 if (this.weigh_form.id <= 0) {
301
-    //                   this.schedules[j].sign++
302
-    //                 }
303
-    //                 if (signin.weigh_before_time === 0 && response.data.data.sign.weigh_before_time > 0) {
304
-    //                   this.schedules[j].before++
305
-    //                 }
306
-
307
-    //                 if (signin.weigh_time === 0 && response.data.data.sign.weigh_time > 0) {
308
-    //                   this.schedules[j].after++
309
-    //                 }
310
-    //               }
311
-    //             }
312
-    //           }
313
-    //           break
314
-    //         }
315
-    //       }
316
-    //       this.weigh_form.id = response.data.data.sign.id
317
-    //     } else {
318
-    //       this.$message.error(response.data.msg)
319
-    //       return false
320
-    //     }
321
-    //   })
322
-    // },
323
-
324 282
     getDialysisInforInfomation(id) {
325 283
       getDialysisInforInfomation(id).then(response => {
326 284
         if (response.data.data.patientlist != null) {
@@ -404,49 +362,40 @@ export default {
404 362
       this.show = true
405 363
       this.disa = false
406 364
     },
407
-    savedata() {
365
+
366
+    updateSignweight() {
408 367
       var params = new Object()
368
+      var data_time = this.querySignParams.date_time
369
+      params.date_time = data_time
409 370
       params.patient_id = this.weigh_form.patient_id
410 371
       params.dry_weight = this.weigh_list.dry_weight
411 372
       params.weight_before = this.weigh_list.weight_before
412 373
       params.temperature = this.weigh_list.temperature
413 374
       params.pulse_frequency = this.weigh_list.pulse_frequency
414
-      params.breathing_rate = this.weigh_list.breathing_rate
415 375
       params.systolic_blood_pressure = this.weigh_list.systolic_blood_pressure
416 376
       params.diastolic_blood_pressure = this.weigh_list.diastolic_blood_pressure
417
-      createdata(params).then(response => {
418
-        if (response.data.state === 1) {
419
-          this.$message({
377
+
378
+      params.patient_id = this.weigh_form.patient_id
379
+      params.weight_after = this.weigh_infor.weight_after
380
+      params.temperatureafter = this.weigh_infor.temperature
381
+      params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
382
+      params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
383
+      params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
384
+      console.log("干体重:"+ params.dry_weight)
385
+      updateSignweight(params).then(response =>{
386
+         if(response.data.state ===1){
387
+            this.$message({
420 388
             type: 'success',
421 389
             message: '成功!'
422
-          })
423
-        }
390
+           })
391
+         }
424 392
       })
393
+       console.log("params数据",params)
425 394
     },
426 395
     hide() {
427 396
       this.show = false
428 397
     },
429
-    updatedata() {
430
-      var params = new Object()
431
-      params.patient_id = this.weigh_form.patient_id
432
-      params.dry_weight = this.weigh_infor.dry_weight
433
-      params.weight_after = this.weigh_infor.weight_after
434
-      params.temperature = this.weigh_infor.temperature
435
-      params.pulse_frequency = this.weigh_infor.pulse_frequency
436
-      params.breathing_rate = this.weigh_infor.breathing_rate
437
-      params.systolic_blood_pressure = this.weigh_infor.systolic_blood_pressure
438
-      params.diastolic_blood_pressure = this.weigh_infor.diastolic_blood_pressure
439
-      editdata(params).then(response => {
440
-        if (response.data.state === 1) {
441
-          this.$message({
442
-            type: 'success',
443
-            message: '成功!'
444
-          })
445
-        }
446
-      })
447
-      console.log('hahahahah')
448
-      console.log(params)
449
-    },
398
+  
450 399
     sighdata() {
451 400
       // 透前数据
452 401
       var params = new Object()
@@ -465,13 +414,12 @@ export default {
465 414
       params.weight_after = this.weigh_infor.weight_after
466 415
       params.temperatureafter = this.weigh_infor.temperature
467 416
       params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
468
-      params.breathing_rateafter = this.weigh_infor.breathing_rate
469 417
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
470 418
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
471 419
       console.log('params是什么?', params)
472 420
       sighdata(params).then(response => {
473 421
         var signs = response.data.data.signs
474
-        // this.patients[this.table_current_index].signin.id = 1
422
+        console.log("signs是什么?",signs)
475 423
         if (response.data.state === 1) {
476 424
           this.$message({
477 425
             type: 'success',

+ 1 - 1
src/xt_pages/stock/cancelStockOrderEdit.vue ファイルの表示

@@ -301,7 +301,7 @@
301 301
             const params = {
302 302
               'cancelStock': this.recordInfo.recordData
303 303
             }
304
-            editCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type).then(response => {
304
+            editCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer).then(response => {
305 305
               if (response.data.state == 0) {
306 306
                 this.$message.error(response.data.msg)
307 307
                 return false

+ 1 - 1
src/xt_pages/stock/detail/salesReturnDetail.vue ファイルの表示

@@ -61,7 +61,7 @@
61 61
             </template>
62 62
           </el-table-column>
63 63
 
64
-          <el-table-column label="商品类型" align="center">
64
+          <el-table-column label="商品" align="center">
65 65
             <template slot-scope="scope">
66 66
               {{specificationName(scope.row.good_id)}}
67 67
             </template>

+ 1 - 1
src/xt_pages/stock/detail/stockInDetail.vue ファイルの表示

@@ -58,7 +58,7 @@
58 58
             </template>
59 59
           </el-table-column>
60 60
 
61
-          <el-table-column label="商品类型" align="center">
61
+          <el-table-column label="商品" align="center">
62 62
             <template slot-scope="scope">
63 63
               {{specificationName(scope.row.good_id)}}
64 64
             </template>

+ 1 - 1
src/xt_pages/stock/detail/stockOutDetail.vue ファイルの表示

@@ -62,7 +62,7 @@
62 62
             </template>
63 63
           </el-table-column>
64 64
 
65
-          <el-table-column label="商品类型" align="center">
65
+          <el-table-column label="商品" align="center">
66 66
             <template slot-scope="scope">
67 67
               {{specificationName(scope.row.good_id)}}
68 68
             </template>

+ 1 - 1
src/xt_pages/stock/salesReturnEdit.vue ファイルの表示

@@ -309,7 +309,7 @@
309 309
             const params = {
310 310
               'salesReturn': this.recordInfo.recordData
311 311
             }
312
-            editSalesReturnInfo(params, this.return_time, this.$route.query.id, this.$route.query.type).then(response => {
312
+            editSalesReturnInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer).then(response => {
313 313
               if (response.data.state == 0) {
314 314
                 this.$message.error(response.data.msg)
315 315
                 return false

+ 1 - 1
src/xt_pages/stock/stockInOrderEdit.vue ファイルの表示

@@ -406,7 +406,7 @@ export default {
406 406
             const params = {
407 407
               'stockIn': this.recordInfo.recordData
408 408
             }
409
-            EditWarehouse(params, this.warehousing_time, this.$route.query.id, this.$route.query.type).then(response => {
409
+            EditWarehouse(params, this.warehousing_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer).then(response => {
410 410
               if (response.data.state == 0) {
411 411
                 this.$message.error(response.data.msg)
412 412
                 return false

+ 3 - 1
src/xt_pages/stock/stockOutOrderEdit.vue ファイルの表示

@@ -333,7 +333,7 @@
333 333
             const params = {
334 334
               'stockOut': this.recordInfo.recordData
335 335
             }
336
-            editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type).then(response => {
336
+            editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer).then(response => {
337 337
               if (response.data.state == 0) {
338 338
                 this.$message.error(response.data.msg)
339 339
                 return false
@@ -362,6 +362,8 @@
362 362
             }
363 363
             this.warehouseOut = response.data.data.info
364 364
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
365
+            this.form.manufacturer = this.warehouseOut.manufacturer
366
+
365 367
           }
366 368
 
367 369
           if (this.recordInfo.recordData.length == 0) {